mklauber/django-mpd-client

How to install?

Opened this issue · 16 comments

Hello,

I followed the instructions on how to install it (on a Raspberry Pi), and I couldn't do it. I'm new to django and I don't know how to deploy an app.

After the installation, what's the full address I should use on the browser?

Just a comment, on the fourth step there is a minor mistake, you said: 'sudo service apache reload' when it should be apache2 instead: 'sudo service apache2 reload'.

Thanks a lot for your help!

Thanks for your interest. To hit the site, you should simply have to type the ipaddress of the raspberryPi. I do not have a raspberryPi so I cannot confirm this, but should be the same.

Same problem here, if i type the ip-adress of my ip i get the standart apache index page.
If i type the ip-adress + /mpd i get the folders and files in this folder!

I'll take another look into this. I just got a RaspberryPi, so go through the installation myself and see if I can improve the documentation.

Hello,

is there any new development with this issue? I have the same problem as Thor77. Trying to setup django-mpd-player on rpi. Typing only the rpi ip: http://192.168.1.3 gets me to the apache test page with the classic "It works!" message. If I type http://192.168.1.3/mpd I see the contents of the folder. Am I missing some python plugin or something?

Thank you!

Hi,
To all those of you with this issue, can you confirm that you followed the installation instructions exactly? Including copying the django-mpd-client.conf file and running the a2ensite django-mpd-client.conf?

As well, can you clarify which OS you are running on your rpi? Raspbian or Pidora?

I'm using Raspbian,
yes i followed the instructions exactly.

Ok, to all those of you who are having the issue where you see the apache default page and file listings, the issue is that you need to disable the default apache site by running a2dissite default. However, upon further testing, I've also identified that my codebase is not compatible with the latest version of django. I will try to release a 0.4.1 version for use with the latest versions of django.

if i run "a2dissite default.conf" i get "ERROR: Site default.conf does not exist!"

@Thor77 Sorry, that'll teach me to post comments before I've had my morning caffeine. The correct command should be sudo a2dissite default. I've updated my prior comment with this as well. In addition, I've released version 0.4.1, which updates compatibility for django 1.6. Can you try that and see if it resolves your issue?

@mklauber Now i get an internal Server Error.
I removed the .conf-file and the mpd-folder, than i cloned this from git, so i should have the right version.
After that i followed the instructions in the INSTALL-File.
Serverlog: http://pastie.org/private/b6lifebmcmcdqqlhggj9g
(yes, the time of my pi is wrong...)

Have you installed django on your pi? (Yes, I know the documentation is terrible. sorry) This code depends on django being installed. You can install django via pip sudo pip install django. If you prefer not to use pip, you can install an older version of django via sudo apt-get install python-django

Yes, python-django is installed.

Are you comfortable running python on your box? Could you run the following commands inside the python interpreter?

import django
print django.VERSION

My Output

(1, 6, 0, 'final', 0)

Hm... that's very strange. Not sure what's going on there. Can you run import django.core.handlers.wsgi in the python interpreter?

Theres an error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 11, in <module>
    from django.core.handlers import base
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 12, in <module>
    from django.db import connections, transaction
  File "/usr/local/lib/python2.7/dist-packages/django/db/__init__.py", line 83, in <module>
    signals.request_started.connect(reset_queries)
  File "/usr/local/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 88, in connect
    if settings.DEBUG:
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 47, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.