• Stars
    star
    277
  • Rank 148,008 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A heavily commented Django project dedicated to teaching the framework or refresh one's memory.

Django, an app at a time

A heavily commented Django project dedicated to teaching the framework or refresh one's memory. Each app demonstrates a few essential Django features so you can see how it all fit together by looking at the code and testing the result in your browser. There is nothing do except run and read.

Currently:

  • Project : see how settings and urls.py work
  • App 1: hello world
  • App 2: hello again
  • App 3: basic routing
  • App 4: creating links
  • App 5: GET, POST and cookies
  • App 6: templates, tags and filters
  • App 7: static files
  • App 8: reusable app

What's to come:

  • ORM
  • Forms
  • Authentification
  • Admin
  • Command
  • Translations

How to use?

Download and extract this project, and run:

python ./manage.py runserver

You can ignore the "You have 15 unapplied migration(s)." warning.

You don't need to install anything.

Go to the URL http://127.0.0.1:8000 and play with the apps.

When you want to see how it works, go to the "apps" directory and watch the commented source code.

Each app assumes you understand the previous ones, and contains a README to guide you.

Download links:

What's in there?

  • "apps" : contains all the applications, sorted by complexity and requirements. This is what you want to read.
  • "project": the Django project itself, containing settings and the main URL routes definition. You should have a look in there from time to time, it puts the apps in context and contains some tips.
  • "ignore_this_dir": stuff to make it work that you don't need to know about.
  • "manage.py": the command to interact with the Django project. This one is a bit modified so don't replace it.
  • ".gitignore": a configuration file for git. You don't need this for Django. It's here to help me.

Notes

In a real project, you WOULD have to install something. Dependencies are provided here for convenience, dumped in ignore_this_dir/, but you would definitely use pip and virtualenv in a real project.

By the way, this is NOT a tutorial. The purpose is not to replace a full course about how Django works, but rather to give you a concrete example on how each task can be achieved with Django.

Translations and spell corrections welcome!

More Repositories

1

django-quicky

A collection of toys to skip the forplay with Django and go straight to the point: url and view decorators.
Python
371
star
2

devpy

Devpy is a set of tools to ease Python development, providing automatic logging
Python
142
star
3

VizHash.js

A javascript implementation of visual hash using html5 canvas
JavaScript
51
star
4

minibelt

One-file utility module filled with helper functions for day to day Python programming
Python
43
star
5

Bat-belt

A collection of gagdets make Python even more powerful
Python
33
star
6

codes-des-articles

Codes des articles du blog sam et max
Python
17
star
7

miroir-du-blog

Miroir du blog et des tweet de sam et max pour consultation hors ligne
HTML
14
star
8

LiveCss.js

Automatically reload newly changed css files without reloading the page
JavaScript
12
star
9

multiboards

JavaScript
9
star
10

jQuery-Visual-Password

A jquery plugin to create visual hash of the value of a password field as it is typed
Shell
9
star
11

templite

A light-weight, fully functional, general purpose Python templating engine that fits in one single file
Python
7
star
12

requests-twisted

Twisted adapter for the requests library
Python
7
star
13

allthatcounts

Countdown + chrono + game clocks + counters in one a page pure JS app for mobile and desktop, with an offline mode
JavaScript
6
star
14

sm_lib

Ce module proclame la bonne parole de sieurs Sam et Max.
Python
5
star
15

crack_the_safe

Un jeu temporaire pour le blog sam et max
Python
1
star
16

manga-reader.js

A bookmarklet that ease Manga reading on sites like mangareader.net, mangafox.me, mangahere.com, etc.
JavaScript
1
star