-
Notifications
You must be signed in to change notification settings - Fork 3
Installation instructions
This is our recommended installation for developers who wish to contribute to SQLShare 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
-
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 sqlshare repository
$ git clone git://github.com/vegitron/sqlshare.git -
Turn sqlshare into a virtualenv:
$ virtualenv --no-site-packages sqlshare -
Activate your virtualenv:
cd sqlshare source bin/activate -
Install required Python packages with pip:
$ pip install -r requirements.txt -
Create a django project in the sqlshare dir:
$ django-admin.py startproject ss_project .That '.' at the end is important!
-
Modify at least the following settings in ss_project/settings.py:
- INSTALLED_APPS ('sqlshare')
- SQLSHARE_SECRET
SQLSHARE_SECRET should have the value used in the Authorization header, that looks like this: ss_trust <username> : <SQLSHARE_SECRET>
-
Map urls to the sqlshare app by adding the following to urlpatterns in ss_project/urls.py:
In the content below, make sure you replace with the actual path.
url(r'^sqlshare/', include('sqlshare.urls')), url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
-
Create your database:
$ python manage.py syncdb -
Create yourself a user:
https://docs.djangoproject.com/en/dev/topics/auth/default/#user-objects
-
You should now be able to run your development server:
$ python manage.py runserver