A secret santa web application using Django. This is the final project for CS50's Web Programming with Python and Javascript.
- Your web application must be sufficiently distinct from the other projects in this course (and, in addition, may not be based on the old CS50W Pizza project), and more complex than those.
- A project that appears to be a social network is a priori deemed by the staff to be indistinct from Project 4, and should not be submitted; it will be rejected.
- A project that appears to be an e-commerce site is strongly suspected to be indistinct from Project 2, and your README.md file should be very clear as to why it’s not. Failing that, it should not be submitted; it will be rejected.
- Your web application must utilize Django (including at least one model) on the back-end and JavaScript on the front-end.
- Your web application must be mobile-responsive.
- Python Django
- Javascript
- Bootstrap
- Font Awesome (https://fontawesome.com/license)
- Login/Register
- Only registered users can create groups / join groups
- Login to create a group
- Secret Santa Groups
- Requires at least 3 people - will prompt for addition of more members when there's less than 3 people in the group)
- View all the groups that the user participates in
- Become the organiser or a member
- Set rules such as budget, exchange date and message for the group
- Editing of group information including addition or removal of members after generating the secret santa list
- Dynamic reshuffling of secret santas if there's removal/addition of members after drawing of names
- Browse
- Choose group wishlist
- Browse through the different possible gifts of different categories
- Like a gift to add to wishlist
- Wishlist
- Only secret santa of the user can see the user's wishlist
- Adding of extra note for the user's secret santa
- Adding / Removal of gifts that can be selected from the Browse page
This project is distinct and more complicated from all previous projects because:
- Customised notification system for each user (be it for members of a group or the organiser)
- Smart secret santa algorithm to select the secret santa for each person (dynamically changes the secret santas when there's a change in the listing - reshuffling)
- Nesting of html files (svg animation) inside another html file
- Components (such as editing of pages) shows up only when needed (prevent cluttering of page)
- Appropriate usage of animation when needed, shadows (texture) to achieve a Neumorphic clean user interface
- More models with complex relation between them
- Creation of HTML elements in javascript and the setting of their attributes
- Mobile Responsive
secretsantas- main application directorymodels.py- Contains the following models used for the projectUser- An abstract model with additional attributesorganiserandgroupGroup- the user's group/s. Can have multiple groupsCategory- Gift categoriesGift- to be added to wishlistWishlist- can be edited by user and can only be viewed by user and user's secret santaLike- like/unlike a gift to be added/remove from wishlistAlert- Customised notification for user
urls.py- Contains all url pathsviews.py- Contains all view functionsadmin.py- Django admin site (for manipulation of DB)static/secretsanta- contains all static contentstyles.css- styling of html filesalert.js- contain code to mark notification as read (used ingroups.htmlandgroup.html)browse.js- contain code to load the correct likes, group, addition and removal of gifts from wishlist, liking of gifts, as well as editing of wishlist noteedit.js- contain code for editing of group information as well as addition and removal of members from groupsantas.js- contain code for adding of input field for user to add more members- all files with file extension
.svgare vector images used for the project
templates/secretsanta- contains all application templates -browse.html- page for user to browse the different gifts of different categories and add them to their wishlistchoose.html- page for user to add members and other information to generate a groupgroup.html- individual group information page containing information as budget and exchange date, user can edit the information as well as add/remove membersgroups.html- user's groups which contains information such as whether the group/s have been shuffled and how many members in each group, user can click on the 'more info' button to go intogroup.htmlindex.html- landing page which informs users what is the application about and the ruleslayout.html- base template. All other templates extends from itlogin.html- login pageregister.html- registration page- following html files are svg animation used for the project
about.htmlbox.htmlchristmastree.htmldecoration-top.htmlno_wishlist.htmlno_group.htmlrules.htmlstocking.html
- Install Django if it was not installed by running:
pip install -r requirements.txt python3 manage.py makemigrationspython3 manage.py migratepython3 manage.py runserver
python3 manage.py createsuperuser- Add username, email and password
The project's video: https://youtu.be/8Qy0DonNG6I