-
Notifications
You must be signed in to change notification settings - Fork 7
Installation for developers
This is our recommended installation for developers who wish to contribute to SpotSeeker or adapt it for their own purposes. The use of virtualenv is optional, but helps to keep your system Python installation tidy.
- A Python installation (2.5 or greater)
- pip or easy_install
- git
- JPEG libraries from http://www.ijg.org/ (Optional, but PIL will not support JPEG images without it.)
-
If you don't have it already, install virtualenv:
$ pip install virtualenvif you don't have pip, you may be able to:
$ easy_install virtualenv -
Clone the spotseeker-server repository
$ git clone git://github.com/vegitron/spotseeker-server.git -
Turn spotseeker-server into a virtualenv:
$ virtualenv --no-site-packages spotseeker-server -
Activate your virtualenv:
cd spotseeker-server source bin/activate -
Install required Python packages with pip:
$ pip install -r requirements.txt -
Create a django project in the spotseeker-server dir:
$ django-admin.py startproject spotseeker .That '.' at the end is important!
-
Modify at least the following settings in spotseeker/settings.py:
- ADMINS
- DATABASES
- MEDIA_ROOT
- MEDIA_URL
- INSTALLED_APPS (add 'south', 'spotseeker_server', and 'oauth_provider')
- SPOTSEEKER_AUTH_MODULE (set it to either 'spotseeker_server.auth.all_ok' or 'spotseeker_server.auth.oauth')
-
Map urls to the spotseeker_server app by adding the following to urlpatterns in spotseeker/urls.py:
url(r'^api/', include('spotseeker_server.urls')),
-
Add uploaded files as something the development server should serve in spotseeker/urls.py after the existing urlpatterns:
from django.conf import settings if settings.DEBUG: urlpatterns += patterns('', url(r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }), )
-
Create your database:
$ python manage.py syncdb $ python manage.py migrate -
You should now be able to run your development server:
$ python manage.py runserver