-
Notifications
You must be signed in to change notification settings - Fork 227
Setting up RMG website
You should have RMG-Py
already installed.
Clone the RMG-website
repo into your local folder.
The following command will update your rmg_env
environment with the necessary packages for RMG-website
source activate rmg_env
cd RMG-website
conda env update
You may need to update django to 1.8.5 manually because we only have 1.8.4 on the anaconda channel:
pip install django==1.8.5
If running the website for the first time, enter the commands
cd RMG-website
python manage.py syncdb
python manage.py runserver
Now the website should appear on your localhost, you can visit it in any browser using the url: http://127.0.0.1:8000/
When you rebuild any Model
class within a models.py file, you have to recreate the sql tables. Which is a huge pain and a bigger pain now that we upgraded to django 1.8.5.
First rebuild the sql database for that module. For instance if you changed rmgweb/rmg/models.py
, the module name is rmg
.
-
Generate sql commands for dropping the tables:
python manage.py sqlclear rmg
-
Copy the section starting with
BEGIN
and ending withCOMMIT
. -
Start the database shell:
python manage.py dbshell
-
Paste the copied commands, then use
CRTL+D
to exit. -
Regenerate the tables and start the server:
python manage.py syncdb python manage.py runserver