Simple flashcard app for practicing flashcards. The application is written in Django. The main application code is located
in the main
directory. The unit tests can be found in main/tests/test_views.py
.
I use pipenv
for creating a virtual environment. This application
is written for Python 3.9
- Check if
pipenv
is installed by runningpipenv --version
, if it returns a version number, great! Otherwise install by runningpip install pipenv
- Navigate the terminal to the top level
ShortURL
directory containingmanage.py
- Start a pipenv with
pipenv shell
- Install the requirements with
pipenv install -r requirements.txt
- You can exit or close the newly created virtual environment with
exit
.
To start the application
- Start the virtual environment with
pipenv shell
- Create the database with
python manage.py migrate
- Start the application with
python manage.py runserver
- Start the virtual environment with
pipenv shell
- Run
python manage.py createsuperuser
- Follow the prompts to create a new superuser
The tests
- Start the virtual environment with
pipenv shell
- Sometimes the virtual environment needs to be restarted to make
sure pytest can recognize all installed packages. The virtual
environment can be exited with
exit
while in the virtual environment.
- Sometimes the virtual environment needs to be restarted to make
sure pytest can recognize all installed packages. The virtual
environment can be exited with
- Run the tests with
pytest