A simple solution for keeping track of all your gift desires. Whether you're planning your next big gift or just organizing your personal wish list, this project has got you covered. Dive into the details and see how you can make your wishlist both stylish and functional.
📸 Screenshots
Screenshot of the Django admin interface where you can manage users and wishlist items.
How the site appears to users who are not logged in.
Example of how the wishlist looks on a mobile device.
🚀 Quick Start
-
Clone the repository, navigate to the project directory, and create a
prod.env
file:git clone https://github.com/Mikhail11235/fishy_wishes.git cd fishy_wishes
Create a
prod.env
file with the necessary environment variables. Example:HOST=YOUR_HOST PGNAME=YOUR_DB_NAME PGUSER=YOUR_DB_USER PGPASSWORD=YOUR_DB_PASSWORD PGHOST=db PGPORT=5432 DJANGO_SUPERUSER_USERNAME=YOUR_DJANGO_SUPERUSER_USERNAME DJANGO_SUPERUSER_EMAIL=YOUR_DJANGO_SUPERUSER_EMAIL DJANGO_SUPERUSER_PASSWORD=YOUR_DJANGO_SUPERUSER_PASSWORD
-
Start Docker Compose:
- To start the application with Docker Compose, use:
docker-compose --env-file prod.env up -d --build
- For local development with debugging enabled, modify the
local.env
:
HOST=* PGHOST=localhost
Set
DEBUG=True
LOCAL=TRUE
insettings.py
Then start the application:
python3 manage.py runserver
-
Run database migrations, collect static files, and compile messages:
docker-compose exec web python manage.py wishlist makemigrations docker-compose exec web python manage.py migrate docker-compose exec web python manage.py collectstatic docker-compose exec web django-admin compilemessages
🌐 How to Use
-
Open your browser and go to:
http://your_domain
-
Browse your wishlist, add and remove items as you like.
-
Add a separate user for gift booking:
- Log in to the Django admin interface using your superuser credentials.
- Go to the "Users" section and click "Add User".
- Enter a username and password for the new user, then click "Save".
This new user will now be able to manage gift bookings. 🎁
🛠️ Setting Up a System Service
-
Create a systemd service file:
sudo nano /etc/systemd/system/wishlist.service
Add the following content to the file:
[Unit] Description=Wishlist Service After=network.target [Service] Type=simple WorkingDirectory=/path/to/your_project ExecStart=/usr/local/bin/restart-wishlist.sh ExecReload=/usr/local/bin/restart-wishlist.sh Restart=on-failure RestartSec=120 User=your_user Group=your_group [Install] WantedBy=multi-user.target
Replace
/path/to/your_project
,/usr/local/bin/restart-wishlist.sh
,your_user
, andyour_group
with the appropriate values for your setup. -
Create the restart script:
sudo nano /usr/local/bin/restart-wishlist.sh
Add the following content to the script:
#!/bin/bash cd /path/to/your_project /usr/local/bin/docker-compose --env-file prod.env down /usr/local/bin/docker-compose --env-file prod.env up -d --build
Make the script executable:
sudo chmod +x /usr/local/bin/restart-wishlist.sh
-
Reload systemd and start the service:
sudo systemctl daemon-reload sudo systemctl enable wishlist.service sudo systemctl start wishlist.service
-
Check the status of your service:
sudo systemctl status wishlist.service
This project is licensed under the MIT License. If you have ideas for improvements or want to help with development, feel free to create a Pull Request or open an Issue.