A Django-based web application for literary reviews. LITRevu lets users request and publish reviews for books and articles, and subscribe to other users' feeds.
- Authentication: sign up, log in, and log out
- Tickets: create a review request for a book or article (with optional image upload)
- Reviews: respond to an existing ticket, or create a standalone review (ticket + review on a single page)
- Feed: display tickets and reviews from followed users and your own, sorted by date (paginated, 6 items per page)
- My posts: view and manage your own tickets and reviews (paginated, 6 items per page)
- Subscriptions: follow / unfollow other users; also see who follows you
- Business rules:
- A ticket can only receive one review (the button is hidden and the URL is blocked if a review already exists)
- A user cannot follow themselves
| Component | Version |
|---|---|
| Python | 3.13 |
| Django | 6.0.2 |
| Pillow | 12.1.1 |
| SQLite | (default) |
git clone https://github.com/Q1009/P9-LITRevu.git
cd P9-LITRevupython3 -m venv env
source env/bin/activate # macOS / Linux
env\Scripts\activate # Windowspip install -r requirements.txtcd litrevu
python manage.py migratepython manage.py runserverThe application is available at http://localhost:8000/.
The project uses flake8 to check code style. Make sure the virtual environment is activated, then run the following command from the project root:
flake8 --format=html --htmldir=flake-reportThis generates an HTML report in the flake-report/ folder. Open flake-report/index.html in a browser to view the results.
To run a quick check in the terminal without generating a report:
flake8P9 - LITRevu/
├── requirements.txt
├── env/ # Virtual environment (not versioned)
└── litrevu/ # Django root
├── manage.py
├── db.sqlite3
├── media/ # User-uploaded images
├── static/
│ └── styles.css
├── templates/
│ └── base.html
├── litrevu/ # Project configuration
│ ├── settings.py
│ ├── urls.py
│ └── wsgi.py
├── authentication/ # App: sign up / log in
│ ├── models.py # Custom user model
│ ├── views.py
│ ├── forms.py
│ └── templates/
└── flux/ # App: tickets, reviews, subscriptions
├── models.py # Ticket, Review, UserFollows
├── views.py
├── forms.py
├── urls.py
├── templatetags/
│ └── flux_extras.py # Custom filters (rating_stars, model_type)
└── templates/
| URL | Description |
|---|---|
/ |
Login page |
/signup/ |
Sign up |
/flux/home/ |
Feed from followed users |
/flux/posts/ |
My tickets and reviews |
/flux/subscriptions/ |
Subscription management |
/flux/create-ticket/ |
Create a ticket |
/flux/edit-ticket/<id>/ |
Edit / delete a ticket |
/flux/create-review/ |
Create a standalone review |
/flux/create-review/<ticket_id>/ |
Create a review in response to a ticket |
/flux/edit-review/<id>/ |
Edit / delete a review |
| Field | Type | Description |
|---|---|---|
title |
CharField(128) | Book / article title |
description |
TextField(8192) | Description |
image |
ImageField | Image (UUID filename) |
author |
ForeignKey(User) | Ticket author |
date_created |
DateTimeField | Creation date |
date_edited |
DateTimeField | Last edit date |
| Field | Type | Description |
|---|---|---|
ticket |
ForeignKey(Ticket) | Associated ticket |
rating |
PositiveSmallInt | Rating from 0 to 5 |
headline |
CharField(128) | Review title |
body |
TextField(8192) | Review body |
user |
ForeignKey(User) | Review author |
time_created |
DateTimeField | Creation date |
time_edited |
DateTimeField | Last edit date (nullable) |
| Field | Type | Description |
|---|---|---|
user |
ForeignKey(User) | Subscriber |
user_followed |
ForeignKey(User) | Followed user |
The unique_together constraint prevents duplicate subscriptions.
python manage.py createsuperuserThe admin interface is available at http://localhost:8000/admin/.