-
Notifications
You must be signed in to change notification settings - Fork 6
Server Setup
Home >> Server Setup
The server uses Django which is a Python web framework.
Installing Briefcase
-
Install Python, at least version 2.7
Debian / Ubuntu
sudo apt-get install python2.7
-
Then Install Django
Debian / Ubuntu
sudo apt-get install python-pip
sudo pip install Django
-
In console go to the serverSide/ folder and run
python manage.py syncdb
. This will set up the database. When prompted create a new admin user. You can also runconfigure_database.sh
. If this is the first time that you have installed django you may need to create a new superuser. -
also in console type
python manage.py runserver
. This will start the server. If not running on local host put your server information in after runserver (ie pythonmanage.py runserver briefcasedocs.com:8000
) -
Go to the admin directory
/admin
(ielocalhost:8000/admin
)and create a user profile corresponding to your admin user. When you click the user profiles link there will be a drop down box with a plus next to it. Drop down in the box to your admin user and click save.
Django requires absolute paths but currently the settting file grabs the relative path of the Briefcase folder and uses that as the reference for absolute paths. If you change the file structure of Briefcase go into the serverSide/settings.py
file and change the absolute path variable to reflect the new absolute path
Now you should be ready to run your server in development phase.
In order to run your server in production phase please read below. We will have more instructions for this when we have implemented these changes ourselves.
Managing static files: https://docs.djangoproject.com/en/dev/howto/static-files/
Using Django with Apache and mod_wsgi: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#