Django café banner

Django café

2 devlogs
10h 41m 41s

A testing café management system I created in Django. This was created as a learning project to practice coding in Django. It's a café management system where each table gets it's own unique QR code which the customers can scan and can order produ…

A testing café management system I created in Django. This was created as a learning project to practice coding in Django. It’s a café management system where each table gets it’s own unique QR code which the customers can scan and can order products which can be added and/or changed in the admin panel of the Django app. Then there’s the staff panel, which staff users can log into and they can see live orders, accept them, see orders that are accepted and should me made and they can mark them as completed and then they can view missed or completed or declined orders.

This project uses AI

Used GitHub copilot for code completion and Gemini for writing text.

Demo Repository

Loading README...

imst

Adding a second time tracker which I forgot to add before where I was writing the documentation and also finished created the docker file which is fully working now and the app is dockerized and can be run thanks to it basically anywhere.

Attachment
Attachment
0
imst

In this devlog, I created the whole app. I created the architecture in Django, where I edited the urls.py file to add endpoints to the specific sites the application will be hosting. I also edited the settings file to use the .env file to be more secure and also add the django qr code library to then make the qr code generation work. Furthermore I linked the PostreSQL database to the django app inside this settings file for it to work properly with the database. Now for the actual app, I created the needed views for django which range from the specific table websites which the customer can access, order drinks with specific drink types, view their orders and track them and see if they got accepted/completed/rejected or missed. This also uses a predefined .html template I created using the bootstrap CSS framework to make the designing a bit quicker. I then created the staff panel website in a similar way, I created some logic in the views file to pass through some information from the backend into the frontend, and then created the html template file which has some JS code to make fetching from the backend continuous and work good, the same way the table template has it. There’s also logic for the time updates on the orders. The backend does this logic and it updates and checks for these time constraits every time someone fetches the orders. Lastly, I created a website to login to the staff panel where users log in with their username and password. the password is securely hashed on the backend and it’s then stored as a hash on the database. I then also edited the admin page so that it’s possible to create new things, I added some constraints to models so specific types have to be used and also linked through the drink type and the drink. I then also created a custom migration to create a test admin user. The last thing that completes this whole project is unit testing, where I’m testing different things about this app including model integrity, time constraints.

Attachment
Attachment
Attachment
0