Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Installation for Developers

abztrakt edited this page Apr 26, 2012 · 6 revisions

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.

Prerequisites

  • A Python installation
  • pip
  • git

Step-by-step

  1. If you don't have it already, install virtualenv:

    $ pip install virtualenv
    
  2. Clone the spotseeker-web repository

    $ git clone git://github.com/vegitron/spotseeker-web.git
    
  3. Turn spotseeker-web into a virtualenv:

    $ virtualenv --no-site-packages spotseeker-web
    
  4. Activate your virtualenv:

    cd spotseeker-web
    source bin/activate
    
  5. Install required Python packages with pip:

    $ pip install -r requirements.txt
    
  6. Create a django project in spotseeker-web dir:

    $ django-admin.py startproject spotseeker .
    
  7. Modify at least the following settings in spotseeker/settings.py:

    • ADMINS
    • MEDIA_ROOT
    • MEDIA_URL
    • TEMPLATE_DIRS - needs to include the full path to (and including) spotseeker_web/templates
    • INSTALLED_APPS (add spotseeker_web)
  8. Map urls to the spotseeker_web app by adding the following to urlpatterns in your project's urls.py:

    url(r'', include('spotseeker_web.urls')),
  9. Add configuration to your settings.py needed to talk to a spotseeker rest server:

Required configuration:

SS_WEB_SERVER_HOST = 'http://hostname:port_number'
SS_WEB_OAUTH_KEY = 'your oauth key'
SS_WEB_OAUTH_SECRET = 'your oauth secret'

Optional configuration - without 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'
  1. You should now be able to run your development server:

    $ python manage.py runserver
    
Clone this wiki locally