A small app listing travel destinations on my bucket list, places I have visited, and filtering for the next adventure.
Built with:
bucketlist-preview-github.mp4
These instructions will provide you a copy of the project that you can run locally. Visit PythonAnywhere to set up a free account if you would like to host.
Step 1: Open Git Bash and change the current working directory to the location where you want the cloned directory.
git clone git@github.com:vwingardh/BucketList.git
Step 2: Create a virual environment for web app.
python -m venv venv
Step 3: Activate virtual environment with following command.
venv\Scripts\activate
Step 4: Install all packages in requirements.txt file in project directory.
pip install -r requirements.txt
Step 5: By default Django uses SQLite, this app uses PostgreSQL. To use SQLite, change the database code in settings.py to:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
Otherwise, create a PostgreSQL database using pgAdmin and configure NAME and PASSWORD to that of your newly created PostgreSQL database.
Step 6: Generate a new secret key and add to SECRET_KEY in settings.py. Django secret keys can be generated using Djecrety.
Step 7: Create a .env file in the root directory (where manage.py is) to secure secret key and database credentials.
Step 8: Delete existing migrations and migrate to new database.
python manage.py makemigrations
python manage.py migrate
Step 9: Create a superuser for access to the admin panel. One user is needed to create the destinations, please note that this app was designed to only allow one user.
python manage.py createsuperuser
Step 10: Start the development server and ensure there are no errors.
python manage.py runserver
That's it, you're all set!