The FundProjects_Django Platform is a web application built to enable shared funding for various projects. Admin users have exclusive access to the admin page, where they can create and manage projects. The project details, including a description in HTML syntax, are entered in the admin site and rendered on the frontend. To enhance the frontend design, Bootstrap was utilized.
Registered users can browse through the available projects and choose to either follow or contribute financially to the ones they find interesting. Contributions are made without actual money transfer, but the entire functionality with forms, models, and logic has been implemented.
User authentication is required for making bookings or following projects. Django's session-based authentication is employed, allowing users to log in using their username and password.
Key Features:
Admin Functionality: Admin users can log in to the admin site, view all projects, and create new ones. Projects that have reached the required funding threshold are highlighted in green, while others are marked in red.
Bookings and Extensions: Authenticated users can make bookings for projects. Each booking is valid for 60 days. The admin has a button for each booking, triggering the sending of a booking extension email to the respective user. The email contains a unique link (valid only for 24 hours) that only the user can access, allowing them to confirm an extension for another 60 days for their booking.
Followers and Booking Requests: Each project displays a tabular list of bookings and followers. The admin can send booking request emails to followers using a button for each follower. The email contains a link that directs the follower to their specific booking page. This functionality required the injection of HTML buttons into tabular fields, enabling proper requests to the views using CSS and JavaScript.
User Experience: The frontend is styled using Bootstrap, providing a visually appealing and user-friendly experience. The colorful buttons and improved overview enhance the usability and readability of the platform.
Users need to be asigned to the admin group in the admin panel in order to make bookings. The eamils will be only sent if the users actually have an email address.
Technologies Used: Django, Python, JavaScript, AJAX, CSS, Bootstrap, HTML
The necessary steps to make the program work:
- Install the Python version as stated in runtime.txt (python-3.11.1)
- Navigate in the main folder and install the required libraries from requirements.txt using the following command:
pip install -r requirements.txt - Change the name of .env.example to .env.
- Define the Django environmental variables in .env (https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-SECRET_KEY):
Before using the program, we need to create a Gmail account that the program can use and generate an app_pssword for our account (https://help.prowly.com/how-to-create-use-gmail-app-passwords). - this is for the emails sendig!
DJANGO_SECRET_KEY="YOUR_DJANGO_SECRET_KEY"
MY_SENDER_EMAIL="EXAMPLE.USER@gmail.com"
MY_SENDER_EMAIL_GMAIL_APP_PASSWORD="GMAIL_APP_PASSWORD"
The step 5 and 6 only needed if we want to eraser the database and create our own. The projects comes already with a sqlite3 database with some data, this way it is ready to play with right away!
- Run django migrations (https://docs.djangoproject.com/en/4.1/topics/migrations/).
- python manage.py makemigrations
- python manage.py migrate
- Create a superuser - the admin for the website.
- python manage.py createsuperuser
The last step is to run the porgram.
- Now you can start the website with:
- python manage.py runserver
This will start the server in your local machine; the address will be something like: http://127.0.0.1:8000/, and this is where your website will be ready to play with.
USER DATA in the current database for authentication:
username: admin
password: admin
username: tester1
password: asdfghjkl;'
username: tester2
password: asdfghjkl;'
username: tester3
password: asdfghjkl;'
Example views from the website:
Main Website - without any projects.
Main page with listed 2 projects.
Admin page overview - projects.
Admin page - project detail view.
Admin page - project detail view - sending booking requests extensions.
Email that the user would recive with the link to extend teh booking.
The users has to login after clicking the link to get authenticated.
Then the user has to confirm extending the booking.
Confirmation that the bookign was extended.
Now the booking date was changed which we can see on the booking website.
Sending a request for booking to a follower.
Email that the follower would get with a link to the booking page for that project.
The program was developed using python 3.11.1, Django 4.1, database - sqlite, python-dotenv, Bootstrap, HTML, JavaScript with AJAX request