The backend portion of slugline
, mathNEWS's best and only Django/React based publishing website.
- Create a
virtualenv
by runningvirtualenv <environment location>
. Python 3.7+ is recommended. Depending on your OS run the following to activate the virtualenv:- Windows:
<environment location>/scripts/activate
- Linux:
source <environment location>/bin/activate
- Windows:
- Run
pip install -r requirements.txt
to download dependencies. - Create the database with
./manage.py migrate
. - Create a superuser with
./manage.py createsuperuser
. Then run./manage.py runserver
to start the backend. If you want to fiddle with the data, go tolocalhost:8000/admin
and login with your superuser credentials. - By default, this runs on port 8000. If you change this, be sure to go over to the front-end and change the port setting there.
If you have a XML dump from the mathNEWS WordPress handy, you can preload the database with it. Just run ./manage.py wordpress <xml_file>
and it'll load in the articles in the dump. However, the articles are not perfect, and should be cleaned up before being made visible to the public.
Submit a pull request or something.