-
Notifications
You must be signed in to change notification settings - Fork 3
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
- pip
- git
-
If you don't have it already, install virtualenv:
$ pip install virtualenv
-
Clone the spotseeker-web repository
$ git clone git://github.com/uw-it-aca/spotseeker-web.git
-
Turn spotseeker-web into a virtualenv:
$ virtualenv --no-site-packages spotseeker-web
-
Activate your virtualenv:
cd spotseeker-web source bin/activate
-
Install required Python packages with pip:
$ pip install -r requirements.txt
-
Create a django project in spotseeker-web dir:
$ django-admin.py startproject spotseeker .
-
Modify at least the following settings in spotseeker/settings.py:
- ADMINS
- DATABASES
- MEDIA_ROOT
- MEDIA_URL
- TEMPLATE_DIRS - needs to include the full path to (and including) spotseeker_web/templates
- INSTALLED_APPS (add spotseeker_web)
-
Map urls to the spotseeker_web app by adding the following to urlpatterns in spotseeker/urls.py:
url(r'', include('spotseeker_web.urls')),
-
Add static 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'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }), )
-
Add configuration to your settings.py needed to talk to a spotseeker rest server:
Required configuration (these also go in your settings.py):
SS_WEB_SERVER_HOST = 'http://hostname:port_number'
SS_WEB_OAUTH_KEY = 'your oauth key'
SS_WEB_OAUTH_SECRET = 'your oauth secret'
Optional configuration - with these your map will start centered on the UW Seattle campus:
DEFAULT_CENTER_LATITUDE = '47.655003'
DEFAULT_CENTER_LONGITUDE = '-122.306864'
DEFAULT_ZOOM_LEVEL = '15'
-
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