- Read the [Django Book][book], it is excellent
- Read the [Django docs][docs] [book]:http://www.djangobook.com/en/2.0/ [docs]:https://docs.djangoproject.com/en/1.3/
- django-users mailing list
- django-developers mailing list
- irc: #django
- DjangoCons and Django Meetings
- contribute?
- render, since Django 1.3.
- render() is the same as a call to render_to_response() with a context_instance argument that forces the use of a RequestContext.
- redirect, since Django 1.1, usage:
- redirects to:
-
- an object, with defined get_absolute_url
-
- a named url
-
- a hardcoded url (relative or full)
from django.shortcuts import render
return render(request, 'my_template.html', context)
from django.shortcuts import redirect
return redirect('name_of_url')
class Car(models.Model):
...
def get_absolute_url():
return reverse('car')
url(r'/(\d+)/', 'car.views.car', name='car')
return redirect('car', car.id)
{% for car in cars %}
<a href="{{ car.get_absolute_url }}">car.name</a>
{% endfor %}
For example: django-debug-toolbar django-debug-toolbar:https://github.com/django-debug-toolbar/django-debug-toolbar
[Creating a repository][create-git-repo] [create-git-repo]:http://help.github.com/create-a-repo/
git config --global user.name "Wim Feijen"
git config --global user.email wim@go2people.nl
mkdir Django-Trainingen
cd Django-Trainingen
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin git@github.com:wimfeijen/Django-Trainingen.git
git push -u origin master
https://github.com/account/ssh
cd existing_git_repo
git remote add origin git@github.com:wimfeijen/Django-Trainingen.git
git push -u origin master
- git add
- git status
- git commit -m 'Description of the change'
- git push
- git clone
- git pull
[Basics][markdown-basics] [markdown-basics]:http://daringfireball.net/projects/markdown/basics
[Syntax][markdown-syntax] [markdown-syntax]:http://daringfireball.net/projects/markdown/syntax
- Improved CSRF protection
- Messages framework
- Relaxed requirements for usernames
- Email backends
- “Smart” if tag
- Improved localization
- readonly_fields in ModelAdmin
- JavaScript-assisted handling of inline related objects in the admin
Ad 6. in settings.py:
USE_I10N = True
- File and image handling (django-imagekit or easy-thumbnails)
- User registration (django-registration) and sessions
- Testing (django-debug-toolbar, nose, werkzeug, gdb, eclipse)
- Database migrations (south)
- Automated deployments (fabric, zc.buildout)
- Caching (memcached)
- Webservices (django-tastypie)
- Facebook / social integration (django-socialregistration)
- Pagination (endless-pagination)
- IDEAL payments (django-mollie)
- Blog (zinnia)
- Compress static files (django-compressor)
- jQuery
- Backbone.js
- Mootools (alternatief voor jquery)
Wim Feijen