This site was built using the Django web framework (v2.0.8). Each section has been implemented within separate apps, each detailed in this documentation. The code is available on github. If you are unfamiliar with Django, you can find out more on the official doc site: docs.djangoproject.com
- accounts (User account registration, sign in/out and profile)
- cart (New features and feature upvote purchases)
- checkout (Process payments using Stripe)
- comic_strip (Build Customised comic strips)
- forum (Define and comment on topics for discussion)
- productivity (Graphs summarising tickets raised over time)
- tickets (Raise bugs/features with upvotes/comments)
User sign in/out and registration and profile display. The login_required decorator is used across several apps to redirect signed out users to the login page with a subsequent redirection back to the page where the access attempt took place. This is based on a modified user model that uses email address + password authentication instead of user id and password.
Models: MyUserManager and User
- "login" - email address and password sign in
- "register" - full name, email address and new password
The cart is for users to purchase feature upvotes and to request new features. Browser session variables are used to populate the cart before ultimately populating the backend database via the checkout app.
- "cart" - listing of all features/upvotes in the current session
- "adjust-cart/< title of ticket >" - adjust the price of a new feature
- "adjust-upvote-cart/<ticket id>" - adjust the amount on offer for an upvote
Gathers cart contents and generates a single Stripe transaction. Providing a successful payment, this stores the transaction in the backend (excluding payment details) and empties the cart.
- "checkout" - listing of all features/upvotes in the current session
Signed in users can add a new comic strip and add new frames to their own comic strips. Guests can view the overall comic strip listing and view individual comic strips.
Models: ComicStrip and ComicStripFrame
- "/" - home page - view a paginated listing of all comic strips
- "add" - add a comic strip
- "view/< comic strip id >" - view a comic strip
- "add-frame/< comic strip id >" - add a comic strip frame
A simplified forum allowing user based discussion on comic related topics. Guests can only view forum topics and comments.
Models: ForumTopic, ForumComment and ForumCommentReply
- "forum" - list of forum topics
- "add-topic" - add a new forum topic
- "view/< topic id >" - view all comments for a forum topic
- "add-comment/< topic id >" - make a comment on a forum topic
- "reply/< comment id >" - reply to a comment within a forum topic
Bugs can be raised by signed in users. Similarly, new features can be requested - these need to be paid for so this app ties in with the cart and checkout apps. Users marked as staff can edit tickets to update their status and enter the implemented/proposed solution or next steps.
Models: Ticket, TicketUpvoter and TicketComment
- "tickets" - paginated listing of all bugs and features, sorted by descending upvotes
- "add" - add a comic strip
- "edit/< ticket id >" - edit a ticket (staff only)
- "view/< ticket id >" - view a ticket, user has access to upvote and comment from here. A paginated list of comments is available.
- "upvote/< ticket id >" - upvote a ticket, only one upvote is allowed per user
- "comment/< ticket id >" - comment on a ticket, no user limit on comments
All of the views are documented by comments in the code, which should suffice for a good level of understanding of each view. Here is a brief overview of all views:
login, logout, register
Email/password authentication for signing in and registration using Djangos built in authentication module: django.contrib.auth
view_cart, adjust_cart, adjust_upvote_cart
Listing of session based cart contents. There are two cart lists - one for new features and another for feature upvotes.
This generates a transaction based on cart contents and makes use of the Stripe API to charge the users credit card. For testing purposes you can use card number 4242424242424242. Assuming a successful payment is fed back from Stripe: save any new features as a ticket in the backend, similarly, any feature upvots need to be registered against the relevant ticket.
comic_strip_listing, comic_strip, comic_strip_add, comic_strip_frame_add
These views cover the end user product to generate custom comic strips: paginated listing of comic strips, ordered by title, view all frames within each comic strip (also paginated in the order added). Logged in users can also add comic strips and individual frames within a comic book. The user must be the owner of the strip to add new frames.
ticket_listing, ticket_view, ticket_add, ticket_edit, ticket_upvote, comment_add
For the ticket listing, bugs/features are order by descending upvotes so that the most popular tickets appear at the top. The ticket_add view performs differently for bugs and features. As bugs are free to add, they are simply added to the tickets and saved in the backend database. Features however must be paid for before they are considered. These are added to a shopping cart. Only upon checkout will a feature be committed to the backend and listed on the site.