Origin
Simple-todo was first an example of a Chinese course in web.py. Later Uliweb author Limodou that this tutorial is very good, so there is uliweb version of the Simple-todo. Then there is the bottle version and the flask version. This has become a frameworksshow project. Since it's frameworksshow, there's no need for Django.
Simple-todo: A simple TODO program
http://simple-is-better.com/news/309
Simple Todo (Uliweb version) Tutorial by @limodou
http://simple-is-better.com/news/312
Simple-todo Bottle implementation by @zoomquiet
http://simple-is-better.com/news/509
Simple-todo Flask Implementation by @wyattwang
http://simple-is-better.com/news/524
Operational requirements
django>=1.3
Installation and operation
Initialize database: Python manage.py syncdb
Start: Python manage.py runserver
To use: Open http://127.0.0.1:8000/in the browser
Django Admin: Open http://127.0.0.1:8000/admin/in Browser
Project Development Record
Create a Django project and app:
django-admin.py startproject simple_todo_site cd simple_todo_site/ python manage.py startapp Simpletodo
Edit settings.py to complete the configuration of databases, templates, static files, and the main configuration entries:
#注: I think Django should add more default settings, and these configurations are annoying.
DATABASES
Installed_apps
Static_root
Staticfiles_dirs
Template_dirs
Edit urls.py Add the Django Admin and static file URL configuration.
Edit simpletodo/models.py to complete the data model:
From django.db import models from django.contrib Import admin class Todo (models. Model): title = models. Charfield (max_length=255) finished = models. Integerfield (default=0) def __unicode__ (self): return Self.title
To create a database:
Python manage.py syncdb
Run up and go to Django Admin to see first:
Python manage.py runserver #http://127.0.0.1:8000/admin/