The Event Management System is a web application designed to help users create, manage, and attend events. It provides various functionalities for users, event hosts, and superusers, allowing efficient event organization and participation.
- User registration, login, and profile management.
- Host creation with capabilities to create, update, and delete events.
- Event management with capacity handling and attendee registration.
- Superuser privileges for managing users, hosts, and all events.
- Upcoming events listing for both users and hosts.
- Custom permissions based on user roles (user, host, superuser).
- Filtering, searching, and pagination for events.
-
User
- Can register, update, delete their account.
- Can create a host profile if they want to host events.
- Can register for events and view upcoming events they are attending.
-
Host
- Can create, update, delete, and manage events.
- Can view upcoming events they are hosting.
-
Superuser
- Can delete user accounts and events.
- Can view all users, hosts, and events in the system.
- Event Management: Hosts can perform CRUD operations on their events.
- User Registration for Events: Users can register for events, and event capacity is managed accordingly.
- Filtering and Search: Events can be searched and filtered based on various criteria (e.g., date, location).
- Custom Permissions: Role-based permissions for different functionalities ensure security and proper access control.
- Backend: Django, Django REST Framework (DRF)
- Database: PostgreSQL
- Authentication: Simple JWT (JSON Web Token)
- Clone the repository:
git clone <repository-url>
- Install the dependencies:
pip install -r requirements.txt
- Set up the PostgreSQL database:
# Example PostgreSQL setup CREATE DATABASE event_management_db; CREATE USER event_user WITH PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE event_management_db TO event_user;
- Apply migrations:
python manage.py migrate
- Run the server:
python manage.py runserver
-
User Endpoints:
GET /users/
- List all usersGET api/accounts/user/{username}/
- Retrieve a specific userPUT api/accounts//user/{username}/
- Update a specific userPATCH api/accounts//user/{username}/
- Partially update a specific userDELETE api/accounts/user/{username}/
- Delete a specific user
-
Host Endpoints:
GET api/accounts/hosts/
- List all hostsPOST api/accounts/host-profile/
- Create a new hostGET api/accounts/host-profile/{username}/
- Retrieve a specific hostPUT api/accounts/host-profile/{username}/
- Update a specific hostPATCH api/accounts/host-profile/{username}/
- Partially update a specific hostDELETE api/accounts/host-profile/{username}/
- Delete a specific host
-
Authentication Endpoints:
POST /register/
- User registrationPOST /login/
- User loginPOST /logout/
- User logout
-
Events App Endpoints:
-
POST api/events/create/
- Create a new event -
DELETE api/events/{pk}/delete/
- Delete a specific event -
GET api/events/{pk}/detail/
- Retrieve details of a specific event -
GET api/events/upcoming/user/
- List all upcoming events for the authenticated user -
GET api/events/upcoming/host/
- List all upcoming events for the authenticated host -
GET api/events/all/
- List all events (only allowed for super user) -
POST api/events/{event_id}/attend/
- Register for a specific event
Feel free to open issues or pull requests if you find any bugs or have suggestions for improvements.
This project is licensed under the MIT License - see the LICENSE file for details.