This repository stores the web application for CRIPT: the Community Resource for Innovation in Polymer Technology.
- Create a new directory to store the project in, navigate to the directory, and create a virtual environment inside it:
python3 -m venv venv - Activate the virtual environment:
source venv/bin/activate- To install packages into the virtual environment:
pip install -r requirements.txt - To export packages from the virtual environment:
pip freeze > requirements.txt - To deactivate the virtual environment:
deactivate
- To install packages into the virtual environment:
- To run the project, navigate inside the directory with
manage.pyand usepython manage.py runserver. The page will be viewable athttp://127.0.0.1:8000- To quit the server, use
control-c
- To quit the server, use
- After making changes to models, the models can be "migrated" to the database using
python manage.py makemigrations;python manage.py migrate
- in the directory with
manage.py, create a new app usingpython manage.py startapp baseappwherebaseappis the name of the app - create a view for the app in
baseapp/views.py - map the view to a URL using a
URLconf. this should be inbaseapp/urls.py - now we need to point the root
URLconfat thebaseapp.urlsmodule. Indsite/urls.py, add an import fordjango.urls.includeand insert the app in the urlpatterns list
- Current
criptdata model requires user access to theDB password, and potential manual addition of each new user - Current
criptdata model requires user to have access first to create a user node for themself - Users should be able to autonomously
- create accounts (which gives them API access)
- edit their login password and details
- create collections and upload data through their credentials