PhotoFlow is a Django-based photography studio booking system. It allows clients to browse studios, services, and photographers, then create and manage photo-session bookings.
This is a learning project built as part of a Python backend course. It is not a production service.
-
User registration, login, and logout
-
Two user roles: client and photographer
-
Studio catalogue with detail pages
-
Photographer catalogue with detail pages
-
Service catalogue
-
Search for studios, services, and photographers
-
Pagination for catalogue pages
-
Photo-session booking
-
Booking validation:
- bookings cannot be created for past dates
- the number of people cannot exceed studio capacity
- studio and photographer time conflicts are prevented
-
Role-based booking lists:
- clients see bookings they created
- photographers see sessions assigned to them
-
Django admin panel
-
Responsive Bootstrap interface
-
Separate CSS files for individual pages
The project uses a custom user model based on Django's AbstractUser.
Available roles:
clientphotographer
Users registered through the public signup page are created with the client role.
Stores information about a photography studio:
- name
- description
- price per hour
- capacity
- image
Stores information about a photography service:
- name
- description
- price
- duration
Connects a client, photographer, studio, and service.
A booking contains:
- client
- photographer
- studio room
- service
- date
- start time
- duration
- number of people
- status
- comment
git clone https://github.com/Lemonch1ks/PhotoFlow.git
cd PhotoFlowTo work with the development branch:
git checkout developWindows:
python -m venv venv
venv\Scripts\activateLinux or macOS:
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython manage.py migratepython manage.py createsuperuserpython manage.py runserverOpen the application in your browser:
http://127.0.0.1:8000/
The admin panel is available at:
http://127.0.0.1:8000/admin/
| Route | Description |
|---|---|
/ |
Home page |
/sign-up/ |
User registration |
/accounts/login/ |
Login |
/accounts/logout/ |
Logout |
/studios/list/ |
Studio list |
/studios/<id>/ |
Studio details |
/studios/<id>/book/ |
Create a booking |
/service_list/ |
Service list |
/photographers/ |
Photographer list |
/photographers/<id>/ |
Photographer details |
/bookings/ |
Current user's bookings |
/admin/ |
Django admin panel |
Login and logout are provided by Django's built-in authentication views.
The project includes custom templates:
templates/registration/login.html
templates/registration/logged_out.html
templates/registration/sign_up.html
After successful signup, the new user is automatically logged in and redirected to the home page.
- A client signs up or logs in.
- The client opens the studio catalogue.
- The client selects a studio.
- The client chooses a photographer and service.
- The client selects the date, start time, and number of people.
- The form validates the booking data and checks for scheduling conflicts.
- A booking is created with the
Pendingstatus. - The client can view the booking on the My bookings page.
- The selected photographer can view the session in their booking list.
Only users with the client role can create bookings.
Search is implemented with the q query parameter:
/studios/list/?q=studio
/service_list/?q=portrait
/photographers/?q=alex
Catalogue pages display six items per page.
Pagination preserves the active search query.
Run all Django tests:
python manage.py testRun tests with pytest:
pytestRun only view tests:
pytest flow/tests/tests_views.pyCheck the Django configuration:
python manage.py checkRun Flake8:
flake8Static files are stored in:
static/
Uploaded images are stored in:
media/
During local development, Django serves media files when DEBUG=True.
- Application views use Django class-based views.
- List pages use
ListView. - Detail pages use
DetailView. - Registration uses
FormView. - Booking creation uses
CreateView. - Protected pages use
LoginRequiredMixin. - Booking permissions use
UserPassesTestMixin.