DEV Community

ashrafZolkopli
ashrafZolkopli

Posted on

Django Playbook

I think the official Django Tutorial have been indispensable when trying to learn Django. However sometime I feel that at least for me, I often need to flip through tutorial after tutorial to get that one piece of code that could help me reach a simple solution to a big problem. So this is my take on creating a play book. I don't know how many chapter it will take for me to create all playbook but my hope is that I can help new and veteran Django Developer find my way of sharing appealing and such will help even for a bit learn something new or revise an old idea.

I know my way is not necessary the best, but after going through a lot of trial and error, I think the things share here is what work best for me.

To just share snippets and code would be boring. So lets start with a simple but often overused example of the web. The famous 'To Do List'.

for this example to be useful, I think I need to state the objective of this 'TODO LIST'. Lets start with the basic,

User Requirement Spec.

1) Landing Page.

  • I guess this part is needed. What is a website without a landing page right?

2) Registrations Page and Login Page

  • User must be authenticated before He/She can start using the todo list.

3) Dashboard (To Do List Page)

  • User must be able to see unfinish todo list on his/her dashboard. At a glance, User will also able to update status of the To Do by clicking on either the update/delete/complete button.

4) Create List Page

  • Each item in the To Do list must have a title, date/time created, updated and completed, description of the item, and status. Urgency and Importance status.
  • To make it hard for attacker/hacker to try and abuse the system, each item must have a slug hash of randomly regenerated 20 alphanumeric + digits unique to each user.

5) Detail To Do Item Page

  • Display Detail of the Item
  • Add/Edit/Delete Comments

I think as Phase 1 of the project, this can be prove to be an excellent starting point.

Technical/Functional Spec

1) User Identification

Django came with an amazing User Authentication and Authorization Module build-in. I would leverage this to get the project running first. Slowly maybe as it seems fitting we will improve upon this as and when is required.

2) To Do App

This is where the customization of the system is required.
under the To Do App, I would create 2 different Class. One would be a ToDo Class and also a Comment class.

I think with the project requirement layed out like this, Its should be easy to now work with the project.

Oldest comments (0)