summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Pellerin <jpellerin@gmail.com>2006-07-31 18:19:15 +0000
committerJason Pellerin <jpellerin@gmail.com>2006-07-31 18:19:15 +0000
commit7062c656c300c267cff22440afa30063c3b8789b (patch)
treed3e320a39b4eacb05cb5ba034cf549d795bafddf
parente550c1eed4cb23ee89e9a60ac22188fe9191aa13 (diff)
[multi-db] Merge trunk to [3501]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--AUTHORS16
-rw-r--r--INSTALL19
-rw-r--r--django/__init__.py2
-rw-r--r--django/conf/locale/sl/LC_MESSAGES/django.mobin29424 -> 33224 bytes
-rw-r--r--django/conf/locale/sl/LC_MESSAGES/django.po638
-rw-r--r--django/contrib/auth/decorators.py2
-rw-r--r--django/contrib/auth/forms.py4
-rw-r--r--django/contrib/auth/views.py12
-rw-r--r--django/core/management.py8
-rw-r--r--django/core/serializers/json.py6
-rw-r--r--django/core/urlresolvers.py16
-rw-r--r--django/db/models/__init__.py12
-rw-r--r--django/db/models/base.py4
-rw-r--r--django/db/models/fields/__init__.py4
-rw-r--r--django/db/models/loading.py8
-rw-r--r--django/forms/__init__.py6
-rw-r--r--django/template/__init__.py2
-rw-r--r--django/template/loader_tags.py9
-rw-r--r--django/utils/autoreload.py8
-rw-r--r--django/utils/translation/trans_null.py3
-rw-r--r--django/views/generic/date_based.py57
-rw-r--r--docs/api_stability.txt123
-rw-r--r--docs/contributing.txt8
-rw-r--r--docs/design_philosophies.txt4
-rw-r--r--docs/faq.txt43
-rw-r--r--docs/forms.txt37
-rw-r--r--docs/generic_views.txt48
-rw-r--r--docs/i18n.txt2
-rw-r--r--docs/install.txt14
-rw-r--r--docs/release_notes_0.95.txt126
-rw-r--r--docs/syndication_feeds.txt2
-rw-r--r--docs/templates.txt18
-rw-r--r--docs/templates_python.txt17
-rw-r--r--docs/transactions.txt19
-rw-r--r--docs/tutorial01.txt2
-rw-r--r--docs/tutorial02.txt3
-rw-r--r--docs/tutorial04.txt4
-rw-r--r--ez_setup.py46
-rw-r--r--setup.py32
-rw-r--r--tests/othertests/templates.py6
-rw-r--r--tests/othertests/urlpatterns_reverse.py47
41 files changed, 907 insertions, 530 deletions
diff --git a/AUTHORS b/AUTHORS
index fb299a9e3b..6b539e8b6b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,12 +16,23 @@ before Simon departed and currently oversees things with Adrian.
Wilson Miner <http://www.wilsonminer.com/>, who designed Django's admin
interface, pretty error pages, official Web site (djangoproject.com) and has
-made many other contributions.
+made many other contributions. He makes us look good.
+
+Malcolm Tredinnick <http://www.pointy-stick.com/blog/>, who has made
+significant contributions to all levels of the framework, from its database
+layer to template system and documentation.
Georg "Hugo" Bauer <http://hugo.muensterland.org/>, who added
internationalization support, manages i18n contributions and has made a ton
of excellent tweaks, feature additions and bug fixes.
+Luke Plant <http://lukeplant.me.uk/>, who has contributed many excellent
+improvements, including database-level improvements, the CSRF middleware and
+unit tests.
+
+Russell Keith-Magee <freakboy@iinet.net.au>, who has contributed many excellent
+improvements, including refactoring of the Django ORM code and unit tests.
+
Robert Wittams <http://robert.wittams.com/>, who majorly refactored the Django
admin application to allow for easier reuse and has made a ton of excellent
tweaks, feature additions and bug fixes.
@@ -70,7 +81,6 @@ answer newbie questions, and generally made Django that much better:
Michael Josephson <http://www.sdjournal.com/>
jpellerin@gmail.com
junzhang.jn@gmail.com
- Russell Keith-Magee <freakboy@iinet.net.au>
Garth Kidd <http://www.deadlybloodyserious.com/>
kilian <kilian.cavalotti@lip6.fr>
Sune Kirkeby <http://ibofobi.dk/>
@@ -98,6 +108,7 @@ answer newbie questions, and generally made Django that much better:
Sam Newman <http://www.magpiebrain.com/>
Neal Norwitz <nnorwitz@google.com>
oggie rob <oz.robharvey@gmail.com>
+ Jay Parlar <parlar@gmail.com>
pgross@thoughtworks.com
phaedo <http://phaedo.cx/>
phil@produxion.net
@@ -118,7 +129,6 @@ answer newbie questions, and generally made Django that much better:
Tom Tobin
Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
- Malcolm Tredinnick
Amit Upadhyay
Geert Vanderkelen
Milton Waddams
diff --git a/INSTALL b/INSTALL
index fc21a61b47..23e24c0cdf 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,7 +1,22 @@
Thanks for downloading Django.
-To install it, make sure you have Python 2.3 or greater installed. Then run this command:
+To install it, make sure you have Python 2.3 or greater installed. Then run
+this command from the command prompt:
-python setup.py install
+ python setup.py install
+
+Note this requires a working Internet connection if you don't already have the
+Python utility "setuptools" installed.
+
+AS AN ALTERNATIVE, you can just copy the entire "django" directory to Python's
+site-packages directory, which is located wherever your Python installation
+lives. Some places you might check are:
+
+ /usr/lib/python2.4/site-packages (Unix, Python 2.4)
+ /usr/lib/python2.3/site-packages (Unix, Python 2.3)
+ C:\\PYTHON\site-packages (Windows)
+
+This second solution does not require a working Internet connection; it
+bypasses "setuptools" entirely.
For more detailed instructions, see docs/install.txt.
diff --git a/django/__init__.py b/django/__init__.py
index 00c6f82478..5d5461c867 100644
--- a/django/__init__.py
+++ b/django/__init__.py
@@ -1 +1 @@
-VERSION = (0, 95, 'post-magic-removal')
+VERSION = (0, 96, 'pre')
diff --git a/django/conf/locale/sl/LC_MESSAGES/django.mo b/django/conf/locale/sl/LC_MESSAGES/django.mo
index a7d6152411..12253610c4 100644
--- a/django/conf/locale/sl/LC_MESSAGES/django.mo
+++ b/django/conf/locale/sl/LC_MESSAGES/django.mo
Binary files differ
diff --git a/django/conf/locale/sl/LC_MESSAGES/django.po b/django/conf/locale/sl/LC_MESSAGES/django.po
index 1d9e2f4028..5a9b6d6b46 100644
--- a/django/conf/locale/sl/LC_MESSAGES/django.po
+++ b/django/conf/locale/sl/LC_MESSAGES/django.po
@@ -1,21 +1,25 @@
-# SOME DESCRIPTIVE TITLE.
+# translation of django.po to Slovenian
+# Igor Kolar <ike@email.si), 2006.
+# Nena Kojadin <nena@kiberpipa.org), 2006.
+# Jure Cuhalev <gandalf@owca.info>, 2006.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-# Igor Kolar <ike@email.si), 2006.
-# Nena Kojadin <nena@kiberpipa.org), 2006
msgid ""
msgstr ""
-"Project-Id-Version: Django Slovenian 0.92+svn translation\n"
+"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-05-16 10:13+0200\n"
-"PO-Revision-Date: 2006-03-19 17:30+0100\n"
+"PO-Revision-Date: 2006-07-29 11:52+0100\n"
"Last-Translator: Jure Čuhalev <gandalf@owca.info>\n"
-"Language-Team: Slovenian <sl@li.org>\n"
+"Language-Team: Slovenian <lugos-slo@lugos.si>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
-#: contrib/comments/models.py:67 contrib/comments/models.py:166
+#: contrib/comments/models.py:67
+#: contrib/comments/models.py:166
msgid "object ID"
msgstr "ID objekta"
@@ -23,7 +27,8 @@ msgstr "ID objekta"
msgid "headline"
msgstr "naslov"
-#: contrib/comments/models.py:69 contrib/comments/models.py:90
+#: contrib/comments/models.py:69
+#: contrib/comments/models.py:90
#: contrib/comments/models.py:167
msgid "comment"
msgstr "komentar"
@@ -64,15 +69,18 @@ msgstr "rating #8"
msgid "is valid rating"
msgstr "je veljavni rating"
-#: contrib/comments/models.py:83 contrib/comments/models.py:169
+#: contrib/comments/models.py:83
+#: contrib/comments/models.py:169
msgid "date/time submitted"
-msgstr "podatek datum/čas poslan"
+msgstr "datum/čas vnosa"
-#: contrib/comments/models.py:84 contrib/comments/models.py:170
+#: contrib/comments/models.py:84
+#: contrib/comments/models.py:170
msgid "is public"
msgstr "je javno"
-#: contrib/comments/models.py:85 contrib/admin/views/doc.py:289
+#: contrib/comments/models.py:85
+#: contrib/admin/views/doc.py:289
msgid "IP address"
msgstr "IP naslov"
@@ -81,21 +89,17 @@ msgid "is removed"
msgstr "je odstranjen/-a"
#: contrib/comments/models.py:86
-msgid ""
-"Check this box if the comment is inappropriate. A \"This comment has been "
-"removed\" message will be displayed instead."
-msgstr ""
-"Odkljukaj, če je komntar neprimeren. Namesto komentarja bo vidno obvestilo "
-"\"Ta komentar je bil odstranjen\"."
+msgid "Check this box if the comment is inappropriate. A \"This comment has been removed\" message will be displayed instead."
+msgstr "Odkljukaj, če je komntar neprimeren. Namesto komentarja bo vidno obvestilo \"Ta komentar je bil odstranjen\"."
#: contrib/comments/models.py:91
-#, fuzzy
msgid "comments"
-msgstr "komentar"
+msgstr "komentarji"
-#: contrib/comments/models.py:131 contrib/comments/models.py:207
+#: contrib/comments/models.py:131
+#: contrib/comments/models.py:207
msgid "Content object"
-msgstr "Objekt s vsebino"
+msgstr "Objekt z vsebino"
#: contrib/comments/models.py:159
#, python-format
@@ -125,14 +129,12 @@ msgid "approved by staff"
msgstr "potrjeno s strani osebja"
#: contrib/comments/models.py:176
-#, fuzzy
msgid "free comment"
-msgstr "Zastonj komentar"
+msgstr "anonimen komentar"
#: contrib/comments/models.py:177
-#, fuzzy
msgid "free comments"
-msgstr "Zastonj komentarji"
+msgstr "anonimni komentarji"
#: contrib/comments/models.py:233
msgid "score"
@@ -143,14 +145,12 @@ msgid "score date"
msgstr "datum ocene"
#: contrib/comments/models.py:237
-#, fuzzy
msgid "karma score"
-msgstr "Karma"
+msgstr "karma točke"
#: contrib/comments/models.py:238
-#, fuzzy
msgid "karma scores"
-msgstr "Skrivnosti karme"
+msgstr "karma točke"
#: contrib/comments/models.py:242
#, python-format
@@ -173,14 +173,12 @@ msgid "flag date"
msgstr "datum označitve (zastavice)"
#: contrib/comments/models.py:268
-#, fuzzy
msgid "user flag"
-msgstr "Uporabniška zastavica"
+msgstr "uporabnikova zastavica"
#: contrib/comments/models.py:269
-#, fuzzy
msgid "user flags"
-msgstr "Uporabniške zastavice"
+msgstr "uporabniške zastavice"
#: contrib/comments/models.py:273
#, python-format
@@ -192,14 +190,12 @@ msgid "deletion date"
msgstr "datum izbrisa"
#: contrib/comments/models.py:280
-#, fuzzy
msgid "moderator deletion"
-msgstr "Izbris s strani moderatorja"
+msgstr "izbris s strani moderatorja"
#: contrib/comments/models.py:281
-#, fuzzy
msgid "moderator deletions"
-msgstr "Izbrisi s strani moderatorja"
+msgstr "izbrisi s strani moderatorja"
#: contrib/comments/models.py:285
#, python-format
@@ -219,30 +215,33 @@ msgid "No voting for yourself"
msgstr "Ni mogoče glasovati zase"
#: contrib/comments/views/comments.py:28
-msgid ""
-"This rating is required because you've entered at least one other rating."
+msgid "This rating is required because you've entered at least one other rating."
msgstr "Moraš podati tole oceno, ker si podal vsaj še eno drugo oceno."
#: contrib/comments/views/comments.py:112
#, python-format
msgid ""
-"This comment was posted by a user who has posted fewer than %(count)s "
-"comment:\n"
+"This comment was posted by a user who has posted fewer than %(count)s comment:\n"
"\n"
"%(text)s"
msgid_plural ""
-"This comment was posted by a user who has posted fewer than %(count)s "
-"comments:\n"
+"This comment was posted by a user who has posted fewer than %(count)s comments:\n"
"\n"
"%(text)s"
msgstr[0] ""
-"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s "
-"komentarjev Komentar:\n"
+"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarjev:\n"
"\n"
"%(text)s"
msgstr[1] ""
-"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s "
-"komentarjev Komentar:\n"
+"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentar:\n"
+"\n"
+"%(text)s"
+msgstr[2] ""
+"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarja:\n"
+"\n"
+"%(text)s"
+msgstr[3] ""
+"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarje:\n"
"\n"
"%(text)s"
@@ -260,12 +259,12 @@ msgstr ""
#: contrib/comments/views/comments.py:189
#: contrib/comments/views/comments.py:280
msgid "Only POSTs are allowed"
-msgstr "Dovoljena je le metoda HTTP POST"
+msgstr "Dovoljena je le metoda POST"
#: contrib/comments/views/comments.py:193
#: contrib/comments/views/comments.py:284
msgid "One or more of the required fields wasn't submitted"
-msgstr "Eden ali več obveznih polj ni vpisanih"
+msgstr "Eno ali več obveznih polj ni vpisanih"
#: contrib/comments/views/comments.py:197
#: contrib/comments/views/comments.py:286
@@ -274,17 +273,13 @@ msgstr "Nekdo se je poigraval z obrazcem za komentarje (varnostna kršitev)"
#: contrib/comments/views/comments.py:207
#: contrib/comments/views/comments.py:292
-msgid ""
-"The comment form had an invalid 'target' parameter -- the object ID was "
-"invalid"
-msgstr ""
-"Obrazec s komentarji ima neveljavni parameter 'target' -- ID objekta je "
-"neveljaven."
+msgid "The comment form had an invalid 'target' parameter -- the object ID was invalid"
+msgstr "Obrazec s komentarji ima neveljavni parameter 'target' -- ID objekta je neveljaven."
#: contrib/comments/views/comments.py:257
#: contrib/comments/views/comments.py:321
msgid "The comment form didn't provide either 'preview' or 'post'"
-msgstr "Obrazec s komentarji ne zahteva niti 'preview' niti 'post' akcije."
+msgstr "Obrazec s komentarji ni podal niti 'preview' niti 'post' akcije."
#: contrib/comments/templates/comments/form.html:6
#: contrib/comments/templates/comments/form.html:8
@@ -363,7 +358,8 @@ msgstr ""
"<h3>Avtor: %s</h3>\n"
"<ul>\n"
-#: contrib/admin/filterspecs.py:70 contrib/admin/filterspecs.py:88
+#: contrib/admin/filterspecs.py:70
+#: contrib/admin/filterspecs.py:88
#: contrib/admin/filterspecs.py:143
msgid "All"
msgstr "Vse"
@@ -390,7 +386,7 @@ msgstr "Letos"
#: contrib/admin/filterspecs.py:143
msgid "Yes"
-msgstr "Ja"
+msgstr "Da"
#: contrib/admin/filterspecs.py:143
msgid "No"
@@ -432,46 +428,33 @@ msgstr "vnosi v dnevniku"
msgid "All dates"
msgstr "Vsi datumi"
-#: contrib/admin/views/decorators.py:9 contrib/auth/forms.py:36
+#: contrib/admin/views/decorators.py:9
+#: contrib/auth/forms.py:36
#: contrib/auth/forms.py:41
-msgid ""
-"Please enter a correct username and password. Note that both fields are case-"
-"sensitive."
-msgstr ""
-"Prosimo, vnesite veljavno uporabniško ime in geslo. Opomba: obe polji sta "
-"občutljivi na velikost črk"
+msgid "Please enter a correct username and password. Note that both fields are case-sensitive."
+msgstr "Prosimo, vnesite veljavno uporabniško ime in geslo. Opomba: obe polji sta občutljivi na velikost črk"
#: contrib/admin/views/decorators.py:23
#: contrib/admin/templates/admin/login.html:25
msgid "Log in"
-msgstr "Prijate se"
+msgstr "Prijavite se"
#: contrib/admin/views/decorators.py:61
-msgid ""
-"Please log in again, because your session has expired. Don't worry: Your "
-"submission has been saved."
-msgstr ""
-"Vaša seja je pretekla; prosimo, prijavite se znova. Opomba: Vse vaše objave "
-"so varno shranjene."
+msgid "Please log in again, because your session has expired. Don't worry: Your submission has been saved."
+msgstr "Vaša seja je pretekla; prosimo, prijavite se znova. Ne skrbite, vaše objave so varno shranjene."
#: contrib/admin/views/decorators.py:68
-msgid ""
-"Looks like your browser isn't configured to accept cookies. Please enable "
-"cookies, reload this page, and try again."
-msgstr ""
-"Izgleda, da vaš brskalnik nima podpore za piškotke. Prosimo, vključite "
-"piškotke, znova naložite to stran in poskusite še enkrat."
+msgid "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again."
+msgstr "Izgleda, da vaš brskalnik nima podpore za piškotke. Prosimo, vključite piškotke, znova naložite to stran in poskusite še enkrat."
#: contrib/admin/views/decorators.py:82
msgid "Usernames cannot contain the '@' character."
-msgstr "Uporabniška imena ne smejo vsebovati znaka '@'"
+msgstr "Uporabniška imena ne smejo vsebovati znaka '@'."
#: contrib/admin/views/decorators.py:84
#, python-format
msgid "Your e-mail address is not your username. Try '%s' instead."
-msgstr ""
-"Vaš e-mail naslov ne morete uporabljati kot uporabniško ime. Namesto tega "
-"uporabite '%s'"
+msgstr "Vaš e-mail naslov ne morete uporabljati kot uporabniško ime. Namesto tega uporabite '%s'."
#: contrib/admin/views/main.py:226
msgid "Site administration"
@@ -482,11 +465,13 @@ msgstr "Administracija strani"
msgid "The %(name)s \"%(obj)s\" was added successfully."
msgstr "%(name)s \"%(obj)s\" je bil uspešno dodan."
-#: contrib/admin/views/main.py:264 contrib/admin/views/main.py:348
+#: contrib/admin/views/main.py:264
+#: contrib/admin/views/main.py:348
msgid "You may edit it again below."
msgstr "Vsebino lahko znova uredite spodaj."
-#: contrib/admin/views/main.py:272 contrib/admin/views/main.py:357
+#: contrib/admin/views/main.py:272
+#: contrib/admin/views/main.py:357
#, python-format
msgid "You may add another %s below."
msgstr "Spodaj lahko dodate še en %s."
@@ -501,7 +486,8 @@ msgstr "Dodaj %s"
msgid "Added %s."
msgstr "Dodal %s."
-#: contrib/admin/views/main.py:336 contrib/admin/views/main.py:338
+#: contrib/admin/views/main.py:336
+#: contrib/admin/views/main.py:338
#: contrib/admin/views/main.py:340
msgid "and"
msgstr "in"
@@ -509,7 +495,7 @@ msgstr "in"
#: contrib/admin/views/main.py:338
#, python-format
msgid "Changed %s."
-msgstr "Spremenil %s"
+msgstr "Spremenil %s."
#: contrib/admin/views/main.py:340
#, python-format
@@ -527,10 +513,8 @@ msgstr "%(name)s \"%(obj)s\" je bilo uspešno spremenjeno."
#: contrib/admin/views/main.py:354
#, python-format
-msgid ""
-"The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
-msgstr ""
-"%(name)s \"%(obj)s\" je bilo uspešno dodano. Znova ga lahko urejate spodaj."
+msgid "The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
+msgstr "%(name)s \"%(obj)s\" je bilo uspešno dodano. Znova ga lahko urejate spodaj."
#: contrib/admin/views/main.py:392
#, python-format
@@ -564,24 +548,28 @@ msgstr "Zgodovina sprememb: %s"
#: contrib/admin/views/main.py:565
#, python-format
msgid "Select %s"
-msgstr "Izberi %s"
+msgstr "Izberite %s"
#: contrib/admin/views/main.py:565
#, python-format
msgid "Select %s to change"
-msgstr "Izberi %s, ki ga želite spremeniti"
+msgstr "Izberite %s, ki ga želite spremeniti"
-#: contrib/admin/views/doc.py:277 contrib/admin/views/doc.py:286
-#: contrib/admin/views/doc.py:288 contrib/admin/views/doc.py:294
-#: contrib/admin/views/doc.py:295 contrib/admin/views/doc.py:297
+#: contrib/admin/views/doc.py:277
+#: contrib/admin/views/doc.py:286
+#: contrib/admin/views/doc.py:288
+#: contrib/admin/views/doc.py:294
+#: contrib/admin/views/doc.py:295
+#: contrib/admin/views/doc.py:297
msgid "Integer"
-msgstr "Integer (število)"
+msgstr "Število (integer)"
#: contrib/admin/views/doc.py:278
msgid "Boolean (Either True or False)"
msgstr "Boolean (ali True ali False)"
-#: contrib/admin/views/doc.py:279 contrib/admin/views/doc.py:296
+#: contrib/admin/views/doc.py:279
+#: contrib/admin/views/doc.py:296
#, python-format
msgid "String (up to %(maxlength)s)"
msgstr "Niz (vse do %(maxlength)s)"
@@ -602,7 +590,8 @@ msgstr "Datum (s časom)"
msgid "E-mail address"
msgstr "E-naslov"
-#: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287
+#: contrib/admin/views/doc.py:284
+#: contrib/admin/views/doc.py:287
msgid "File path"
msgstr "Pot do datoteke"
@@ -616,7 +605,7 @@ msgstr "Boolean (ali True ali False ali None)"
#: contrib/admin/views/doc.py:292
msgid "Relation to parent model"
-msgstr "Razmerje z starševskim modelom"
+msgstr "Razmerje s starševskim modelom"
#: contrib/admin/views/doc.py:293
msgid "Phone number"
@@ -630,7 +619,8 @@ msgstr "Besedilo"
msgid "Time"
msgstr "Čas"
-#: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7
+#: contrib/admin/views/doc.py:300
+#: contrib/flatpages/models.py:7
msgid "URL"
msgstr "URL (spletni naslov)"
@@ -707,15 +697,11 @@ msgstr "Dejanje"
#: contrib/admin/templates/admin/object_history.html:26
msgid "DATE_WITH_TIME_FULL"
-msgstr "N j, Y, P"
+msgstr "N j, Y, H:i"
#: contrib/admin/templates/admin/object_history.html:36
-msgid ""
-"This object doesn't have a change history. It probably wasn't added via this "
-"admin site."
-msgstr ""
-"Ta objekt nima zgodovine. Verjetno ni bil dodan preko te administratorske "
-"strani."
+msgid "This object doesn't have a change history. It probably wasn't added via this admin site."
+msgstr "Ta objekt nima zgodovine. Verjetno ni bil dodan preko te administratorske strani."
#: contrib/admin/templates/admin/base_site.html:4
msgid "Django site admin"
@@ -738,12 +724,8 @@ msgid "Server Error <em>(500)</em>"
msgstr "Napaka strežnika <em>(500)</em>"
#: contrib/admin/templates/admin/500.html:10
-msgid ""
-"There's been an error. It's been reported to the site administrators via e-"
-"mail and should be fixed shortly. Thanks for your patience."
-msgstr ""
-"Prišlo je do nepričakovane napake. Administratorji strani so že obveščeni "
-"prekoe-pošte in naj bi jo v kratkem odpravili. Hvala za vaše potrpljenje."
+msgid "There's been an error. It's been reported to the site administrators via e-mail and should be fixed shortly. Thanks for your patience."
+msgstr "Prišlo je do nepričakovane napake. Administratorji strani so že obveščeni prekoe-pošte in naj bi jo v kratkem odpravili. Hvala za vaše potrpljenje."
#: contrib/admin/templates/admin/404.html:4
#: contrib/admin/templates/admin/404.html:8
@@ -752,12 +734,12 @@ msgstr "Strani ni mogoče najti"
#: contrib/admin/templates/admin/404.html:10
msgid "We're sorry, but the requested page could not be found."
-msgstr "Se opraivčujemo, a zahtevane strani ni mogoče najti."
+msgstr "Se opravičujemo, a zahtevane strani ni mogoče najti."
#: contrib/admin/templates/admin/index.html:17
#, python-format
msgid "Models available in the %(name)s application."
-msgstr ""
+msgstr "Modeli na voljo v %(name)s aplikaciji"
#: contrib/admin/templates/admin/index.html:28
#: contrib/admin/templates/admin/change_form.html:15
@@ -776,7 +758,7 @@ msgstr "Nimate dovoljenja za urejanje česar koli."
msgid "Recent Actions"
msgstr "Zadnja dejanja"
-#: contrib/admin/templates/admin/index.html:53
+#: contrib/admin/tempalates/admin/index.html:53
msgid "My Actions"
msgstr "Moja dejanja"
@@ -804,22 +786,13 @@ msgstr "Izbriši"
#: contrib/admin/templates/admin/delete_confirmation.html:14
#, python-format
-msgid ""
-"Deleting the %(object_name)s '%(object)s' would result in deleting related "
-"objects, but your account doesn't have permission to delete the following "
-"types of objects:"
-msgstr ""
-"Izbris %(object_name)s '%(object)s' bi pomenil izbris povezanih objektov, "
-"vendarvi nimate dovoljenja za izbris naslednjih tipov objektov:"
+msgid "Deleting the %(object_name)s '%(object)s' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:"
+msgstr "Izbris %(object_name)s '%(object)s' bi pomenil izbris povezanih objektov, vendarvi nimate dovoljenja za izbris naslednjih tipov objektov:"
#: contrib/admin/templates/admin/delete_confirmation.html:21
#, python-format
-msgid ""
-"Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of "
-"the following related items will be deleted:"
-msgstr ""
-"Ste prepričani, da želite izbrisati %(object_name)s \"%(object)s\"?Vsi "
-"naslednji povezani elementi bodo izbrisani:"
+msgid "Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of the following related items will be deleted:"
+msgstr "Ste prepričani, da želite izbrisati %(object_name)s \"%(object)s\"?Vsi naslednji povezani elementi bodo izbrisani:"
#: contrib/admin/templates/admin/delete_confirmation.html:26
msgid "Yes, I'm sure"
@@ -843,6 +816,8 @@ msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] "Prosimo, odpravite sledečo napako."
msgstr[1] "Prosimo, odpravite sledeče napake."
+msgstr[2] "Prosimo, odpravite sledeči napaki."
+msgstr[3] "Prosimo, odpravite sledeče napake."
#: contrib/admin/templates/admin/change_form.html:48
msgid "Ordering"
@@ -892,12 +867,8 @@ msgid "Password reset"
msgstr "Obnova gesla"
#: contrib/admin/templates/registration/password_reset_form.html:12
-msgid ""
-"Forgotten your password? Enter your e-mail address below, and we'll reset "
-"your password and e-mail the new one to you."
-msgstr ""
-"Ste pozabili geslo? Vnesite vaš e-naslov spodaj in mi vam bomo poslali novo "
-"geslo."
+msgid "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you."
+msgstr "Ste pozabili geslo? Vnesite vaš e-naslov spodaj in mi vam bomo poslali novo geslo."
#: contrib/admin/templates/registration/password_reset_form.html:16
msgid "E-mail address:"
@@ -921,18 +892,12 @@ msgid "Password reset successful"
msgstr "Geslo je bilo uspešno obnovljeno"
#: contrib/admin/templates/registration/password_reset_done.html:12
-msgid ""
-"We've e-mailed a new password to the e-mail address you submitted. You "
-"should be receiving it shortly."
+msgid "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly."
msgstr "Po e-pošti smo vam poslali novo geslo.Morali bi ga prejeti v kratkem"
#: contrib/admin/templates/registration/password_change_form.html:12
-msgid ""
-"Please enter your old password, for security's sake, and then enter your new "
-"password twice so we can verify you typed it in correctly."
-msgstr ""
-"Prosim, vnesite vaše staro geslo (zaradi varnosti) in nato še dvakrat novo"
-"(da preverimo, da se niste zatipkali)"
+msgid "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly."
+msgstr "Prosim, vnesite vaše staro geslo (zaradi varnosti) in nato še dvakrat novo(da preverimo, da se niste zatipkali)"
#: contrib/admin/templates/registration/password_change_form.html:17
msgid "Old password:"
@@ -1000,34 +965,24 @@ msgid ""
"your computer is \"internal\").</p>\n"
msgstr ""
"\n"
-"<p class=\"help\">Za inštalacijo zaznamkic povlečite povezavo v orodno "
-"vrstico\n"
-"z zaznamki, ali kliknite z desno miškino tipko na povezavo in jo dodajte med "
-"zaznamkeZdaj lahko uporabite zaznamek s katere koli strani. Opomba: nekatere "
-"teh stranilahko gledate le z internega računalnika (preverite s sistemskim "
-"administratorjem)</p>\n"
+"<p class=\"help\">Za inštalacijo zaznamkic povlečite povezavo v orodno vrstico\n"
+"z zaznamki, ali kliknite z desno miškino tipko na povezavo in jo dodajte med zaznamkeZdaj lahko uporabite zaznamek s katere koli strani. Opomba: nekatere teh stranilahko gledate le z internega računalnika (preverite s sistemskim administratorjem)</p>\n"
#: contrib/admin/templates/admin_doc/bookmarklets.html:19
msgid "Documentation for this page"
msgstr "Dokumentacija za to stran"
#: contrib/admin/templates/admin_doc/bookmarklets.html:20
-msgid ""
-"Jumps you from any page to the documentation for the view that generates "
-"that page."
-msgstr ""
-"Skok na stran z dokumentacijo za pogled (view), ki generira trenutno stran."
+msgid "Jumps you from any page to the documentation for the view that generates that page."
+msgstr "Skok na stran z dokumentacijo za pogled (view), ki generira trenutno stran."
#: contrib/admin/templates/admin_doc/bookmarklets.html:22
msgid "Show object ID"
msgstr "Pokaži ID objekta"
#: contrib/admin/templates/admin_doc/bookmarklets.html:23
-msgid ""
-"Shows the content-type and unique ID for pages that represent a single "
-"object."
-msgstr ""
-"Pokaže content-type in unikatni ID za strani, ki predstavljajo en objekt."
+msgid "Shows the content-type and unique ID for pages that represent a single object."
+msgstr "Pokaže content-type in unikatni ID za strani, ki predstavljajo en objekt."
#: contrib/admin/templates/admin_doc/bookmarklets.html:25
msgid "Edit this object (current window)"
@@ -1035,8 +990,7 @@ msgstr "Uredi trenutni objekt (v trenutnem oknu)"
#: contrib/admin/templates/admin_doc/bookmarklets.html:26
msgid "Jumps to the admin page for pages that represent a single object."
-msgstr ""
-"Skok na administracijsko stran za vse strani, ki predstavljajo en objekt."
+msgstr "Skok na administracijsko stran za vse strani, ki predstavljajo en objekt."
#: contrib/admin/templates/admin_doc/bookmarklets.html:28
msgid "Edit this object (new window)"
@@ -1067,23 +1021,16 @@ msgid "redirect from"
msgstr "preusmeritev iz"
#: contrib/redirects/models.py:8
-msgid ""
-"This should be an absolute path, excluding the domain name. Example: '/"
-"events/search/'."
-msgstr ""
-"To mora biti absolutna pot, izključujoč domeno. Primer: '/events/search'-"
+msgid "This should be an absolute path, excluding the domain name. Example: '/events/search/'."
+msgstr "To mora biti absolutna pot, izključujoč domeno. Primer: '/events/search'-"
#: contrib/redirects/models.py:9
msgid "redirect to"
msgstr "preusmeri na"
#: contrib/redirects/models.py:10
-msgid ""
-"This can be either an absolute path (as above) or a full URL starting with "
-"'http://'."
-msgstr ""
-"To je ali absolutna pot (kot zgoraj) ali popoln URL naslov (začne se z "
-"'http://')"
+msgid "This can be either an absolute path (as above) or a full URL starting with 'http://'."
+msgstr "To je ali absolutna pot (kot zgoraj) ali popoln URL naslov (začne se z 'http://')"
#: contrib/redirects/models.py:12
msgid "redirect"
@@ -1094,10 +1041,8 @@ msgid "redirects"
msgstr "preusmeritve"
#: contrib/flatpages/models.py:8
-msgid ""
-"Example: '/about/contact/'. Make sure to have leading and trailing slashes."
-msgstr ""
-"Primer: '/about/contact/'. Mora vsebovati / (poševnico) na začetku in koncu."
+msgid "Example: '/about/contact/'. Make sure to have leading and trailing slashes."
+msgstr "Primer: '/about/contact/'. Mora vsebovati / (poševnico) na začetku in koncu."
#: contrib/flatpages/models.py:9
msgid "title"
@@ -1116,12 +1061,8 @@ msgid "template name"
msgstr "ime predloge"
#: contrib/flatpages/models.py:13
-msgid ""
-"Example: 'flatpages/contact_page'. If this isn't provided, the system will "
-"use 'flatpages/default'."
-msgstr ""
-"Primer: 'flatpages/contact_page'. Če to polje ni izpolnjeno, bo sistem "
-"uporabil 'flatpages/default'."
+msgid "Example: 'flatpages/contact_page'. If this isn't provided, the system will use 'flatpages/default'."
+msgstr "Primer: 'flatpages/contact_page'. Če to polje ni izpolnjeno, bo sistem uporabil 'flatpages/default'."
#: contrib/flatpages/models.py:14
msgid "registration required"
@@ -1129,19 +1070,18 @@ msgstr "obvezna registracija"
#: contrib/flatpages/models.py:14
msgid "If this is checked, only logged-in users will be able to view the page."
-msgstr ""
-"Če je to polje odkljukano, si lahko to stran ogledajo le registrirani "
-"uporabniki."
+msgstr "Če je to polje odkljukano, si lahko to stran ogledajo le registrirani uporabniki."
#: contrib/flatpages/models.py:18
msgid "flat page"
-msgstr "ploh stran :)"
+msgstr "enostavna stran"
#: contrib/flatpages/models.py:19
msgid "flat pages"
-msgstr "ploh strani :)"
+msgstr "enostavne strani"
-#: contrib/auth/models.py:13 contrib/auth/models.py:26
+#: contrib/auth/models.py:13
+#: contrib/auth/models.py:26
msgid "name"
msgstr "ime"
@@ -1150,24 +1090,22 @@ msgid "codename"
msgstr "kodno ime"
#: contrib/auth/models.py:17
-#, fuzzy
msgid "permission"
-msgstr "Dovoljenje"
+msgstr "dovoljenje"
-#: contrib/auth/models.py:18 contrib/auth/models.py:27
-#, fuzzy
+#: contrib/auth/models.py:18
+#: contrib/auth/models.py:27
msgid "permissions"
-msgstr "Dovoljenja"
+msgstr "dovoljenja"
#: contrib/auth/models.py:29
-#, fuzzy
msgid "group"
-msgstr "Skupina"
+msgstr "skupina"
-#: contrib/auth/models.py:30 contrib/auth/models.py:65
-#, fuzzy
+#: contrib/auth/models.py:30
+#: contrib/auth/models.py:65
msgid "groups"
-msgstr "Skupine"
+msgstr "skupine"
#: contrib/auth/models.py:55
msgid "username"
@@ -1218,27 +1156,20 @@ msgid "date joined"
msgstr "član od"
#: contrib/auth/models.py:66
-msgid ""
-"In addition to the permissions manually assigned, this user will also get "
-"all permissions granted to each group he/she is in."
-msgstr ""
-"Polek ročno določenih dovoljenj bo ta uporabnik dobil tudi vsa dovoljenja,ki "
-"pripadajo vsem skupinah, v katerih je."
+msgid "In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in."
+msgstr "Polek ročno določenih dovoljenj bo ta uporabnik dobil tudi vsa dovoljenja,ki pripadajo vsem skupinah, v katerih je."
#: contrib/auth/models.py:67
-#, fuzzy
msgid "user permissions"
-msgstr "Dovoljenja"
+msgstr "uporabniška dovoljenja"
#: contrib/auth/models.py:70
-#, fuzzy
msgid "user"
-msgstr "Uporabnik"
+msgstr "uporabnik"
#: contrib/auth/models.py:71
-#, fuzzy
msgid "users"
-msgstr "Uporabniki"
+msgstr "uporabniki"
#: contrib/auth/models.py:76
msgid "Personal info"
@@ -1257,22 +1188,16 @@ msgid "Groups"
msgstr "Skupine"
#: contrib/auth/models.py:219
-#, fuzzy
msgid "message"
-msgstr "Sporočilo"
+msgstr "sporočilo"
#: contrib/auth/forms.py:30
-msgid ""
-"Your Web browser doesn't appear to have cookies enabled. Cookies are "
-"required for logging in."
-msgstr ""
-"Izgleda, da vaš brskalnik nima omogočenih piškotkov. Piškotki so potrebni za "
-"prijavo."
+msgid "Your Web browser doesn't appear to have cookies enabled. Cookies are required for logging in."
+msgstr "Izgleda, da vaš brskalnik nima omogočenih piškotkov. Piškotki so potrebni za prijavo."
#: contrib/contenttypes/models.py:25
-#, fuzzy
msgid "python model class name"
-msgstr "python ime modula"
+msgstr "python ime razreda modela"
#: contrib/contenttypes/models.py:28
msgid "content type"
@@ -1366,23 +1291,28 @@ msgstr "januar"
msgid "February"
msgstr "februar"
-#: utils/dates.py:14 utils/dates.py:27
+#: utils/dates.py:14
+#: utils/dates.py:27
msgid "March"
msgstr "marec"
-#: utils/dates.py:14 utils/dates.py:27
+#: utils/dates.py:14
+#: utils/dates.py:27
msgid "April"
msgstr "april"
-#: utils/dates.py:14 utils/dates.py:27
+#: utils/dates.py:14
+#: utils/dates.py:27
msgid "May"
msgstr "maj"
-#: utils/dates.py:14 utils/dates.py:27
+#: utils/dates.py:14
+#: utils/dates.py:27
msgid "June"
msgstr "junij"
-#: utils/dates.py:15 utils/dates.py:27
+#: utils/dates.py:15
+#: utils/dates.py:27
msgid "July"
msgstr "julij"
@@ -1407,62 +1337,58 @@ msgid "December"
msgstr "december"
#: utils/dates.py:19
-#, fuzzy
msgid "jan"
-msgstr "in"
+msgstr "jan"
#: utils/dates.py:19
-#, fuzzy
msgid "feb"
-msgstr "feb."
+msgstr "feb"
#: utils/dates.py:19
msgid "mar"
-msgstr ""
+msgstr "mar"
#: utils/dates.py:19
msgid "apr"
-msgstr ""
+msgstr "apr"
#: utils/dates.py:19
-#, fuzzy
msgid "may"
-msgstr "dan"
+msgstr "maj"
#: utils/dates.py:19
msgid "jun"
-msgstr ""
+msgstr "jun"
#: utils/dates.py:20
msgid "jul"
-msgstr ""
+msgstr "jul"
#: utils/dates.py:20
msgid "aug"
-msgstr ""
+msgstr "avg"
#: utils/dates.py:20
msgid "sep"
-msgstr ""
+msgstr "sep"
#: utils/dates.py:20
msgid "oct"
-msgstr ""
+msgstr "okt"
#: utils/dates.py:20
msgid "nov"
-msgstr ""
+msgstr "nov"
#: utils/dates.py:20
msgid "dec"
-msgstr ""
+msgstr "dec"
#: utils/dates.py:27
msgid "Jan."
msgstr "jan."
#: utils/dates.py:27
-#, fuzzy
msgid "Feb."
msgstr "feb."
@@ -1489,38 +1415,50 @@ msgstr "dec."
#: utils/timesince.py:12
msgid "year"
msgid_plural "years"
-msgstr[0] "leto"
-msgstr[1] "let"
+msgstr[0] "let"
+msgstr[1] "leto"
+msgstr[2] "leti"
+msgstr[3] "leta"
#: utils/timesince.py:13
msgid "month"
msgid_plural "months"
-msgstr[0] "mesec"
-msgstr[1] "mesecev"
+msgstr[0] "mesecev"
+msgstr[1] "mesec"
+msgstr[2] "meseca"
+msgstr[3] "meseci"
#: utils/timesince.py:14
msgid "week"
msgid_plural "weeks"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "tednov"
+msgstr[1] "teden"
+msgstr[2] "tedna"
+msgstr[3] "tednov"
#: utils/timesince.py:15
msgid "day"
msgid_plural "days"
-msgstr[0] "dan"
-msgstr[1] "dni"
+msgstr[0] "dni"
+msgstr[1] "dan"
+msgstr[2] "dneva"
+msgstr[3] "dni"
#: utils/timesince.py:16
msgid "hour"
msgid_plural "hours"
-msgstr[0] "ura"
-msgstr[1] "ur"
+msgstr[0] "ur"
+msgstr[1] "ura"
+msgstr[2] "uri"
+msgstr[3] "ure"
#: utils/timesince.py:17
msgid "minute"
msgid_plural "minutes"
-msgstr[0] "minuta"
-msgstr[1] "minut"
+msgstr[0] "minut"
+msgstr[1] "minuta"
+msgstr[2] "minuti"
+msgstr[3] "minute"
#: conf/global_settings.py:37
msgid "Bengali"
@@ -1544,7 +1482,7 @@ msgstr "Nemški"
#: conf/global_settings.py:42
msgid "Greek"
-msgstr ""
+msgstr "Grški"
#: conf/global_settings.py:43
msgid "English"
@@ -1564,11 +1502,11 @@ msgstr "Galičanski"
#: conf/global_settings.py:47
msgid "Hungarian"
-msgstr ""
+msgstr "Madžarski"
#: conf/global_settings.py:48
msgid "Hebrew"
-msgstr ""
+msgstr "Hebrejski"
#: conf/global_settings.py:49
msgid "Icelandic"
@@ -1619,9 +1557,8 @@ msgid "Swedish"
msgstr "Švedski"
#: conf/global_settings.py:61
-#, fuzzy
msgid "Ukrainian"
-msgstr "Brazilski"
+msgstr "Ukrajinski"
#: conf/global_settings.py:62
msgid "Simplified Chinese"
@@ -1636,12 +1573,8 @@ msgid "This value must contain only letters, numbers and underscores."
msgstr "To polje lahko vsebuje le črke, števila in podčrtaje (_)."
#: core/validators.py:64
-#, fuzzy
-msgid ""
-"This value must contain only letters, numbers, underscores, dashes or "
-"slashes."
-msgstr ""
-"To polje lahko vsebuje le črke, števila, podčrtaje (_) in poševnice (/)."
+msgid "This value must contain only letters, numbers, underscores, dashes or slashes."
+msgstr "To polje lahko vsebuje le črke, števila, podčrtaje, poševnice ali pomišljaje."
#: core/validators.py:72
msgid "Uppercase letters are not allowed here."
@@ -1691,23 +1624,18 @@ msgstr "Vnesite veljavni datum v zapisu YYYY-MM-DD (leto-mesec-dan)."
msgid "Enter a valid time in HH:MM format."
msgstr "Vnesite veljavni čas v zapisu HH:MM (ura:minuta)."
-#: core/validators.py:132 db/models/fields/__init__.py:468
+#: core/validators.py:132
+#: db/models/fields/__init__.py:468
msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format."
-msgstr ""
-"Vnesite veljavni datum/čas v zapisu YYYY-MM-DD HH:MM (leto-mesec-dan ura:"
-"minuta)"
+msgstr "Vnesite veljavni datum/čas v zapisu YYYY-MM-DD HH:MM (leto-mesec-dan ura:minuta)"
#: core/validators.py:136
msgid "Enter a valid e-mail address."
msgstr "Vnesite veljavni e-naslov."
#: core/validators.py:148
-msgid ""
-"Upload a valid image. The file you uploaded was either not an image or a "
-"corrupted image."
-msgstr ""
-"Uploadjate veljavno sliko. Trenutna datoteka ni bila niti slika niti "
-"okvarjena slika."
+msgid "Upload a valid image. The file you uploaded was either not an image or a corrupted image."
+msgstr "Uploadjate veljavno sliko. Trenutna datoteka ni bila niti slika niti okvarjena slika."
#: core/validators.py:155
#, python-format
@@ -1747,7 +1675,8 @@ msgstr "Pokvarjen XML: %s"
msgid "Invalid URL: %s"
msgstr "Neveljavni URL naslov: %s"
-#: core/validators.py:206 core/validators.py:208
+#: core/validators.py:206
+#: core/validators.py:208
#, python-format
msgid "The URL %s is a broken link."
msgstr "URL povezava %s je polomljena."
@@ -1762,6 +1691,8 @@ msgid "Watch your mouth! The word %s is not allowed here."
msgid_plural "Watch your mouth! The words %s are not allowed here."
msgstr[0] "Pazite na jezik! Beseda %s tu ni dovoljena."
msgstr[1] "Pazite na jezik! Besede %s tu niso dovoljene."
+msgstr[2] "Pazite na jezik! Besede %s tu niso dovoljene."
+msgstr[3] "Pazite na jezik! Besede %s tu niso dovoljene."
#: core/validators.py:236
#, python-format
@@ -1772,7 +1703,8 @@ msgstr "To polje mora ustrezati polju '%s'."
msgid "Please enter something for at least one field."
msgstr "Prosim, vnesite nekaj v vsaj eno od polj."
-#: core/validators.py:264 core/validators.py:275
+#: core/validators.py:264
+#: core/validators.py:275
msgid "Please enter both fields or leave them both empty."
msgstr "Prosimo, izpolnite obe polji ali ju pustite obe prazni."
@@ -1802,20 +1734,20 @@ msgstr "Prosim vnesite decimalno število."
#: core/validators.py:349
#, python-format
msgid "Please enter a valid decimal number with at most %s total digit."
-msgid_plural ""
-"Please enter a valid decimal number with at most %s total digits."
-msgstr[0] "Prosimo, vnesite veljavno decimalno število z največ %s števkami."
-msgstr[1] "Prosimo, vnesite veljavno decimalno število z največ %s števkami."
+msgid_plural "Please enter a valid decimal number with at most %s total digits."
+msgstr[0] "Prosimo, vnesite veljavno decimalno število z največ %s števko."
+msgstr[1] "Prosimo, vnesite veljavno decimalno število z največ %s števkama."
+msgstr[2] "Prosimo, vnesite veljavno decimalno število z največ %s števkami."
+msgstr[3] "Prosimo, vnesite veljavno decimalno število z največ %s števkami."
#: core/validators.py:352
#, python-format
msgid "Please enter a valid decimal number with at most %s decimal place."
-msgid_plural ""
-"Please enter a valid decimal number with at most %s decimal places."
-msgstr[0] ""
-"Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
-msgstr[1] ""
-"Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
+msgid_plural "Please enter a valid decimal number with at most %s decimal places."
+msgstr[0] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnim mestom."
+msgstr[1] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
+msgstr[2] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
+msgstr[3] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
#: core/validators.py:362
#, python-format
@@ -1842,94 +1774,68 @@ msgstr "Iz %s nisem mogel izločiti ničesar."
#: core/validators.py:429
#, python-format
-msgid ""
-"The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'."
+msgid "The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'."
msgstr "URL %(url)s je vrnil neveljavni Content-Type '%(contenttype)s'."
#: core/validators.py:462
#, python-format
-msgid ""
-"Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with "
-"\"%(start)s\".)"
-msgstr ""
-"Prosimo, zaprite nezaprto %(tag)s oznako v vrstici %(line)s. (Vrstica se "
-"začne z \"%(start)s\".)"
+msgid "Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with \"%(start)s\".)"
+msgstr "Prosimo, zaprite nezaprto %(tag)s oznako v vrstici %(line)s. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:466
#, python-format
-msgid ""
-"Some text starting on line %(line)s is not allowed in that context. (Line "
-"starts with \"%(start)s\".)"
-msgstr ""
-"Tekst z začetka vrstice %(line)s ni dovoljen v tem kontekstu. (Vrstica se "
-"začne z \"%(start)s\".)"
+msgid "Some text starting on line %(line)s is not allowed in that context. (Line starts with \"%(start)s\".)"
+msgstr "Tekst z začetka vrstice %(line)s ni dovoljen v tem kontekstu. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:471
-#, fuzzy, python-format
-msgid ""
-"\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%"
-"(start)s\".)"
-msgstr ""
-"\"<%(tag)s>\" v vrstici %(line)s je neveljavna oznaka. (Vrstica se začne z "
-"\"%(start)s\".)"
+#, python-format
+msgid "\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%(start)s\".)"
+msgstr "\"%(attr)s\" v vrstici %(line)s je neveljavna oznaka. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:476
#, python-format
-msgid ""
-"\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%"
-"(start)s\".)"
-msgstr ""
-"\"<%(tag)s>\" v vrstici %(line)s je neveljavna oznaka. (Vrstica se začne z "
-"\"%(start)s\".)"
+msgid "\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%(start)s\".)"
+msgstr "\"<%(tag)s>\" v vrstici %(line)s je neveljavna oznaka. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:480
#, python-format
-msgid ""
-"A tag on line %(line)s is missing one or more required attributes. (Line "
-"starts with \"%(start)s\".)"
-msgstr ""
-"Oznaki v vrstici %(line)s manjka eden ali več nujnih atributov (Vrstica se "
-"začne z \"%(start)s\".)"
+msgid "A tag on line %(line)s is missing one or more required attributes. (Line starts with \"%(start)s\".)"
+msgstr "Oznaki na vrstici %(line)s manjka eden ali več zahtevanih parametrov. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:485
#, python-format
-msgid ""
-"The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line "
-"starts with \"%(start)s\".)"
-msgstr ""
-"Atribut \"%(attr)s\" v vrstici %(line)s vsebuje neveljavno vrednost. "
-"(Vrstica se začne z \"%(start)s\".)"
+msgid "The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line starts with \"%(start)s\".)"
+msgstr "Atribut \"%(attr)s\" v vrstici %(line)s vsebuje neveljavno vrednost. (Vrstica se začne z \"%(start)s\".)"
#: db/models/manipulators.py:302
#, python-format
msgid "%(object)s with this %(type)s already exists for the given %(field)s."
-msgstr "%(object)s s tem %(type)s že obstaja za veljavno (%field)s."
+msgstr "%(object)s s tem %(type)s že obstaja za dane %(field)s."
#: db/models/fields/__init__.py:40
#, python-format
msgid "%(optname)s with this %(fieldname)s already exists."
msgstr "%(optname)s s tem %(fieldname)s že obstaja."
-#: db/models/fields/__init__.py:114 db/models/fields/__init__.py:265
-#: db/models/fields/__init__.py:542 db/models/fields/__init__.py:553
+#: db/models/fields/__init__.py:114
+#: db/models/fields/__init__.py:265
+#: db/models/fields/__init__.py:542
+#: db/models/fields/__init__.py:553
#: forms/__init__.py:346
msgid "This field is required."
msgstr "To polje je obvezno"
#: db/models/fields/__init__.py:337
-#, fuzzy
msgid "This value must be an integer."
-msgstr "Ta vrednost mora biti potenca od %s."
+msgstr "Ta vrednost mora biti število."
#: db/models/fields/__init__.py:369
-#, fuzzy
msgid "This value must be either True or False."
-msgstr "Ta vrednost mora biti potenca od %s."
+msgstr "Ta vrednost mora biti \"True\" ali \"False\"."
#: db/models/fields/__init__.py:385
-#, fuzzy
msgid "This field cannot be null."
-msgstr "To polje ni veljavno."
+msgstr "To polje ne more biti prazno."
#: db/models/fields/__init__.py:562
msgid "Enter a valid filename."
@@ -1941,39 +1847,38 @@ msgid "Please enter a valid %s."
msgstr "Prosimo, vnesite veljaven %s."
#: db/models/fields/related.py:579
-#, fuzzy
msgid "Separate multiple IDs with commas."
msgstr "Več ID-jev ločite z vejicami."
#: db/models/fields/related.py:581
-#, fuzzy
-msgid ""
-"Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
-msgstr ""
-" Stisni \"Control\" (ali \"Command\" na Mac-u), da izbereš več kot enega."
+msgid "Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
+msgstr "Držite \"Control\" (ali \"Command\" na Mac-u), za izbiro več kot enega."
#: db/models/fields/related.py:625
#, python-format
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid."
-msgid_plural ""
-"Please enter valid %(self)s IDs. The values %(value)r are invalid."
-msgstr[0] ""
-"Prosimo, vnesite veljavni %(self)s ID-je. Vrednost %(value)r ni veljavna."
-msgstr[1] ""
-"Prosimo, vnesite veljavni %(self)s ID-je. Vrednosti %(value)r niso veljavne."
+msgid_plural "Please enter valid %(self)s IDs. The values %(value)r are invalid."
+msgstr[0] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednost %(value)r ni veljavna."
+msgstr[1] "Prosimo, vnesite veljavni %(self)s ID. Vrednosti %(value)r niso veljavne."
+msgstr[2] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednosti %(value)r niso veljavne."
+msgstr[3] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednosti %(value)r niso veljavne."
#: forms/__init__.py:380
#, python-format
msgid "Ensure your text is less than %s character."
msgid_plural "Ensure your text is less than %s characters."
-msgstr[0] "Poskrbite, da bo tekst krajši do %s znakov."
-msgstr[1] "Poskrbite, da bo tekst krajši od %s znakov."
+msgstr[0] "Poskrbite, da bo tekst krajši od %s znakov."
+msgstr[1] "Poskrbite, da bo tekst krajši od %s znaka."
+msgstr[2] "Poskrbite, da bo tekst krajši od %s znakov."
+msgstr[3] "Poskrbite, da bo tekst krajši od %s znakov."
#: forms/__init__.py:385
msgid "Line breaks are not allowed here."
msgstr "Prelomi vrstice tu niso dovoljeni."
-#: forms/__init__.py:480 forms/__init__.py:551 forms/__init__.py:589
+#: forms/__init__.py:480
+#: forms/__init__.py:551
+#: forms/__init__.py:589
#, python-format
msgid "Select a valid choice; '%(data)s' is not in %(choices)s."
msgstr "Izberite veljavno možnost; '%(data)s' ni v %(choices)s."
@@ -1998,23 +1903,24 @@ msgstr "Vnesite celo število med 0 in 32,767."
msgid "yes,no,maybe"
msgstr "ja,ne,morda"
-#~ msgid "Comment"
-#~ msgstr "Komentar"
+msgid "Comment"
+msgstr "Komentar"
+
+msgid "Comments"
+msgstr "Komentarji"
-#~ msgid "Comments"
-#~ msgstr "Komentarji"
+msgid "String (up to 50)"
+msgstr "Niz (do 50 znakov)"
-#~ msgid "String (up to 50)"
-#~ msgstr "Niz (do 50 znakov)"
+msgid "label"
+msgstr "oznaka"
-#~ msgid "label"
-#~ msgstr "oznaka"
+msgid "package"
+msgstr "paket"
-#~ msgid "package"
-#~ msgstr "paket"
+msgid "packages"
+msgstr "paketi"
-#~ msgid "packages"
-#~ msgstr "paketi"
+msgid "Slovene"
+msgstr "Slovensko"
-#~ msgid "Slovene"
-#~ msgstr "Slovenski"
diff --git a/django/contrib/auth/decorators.py b/django/contrib/auth/decorators.py
index 222c311e9c..0102496a33 100644
--- a/django/contrib/auth/decorators.py
+++ b/django/contrib/auth/decorators.py
@@ -13,6 +13,8 @@ def user_passes_test(test_func, login_url=LOGIN_URL):
if test_func(request.user):
return view_func(request, *args, **kwargs)
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path())))
+ _checklogin.__doc__ = view_func.__doc__
+ _checklogin.__dict__ = view_func.__dict__
return _checklogin
return _dec
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
index ef81268e2a..8bd9fa44c4 100644
--- a/django/contrib/auth/forms.py
+++ b/django/contrib/auth/forms.py
@@ -61,7 +61,7 @@ class PasswordResetForm(forms.Manipulator):
except User.DoesNotExist:
raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?"
- def save(self, domain_override=None):
+ def save(self, domain_override=None, email_template_name='registration/password_reset_email.html'):
"Calculates a new password randomly and sends it to the user"
from django.core.mail import send_mail
new_pass = User.objects.make_random_password()
@@ -73,7 +73,7 @@ class PasswordResetForm(forms.Manipulator):
domain = current_site.domain
else:
site_name = domain = domain_override
- t = loader.get_template('registration/password_reset_email.html')
+ t = loader.get_template(email_template_name)
c = {
'new_password': new_pass,
'email': self.user_cache.email,
diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py
index 0ffa35bcff..6882755787 100644
--- a/django/contrib/auth/views.py
+++ b/django/contrib/auth/views.py
@@ -34,9 +34,8 @@ def login(request, template_name='registration/login.html'):
def logout(request, next_page=None, template_name='registration/logged_out.html'):
"Logs out the user and displays 'You are logged out' message."
from django.contrib.auth import logout
- try:
- logout(request)
- except KeyError:
+ logout(request)
+ if next_page is None:
return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
else:
# Redirect to this page until the session has been cleared.
@@ -50,7 +49,8 @@ def redirect_to_login(next, login_url=LOGIN_URL):
"Redirects the user to the login page, passing the given 'next' page"
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, next))
-def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html'):
+def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html',
+ email_template_name='registration/password_reset_email.html'):
new_data, errors = {}, {}
form = PasswordResetForm()
if request.POST:
@@ -58,9 +58,9 @@ def password_reset(request, is_admin_site=False, template_name='registration/pas
errors = form.get_validation_errors(new_data)
if not errors:
if is_admin_site:
- form.save(request.META['HTTP_HOST'])
+ form.save(domain_override=request.META['HTTP_HOST'])
else:
- form.save()
+ form.save(email_template_name=email_template_name)
return HttpResponseRedirect('%sdone/' % request.path)
return render_to_response(template_name, {'form': forms.FormWrapper(form, new_data, errors)},
context_instance=RequestContext(request))
diff --git a/django/core/management.py b/django/core/management.py
index da8f885e26..a653196679 100644
--- a/django/core/management.py
+++ b/django/core/management.py
@@ -78,7 +78,7 @@ def get_version():
from django import VERSION
v = '.'.join([str(i) for i in VERSION[:-1]])
if VERSION[-1]:
- v += ' (%s)' % VERSION[-1]
+ v += '-' + VERSION[-1]
return v
def get_sql_create(app):
@@ -684,10 +684,10 @@ def get_validation_errors(outfile, app=None):
from django.db.models.fields.related import RelatedObject
e = ModelErrorCollection(outfile)
-
+
for (app_name, error) in get_app_errors().items():
e.add(app_name, error)
-
+
for cls in models.get_models(app):
opts = cls._meta
connection_name = model_connection_name(cls)
@@ -757,7 +757,7 @@ def get_validation_errors(outfile, app=None):
if r.get_accessor_name() == rel_query_name:
e.add(opts, "Reverse query name for field '%s' clashes with related field '%s.%s'. Add a related_name argument to the definition for '%s'." % (f.name, rel_opts.object_name, r.get_accessor_name(), f.name))
-
+
for i, f in enumerate(opts.many_to_many):
# Check to see if the related m2m field will clash with any
# existing fields, m2m fields, m2m related objects or related objects
diff --git a/django/core/serializers/json.py b/django/core/serializers/json.py
index dd6513db57..a8b4259099 100644
--- a/django/core/serializers/json.py
+++ b/django/core/serializers/json.py
@@ -41,11 +41,11 @@ class DateTimeAwareJSONEncoder(simplejson.JSONEncoder):
TIME_FORMAT = "%H:%M:%S"
def default(self, o):
- if isinstance(o, datetime.date):
+ if isinstance(o, datetime.datetime):
+ return o.strftime("%s %s" % (self.DATE_FORMAT, self.TIME_FORMAT))
+ elif isinstance(o, datetime.date):
return o.strftime(self.DATE_FORMAT)
elif isinstance(o, datetime.time):
return o.strftime(self.TIME_FORMAT)
- elif isinstance(o, datetime.datetime):
- return o.strftime("%s %s" % (self.DATE_FORMAT, self.TIME_FORMAT))
else:
return super(self, DateTimeAwareJSONEncoder).default(o) \ No newline at end of file
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index a1661a2ecd..f4817dd4c9 100644
--- a/django/core/urlresolvers.py
+++ b/django/core/urlresolvers.py
@@ -201,3 +201,19 @@ class RegexURLResolver(object):
sub_match = self.reverse(viewname, *args, **kwargs)
result = reverse_helper(self.regex, *args, **kwargs)
return result + sub_match
+
+def resolve(path, urlconf=None):
+ if urlconf is None:
+ from django.conf import settings
+ urlconf = settings.ROOT_URLCONF
+ resolver = RegexURLResolver(r'^/', urlconf)
+ return resolver.resolve(path)
+
+def reverse(viewname, urlconf=None, args=None, kwargs=None):
+ args = args or []
+ kwargs = kwargs or {}
+ if urlconf is None:
+ from django.conf import settings
+ urlconf = settings.ROOT_URLCONF
+ resolver = RegexURLResolver(r'^/', urlconf)
+ return '/' + resolver.reverse(viewname, *args, **kwargs)
diff --git a/django/db/models/__init__.py b/django/db/models/__init__.py
index 82b1238723..54df38cc7b 100644
--- a/django/db/models/__init__.py
+++ b/django/db/models/__init__.py
@@ -16,6 +16,18 @@ from django.utils.text import capfirst
# Admin stages.
ADD, CHANGE, BOTH = 1, 2, 3
+# Decorator. Takes a function that returns a tuple in this format:
+# (viewname, viewargs, viewkwargs)
+# Returns a function that calls urlresolvers.reverse() on that data, to return
+# the URL for those parameters.
+def permalink(func):
+ from django.core.urlresolvers import reverse
+ def inner(*args, **kwargs):
+ bits = func(*args, **kwargs)
+ viewname = bits[0]
+ return reverse(bits[0], None, *bits[1:2])
+ return inner
+
class LazyDate(object):
"""
Use in limit_choices_to to compare the field to dates calculated at run time
diff --git a/django/db/models/base.py b/django/db/models/base.py
index d88265579b..7cde8f944c 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -44,7 +44,7 @@ class ModelBase(type):
new_class._meta.app_label = model_module.__name__.split('.')[-2]
# Bail out early if we have already created this class.
- m = get_model(new_class._meta.app_label, name)
+ m = get_model(new_class._meta.app_label, name, False)
if m is not None:
return m
@@ -68,7 +68,7 @@ class ModelBase(type):
# the first class for this model to register with the framework. There
# should only be one class for each model, so we must always return the
# registered version.
- return get_model(new_class._meta.app_label, name)
+ return get_model(new_class._meta.app_label, name, False)
class Model(object):
__metaclass__ = ModelBase
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index 337a067745..952ab17ecc 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -247,9 +247,9 @@ class Field(object):
params['is_required'] = not self.blank and not self.primary_key and not rel
# BooleanFields (CheckboxFields) are a special case. They don't take
- # is_required or validator_list.
+ # is_required.
if isinstance(self, BooleanField):
- del params['validator_list'], params['is_required']
+ del params['is_required']
# If this field is in a related context, check whether any other fields
# in the related object have core=True. If so, add a validator --
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index 2feca99240..123436cf60 100644
--- a/django/db/models/loading.py
+++ b/django/db/models/loading.py
@@ -83,11 +83,15 @@ def get_models(app_mod=None, creation_order=False):
model_list.extend(get_models(app_mod))
return model_list
-def get_model(app_label, model_name):
+def get_model(app_label, model_name, seed_cache = True):
"""
- Returns the model matching the given app_label and case-insensitive model_name.
+ Returns the model matching the given app_label and case-insensitive
+ model_name.
+
Returns None if no model is found.
"""
+ if seed_cache:
+ get_apps()
try:
model_dict = _app_models[app_label]
except KeyError:
diff --git a/django/forms/__init__.py b/django/forms/__init__.py
index 4907bd76f7..730f7a54da 100644
--- a/django/forms/__init__.py
+++ b/django/forms/__init__.py
@@ -434,10 +434,12 @@ class HiddenField(FormField):
(self.get_id(), self.field_name, escape(data))
class CheckboxField(FormField):
- def __init__(self, field_name, checked_by_default=False):
+ def __init__(self, field_name, checked_by_default=False, validator_list=None):
+ if validator_list is None: validator_list = []
self.field_name = field_name
self.checked_by_default = checked_by_default
- self.is_required, self.validator_list = False, [] # because the validator looks for these
+ self.is_required = False # because the validator looks for these
+ self.validator_list = validator_list[:]
def render(self, data):
checked_html = ''
diff --git a/django/template/__init__.py b/django/template/__init__.py
index a4c282f2ff..ba7ca4c02b 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -358,7 +358,7 @@ class DebugParser(Parser):
super(DebugParser, self).extend_nodelist(nodelist, node, token)
def unclosed_block_tag(self, parse_until):
- (command, source) = self.command_stack.pop()
+ command, source = self.command_stack.pop()
msg = "Unclosed tag '%s'. Looking for one of: %s " % (command, ', '.join(parse_until))
raise self.source_error( source, msg)
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index a8e76a1844..7f22f207b6 100644
--- a/django/template/loader_tags.py
+++ b/django/template/loader_tags.py
@@ -50,6 +50,8 @@ class ExtendsNode(Node):
if self.parent_name_expr:
error_msg += " Got this from the %r variable." % self.parent_name_expr #TODO nice repr.
raise TemplateSyntaxError, error_msg
+ if hasattr(parent, 'render'):
+ return parent
try:
source, origin = find_template_source(parent, self.template_dirs)
except TemplateDoesNotExist:
@@ -125,7 +127,7 @@ def do_block(parser, token):
if block_name in parser.__loaded_blocks:
raise TemplateSyntaxError, "'%s' tag with name '%s' appears more than once" % (bits[0], block_name)
parser.__loaded_blocks.append(block_name)
- except AttributeError: # parser._loaded_blocks isn't a list yet
+ except AttributeError: # parser.__loaded_blocks isn't a list yet
parser.__loaded_blocks = [block_name]
nodelist = parser.parse(('endblock',))
parser.delete_first_token()
@@ -137,8 +139,9 @@ def do_extends(parser, token):
This tag may be used in two ways: ``{% extends "base" %}`` (with quotes)
uses the literal value "base" as the name of the parent template to extend,
- or ``{% extends variable %}`` uses the value of ``variable`` as the name
- of the parent template to extend.
+ or ``{% extends variable %}`` uses the value of ``variable`` as either the
+ name of the parent template to extend (if it evaluates to a string,) or as
+ the parent tempate itelf (if it evaluates to a Template object).
"""
bits = token.contents.split()
if len(bits) != 2:
diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
index 6363af7835..e05b7fafe1 100644
--- a/django/utils/autoreload.py
+++ b/django/utils/autoreload.py
@@ -35,6 +35,14 @@ try:
except ImportError:
import dummy_thread as thread
+# This import does nothing, but it's necessary to avoid some race conditions
+# in the threading module. See http://code.djangoproject.com/ticket/2330 .
+try:
+ import threading
+except ImportError:
+ pass
+
+
RUN_RELOADER = True
def reloader_thread():
diff --git a/django/utils/translation/trans_null.py b/django/utils/translation/trans_null.py
index 0eb2b5a89a..75ad573357 100644
--- a/django/utils/translation/trans_null.py
+++ b/django/utils/translation/trans_null.py
@@ -25,3 +25,6 @@ def to_locale(language):
return language[:p].lower()+'_'+language[p+1:].upper()
else:
return language.lower()
+
+def get_language_from_request(request):
+ return settings.LANGUAGE_CODE
diff --git a/django/views/generic/date_based.py b/django/views/generic/date_based.py
index 7084cdfe5e..860199c22e 100644
--- a/django/views/generic/date_based.py
+++ b/django/views/generic/date_based.py
@@ -7,7 +7,7 @@ import datetime, time
def archive_index(request, queryset, date_field, num_latest=15,
template_name=None, template_loader=loader,
extra_context=None, allow_empty=False, context_processors=None,
- mimetype=None):
+ mimetype=None, allow_future=False):
"""
Generic top-level archive of date-based objects.
@@ -20,7 +20,8 @@ def archive_index(request, queryset, date_field, num_latest=15,
"""
if extra_context is None: extra_context = {}
model = queryset.model
- queryset = queryset.filter(**{'%s__lte' % date_field: datetime.datetime.now()})
+ if not allow_future:
+ queryset = queryset.filter(**{'%s__lte' % date_field: datetime.datetime.now()})
date_list = queryset.dates(date_field, 'year')[::-1]
if not date_list and not allow_empty:
raise Http404, "No %s available" % model._meta.verbose_name
@@ -47,7 +48,7 @@ def archive_index(request, queryset, date_field, num_latest=15,
def archive_year(request, year, queryset, date_field, template_name=None,
template_loader=loader, extra_context=None, allow_empty=False,
context_processors=None, template_object_name='object', mimetype=None,
- make_object_list=False):
+ make_object_list=False, allow_future=False):
"""
Generic yearly archive view.
@@ -67,8 +68,8 @@ def archive_year(request, year, queryset, date_field, template_name=None,
lookup_kwargs = {'%s__year' % date_field: year}
- # Only bother to check current date if the year isn't in the past.
- if int(year) >= now.year:
+ # Only bother to check current date if the year isn't in the past and future objects aren't requested.
+ if int(year) >= now.year and not allow_future:
lookup_kwargs['%s__lte' % date_field] = now
date_list = queryset.filter(**lookup_kwargs).dates(date_field, 'month')
if not date_list and not allow_empty:
@@ -95,7 +96,7 @@ def archive_year(request, year, queryset, date_field, template_name=None,
def archive_month(request, year, month, queryset, date_field,
month_format='%b', template_name=None, template_loader=loader,
extra_context=None, allow_empty=False, context_processors=None,
- template_object_name='object', mimetype=None):
+ template_object_name='object', mimetype=None, allow_future=False):
"""
Generic monthly archive view.
@@ -127,19 +128,28 @@ def archive_month(request, year, month, queryset, date_field,
last_day = first_day.replace(month=first_day.month + 1)
lookup_kwargs = {'%s__range' % date_field: (first_day, last_day)}
- # Only bother to check current date if the month isn't in the past.
- if last_day >= now.date():
+ # Only bother to check current date if the month isn't in the past and future objects are requested.
+ if last_day >= now.date() and not allow_future:
lookup_kwargs['%s__lte' % date_field] = now
object_list = queryset.filter(**lookup_kwargs)
if not object_list and not allow_empty:
raise Http404
+
+ # Calculate the next month, if applicable.
+ if allow_future:
+ next_month = last_day + datetime.timedelta(days=1)
+ elif last_day < datetime.date.today():
+ next_month = last_day + datetime.timedelta(days=1)
+ else:
+ next_month = None
+
if not template_name:
template_name = "%s/%s_archive_month.html" % (model._meta.app_label, model._meta.object_name.lower())
t = template_loader.get_template(template_name)
c = RequestContext(request, {
'%s_list' % template_object_name: object_list,
'month': date,
- 'next_month': (last_day < datetime.date.today()) and (last_day + datetime.timedelta(days=1)) or None,
+ 'next_month': next_month,
'previous_month': first_day - datetime.timedelta(days=1),
}, context_processors)
for key, value in extra_context.items():
@@ -152,7 +162,7 @@ def archive_month(request, year, month, queryset, date_field,
def archive_week(request, year, week, queryset, date_field,
template_name=None, template_loader=loader,
extra_context=None, allow_empty=True, context_processors=None,
- template_object_name='object', mimetype=None):
+ template_object_name='object', mimetype=None, allow_future=False):
"""
Generic weekly archive view.
@@ -177,8 +187,8 @@ def archive_week(request, year, week, queryset, date_field,
last_day = date + datetime.timedelta(days=7)
lookup_kwargs = {'%s__range' % date_field: (first_day, last_day)}
- # Only bother to check current date if the week isn't in the past.
- if last_day >= now.date():
+ # Only bother to check current date if the week isn't in the past and future objects aren't requested.
+ if last_day >= now.date() and not allow_future:
lookup_kwargs['%s__lte' % date_field] = now
object_list = queryset.filter(**lookup_kwargs)
if not object_list and not allow_empty:
@@ -201,7 +211,7 @@ def archive_day(request, year, month, day, queryset, date_field,
month_format='%b', day_format='%d', template_name=None,
template_loader=loader, extra_context=None, allow_empty=False,
context_processors=None, template_object_name='object',
- mimetype=None):
+ mimetype=None, allow_future=False):
"""
Generic daily archive view.
@@ -229,12 +239,21 @@ def archive_day(request, year, month, day, queryset, date_field,
'%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max)),
}
- # Only bother to check current date if the date isn't in the past.
- if date >= now.date():
+ # Only bother to check current date if the date isn't in the past and future objects aren't requested.
+ if date >= now.date() and not allow_future:
lookup_kwargs['%s__lte' % date_field] = now
object_list = queryset.filter(**lookup_kwargs)
if not allow_empty and not object_list:
raise Http404
+
+ # Calculate the next day, if applicable.
+ if allow_future:
+ next_day = date + datetime.timedelta(days=1)
+ elif date < datetime.date.today():
+ next_day = date + datetime.timedelta(days=1)
+ else:
+ next_day = None
+
if not template_name:
template_name = "%s/%s_archive_day.html" % (model._meta.app_label, model._meta.object_name.lower())
t = template_loader.get_template(template_name)
@@ -242,7 +261,7 @@ def archive_day(request, year, month, day, queryset, date_field,
'%s_list' % template_object_name: object_list,
'day': date,
'previous_day': date - datetime.timedelta(days=1),
- 'next_day': (date < datetime.date.today()) and (date + datetime.timedelta(days=1)) or None,
+ 'next_day': next_day,
}, context_processors)
for key, value in extra_context.items():
if callable(value):
@@ -267,7 +286,7 @@ def object_detail(request, year, month, day, queryset, date_field,
month_format='%b', day_format='%d', object_id=None, slug=None,
slug_field=None, template_name=None, template_name_field=None,
template_loader=loader, extra_context=None, context_processors=None,
- template_object_name='object', mimetype=None):
+ template_object_name='object', mimetype=None, allow_future=False):
"""
Generic detail view from year/month/day/slug or year/month/day/id structure.
@@ -289,8 +308,8 @@ def object_detail(request, year, month, day, queryset, date_field,
'%s__range' % date_field: (datetime.datetime.combine(date, datetime.time.min), datetime.datetime.combine(date, datetime.time.max)),
}
- # Only bother to check current date if the date isn't in the past.
- if date >= now.date():
+ # Only bother to check current date if the date isn't in the past and future objects aren't requested.
+ if date >= now.date() and not allow_future:
lookup_kwargs['%s__lte' % date_field] = now
if object_id:
lookup_kwargs['%s__exact' % model._meta.pk.name] = object_id
diff --git a/docs/api_stability.txt b/docs/api_stability.txt
new file mode 100644
index 0000000000..a9d6904735
--- /dev/null
+++ b/docs/api_stability.txt
@@ -0,0 +1,123 @@
+=============
+API stability
+=============
+
+Although Django has not reached a 1.0 release, the bulk of Django's public APIs are
+stable as of the 0.95 release. This document explains which APIs will and will not
+change before the 1.0 release.
+
+What "stable" means
+===================
+
+In this context, stable means:
+
+ - All the public APIs -- everything documented in the linked documents, and
+ all methods that don't begin with an underscore -- will not be moved or
+ renamed without providing backwards-compatible aliases.
+
+ - If new features are added to these APIs -- which is quite possible --
+ they will not break or change the meaning of existing methods. In other
+ words, "stable" does not (necessarily) mean "complete."
+
+ - If, for some reason, an API declared stable must be removed or replaced, it
+ will be declared deprecated but will remain in the API until at least
+ version 1.1. Warnings will be issued when the deprecated method is
+ called.
+
+ - We'll only break backwards compatibility of these APIs if a bug or
+ security hole makes it completely unavoidable.
+
+Stable APIs
+===========
+
+These APIs are stable:
+
+ - `Caching`_.
+
+ - `Custom template tags and libraries`_ (with the possible exception for a
+ small change in the way templates are registered and loaded).
+
+ - `Database lookup`_ (with the exception of validation; see below).
+
+ - `django-admin utility`_.
+
+ - `FastCGI integration`_.
+
+ - `Flatpages`_.
+
+ - `Generic views`_.
+
+ - `Internationalization`_.
+
+ - `Legacy database integration`_.
+
+ - `Model definition`_ (with the exception of generic relations; see below).
+
+ - `mod_python integration`_.
+
+ - `Redirects`_.
+
+ - `Request/response objects`_.
+
+ - `Sending email`_.
+
+ - `Sessions`_.
+
+ - `Settings`_.
+
+ - `Syndication`_.
+
+ - `Template language`_ (with the exception of some possible disambiguation
+ of how tag arguments are passed to tags and filters).
+
+ - `Transactions`_.
+
+ - `URL dispatch`_.
+
+You'll notice that this list comprises the bulk of Django's APIs. That's right
+-- most of the changes planned between now and Django 1.0 are either under the
+hood, feature additions, or changes to a few select bits. A good estimate is
+that 90% of Django can be considered forwards-compatible at this point.
+
+That said, these APIs should *not* be considered stable, and are likely to
+change:
+
+ - `Forms and validation`_ will most likely be compeltely rewritten to
+ deemphasize Manipulators in favor of validation-aware models.
+
+ - `Serialization`_ is under heavy development; changes are likely.
+
+ - The `authentication`_ framework is changing to be far more flexible, and
+ API changes may be necessary.
+
+ - Generic relations will most likely be moved out of core and into the
+ content-types contrib package to avoid core dependacies on optional
+ components.
+
+ - The comments framework, which is yet undocumented, will likely get a complete
+ rewrite before Django 1.0. Even if the change isn't quite that drastic,
+ there will at least be moderate changes.
+
+.. _caching: http://www.djangoproject.com/documentation/cache/
+.. _custom template tags and libraries: http://www.djangoproject.com/documentation/templates_python/
+.. _database lookup: http://www.djangoproject.com/documentation/db_api/
+.. _django-admin utility: http://www.djangoproject.com/documentation/django_admin/
+.. _fastcgi integration: http://www.djangoproject.com/documentation/fastcgi/
+.. _flatpages: http://www.djangoproject.com/documentation/flatpages/
+.. _generic views: http://www.djangoproject.com/documentation/generic_views/
+.. _internationalization: http://www.djangoproject.com/documentation/i18n/
+.. _legacy database integration: http://www.djangoproject.com/documentation/legacy_databases/
+.. _model definition: http://www.djangoproject.com/documentation/model_api/
+.. _mod_python integration: http://www.djangoproject.com/documentation/modpython/
+.. _redirects: http://www.djangoproject.com/documentation/redirects/
+.. _request/response objects: http://www.djangoproject.com/documentation/request_response/
+.. _sending email: http://www.djangoproject.com/documentation/email/
+.. _sessions: http://www.djangoproject.com/documentation/sessions/
+.. _settings: http://www.djangoproject.com/documentation/settings/
+.. _syndication: http://www.djangoproject.com/documentation/syndication/
+.. _template language: http://www.djangoproject.com/documentation/templates/
+.. _transactions: http://www.djangoproject.com/documentation/transactions/
+.. _url dispatch: http://www.djangoproject.com/documentation/url_dispatch/
+.. _forms and validation: http://www.djangoproject.com/documentation/forms/
+.. _serialization: http://www.djangoproject.com/documentation/serialization/
+.. _authentication: http://www.djangoproject.com/documentation/authentication/
diff --git a/docs/contributing.txt b/docs/contributing.txt
index d7552cdc7c..9d116cac10 100644
--- a/docs/contributing.txt
+++ b/docs/contributing.txt
@@ -168,6 +168,10 @@ Please follow these coding standards when writing code for inclusion in Django:
{{foo}}
+ * Please don't put your name in the code. While we appreciate all
+ contributions to Django, our policy is not to publish individual
+ developer names in code -- for instance, at the top of Python modules.
+
Committing code
===============
@@ -212,6 +216,10 @@ repository:
first, then the "Fixed #abc." For example:
"magic-removal: Fixed #123 -- Added whizbang feature."
+ For the curious: We're using a `Trac post-commit hook`_ for this.
+
+ .. _Trac post-commit hook: http://trac.edgewall.org/browser/trunk/contrib/trac-post-commit-hook
+
* If your commit references a ticket in the Django `ticket tracker`_ but
does *not* close the ticket, include the phrase "Refs #abc", where "abc"
is the number of the ticket your commit references. We've rigged
diff --git a/docs/design_philosophies.txt b/docs/design_philosophies.txt
index 17ed3ad6da..7fdc7ea01b 100644
--- a/docs/design_philosophies.txt
+++ b/docs/design_philosophies.txt
@@ -274,8 +274,8 @@ Loose coupling
A view shouldn't care about which template system the developer uses -- or even
whether a template system is used at all.
-Designate between GET and POST
-------------------------------
+Differentiate between GET and POST
+----------------------------------
GET and POST are distinct; developers should explicitly use one or the other.
The framework should make it easy to distinguish between GET and POST data.
diff --git a/docs/faq.txt b/docs/faq.txt
index ccf8906c41..36fb547cf1 100644
--- a/docs/faq.txt
+++ b/docs/faq.txt
@@ -156,7 +156,7 @@ logical to us.
-----------------------------------------------------
We're well aware that there are other awesome Web frameworks out there, and
-we're not adverse to borrowing ideas where appropriate. However, Django was
+we're not averse to borrowing ideas where appropriate. However, Django was
developed precisely because we were unhappy with the status quo, so please be
aware that "because <Framework X>" does it is not going to be sufficient reason
to add a given feature to Django.
@@ -251,6 +251,16 @@ information than the docs that come with the latest Django release.
.. _stored in revision control: http://code.djangoproject.com/browser/django/trunk/docs
+Where can I find Django developers for hire?
+--------------------------------------------
+
+Consult our `developers for hire page`_ for a list of Django developers who
+would be happy to help you.
+
+You might also be interested in posting a job to http://www.gypsyjobs.com/ .
+
+.. _developers for hire page: http://code.djangoproject.com/wiki/DevelopersForHire
+
Installation questions
======================
@@ -546,10 +556,15 @@ Set the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting to ``True``. See the
How do I automatically set a field's value to the user who last edited the object in the admin?
-----------------------------------------------------------------------------------------------
-At this point, you can't do this. But it's an oft-requested feature, so we're
-discussing how it can be implemented. The problem is we don't want to couple
-the model layer with the admin layer with the request layer (to get the current
-user). It's a tricky problem.
+At this point, Django doesn't have an official way to do this. But it's an oft-requested
+feature, so we're discussing how it can be implemented. The problem is we don't want to couple
+the model layer with the admin layer with the request layer (to get the current user). It's a
+tricky problem.
+
+One person hacked up a `solution that doesn't require patching Django`_, but note that it's an
+unofficial solution, and there's no guarantee it won't break at some point.
+
+.. _solution that doesn't require patching Django: http://lukeplant.me.uk/blog.php?id=1107301634
How do I limit admin access so that objects can only be edited by the users who created them?
---------------------------------------------------------------------------------------------
@@ -614,3 +629,21 @@ To create a user, you'll have to use the Python API. See `creating users`_ for
full info.
.. _creating users: http://www.djangoproject.com/documentation/authentication/#creating-users
+
+Contributing code
+=================
+
+I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
+--------------------------------------------------------------------------------------------
+
+Don't worry: We're not ignoring you!
+
+It's important to understand there is a difference between "a ticket is being
+ignored" and "a ticket has not been attended to yet." Django's ticket system
+contains hundreds of open tickets, of various degrees of impact on end-user
+functionality, and Django's developers have to review and prioritize.
+
+Besides, if your feature request stands no chance of inclusion in Django, we
+won't ignore it -- we'll just close the ticket. So if your ticket is still
+open, it doesn't mean we're ignoring you; it just means we haven't had time to
+look at it yet.
diff --git a/docs/forms.txt b/docs/forms.txt
index 2fbe373744..67408f3c5d 100644
--- a/docs/forms.txt
+++ b/docs/forms.txt
@@ -404,6 +404,43 @@ Here's a simple function that might drive the above form::
errors = new_data = {}
form = forms.FormWrapper(manipulator, new_data, errors)
return render_to_response('contact_form.html', {'form': form})
+
+``FileField`` and ``ImageField`` special cases
+==============================================
+
+Dealing with ``FileField`` and ``ImageField`` objects is a little more
+complicated.
+
+First, you'll need to make sure that your ``<form>`` element correctly defines
+the ``enctype`` as ``"multipart/form-data"``, in order to upload files::
+
+ <form enctype="multipart/form-data" method="post" action="/foo/">
+
+Next, you'll need to treat the field in the template slightly differently. A
+``FileField`` or ``ImageField`` is represented by *two* HTML form elements.
+
+For example, given this field in a model::
+
+ photo = model.ImageField('/path/to/upload/location')
+
+You'd need to display two formfields in the template::
+
+ <p><label for="id_photo">Photo:</label> {{ form.photo }}{{ form.photo_file }}</p>
+
+The first bit (``{{ form.photo }}``) displays the currently-selected file,
+while the second (``{{ form.photo_file }}``) actually contains the file upload
+form field. Thus, at the validation layer you need to check the ``photo_file``
+key.
+
+Finally, in your view, make sure to access ``request.FILES``, rather than
+``request.POST``, for the uploaded files. This is necessary because
+``request.POST`` does not contain file-upload data.
+
+For example, following the ``new_data`` convention, you might do something like
+this::
+
+ new_data = request.POST.copy()
+ new_data.update(request.FILES)
Validators
==========
diff --git a/docs/generic_views.txt b/docs/generic_views.txt
index d14fe12418..aab878467f 100644
--- a/docs/generic_views.txt
+++ b/docs/generic_views.txt
@@ -148,7 +148,8 @@ are views for displaying drilldown pages for date-based data.
**Description:**
A top-level index page showing the "latest" objects, by date. Objects with
-a date in the *future* are not included.
+a date in the *future* are not included unless you set ``allow_future`` to
+``True``.
**Required arguments:**
@@ -185,6 +186,11 @@ a date in the *future* are not included.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
@@ -217,7 +223,8 @@ In addition to ``extra_context``, the template's context will be:
**Description:**
A yearly archive page showing all available months in a given year. Objects
-with a date in the *future* are not displayed.
+with a date in the *future* are not displayed unless you set ``allow_future``
+to ``True``.
**Required arguments:**
@@ -265,6 +272,11 @@ with a date in the *future* are not displayed.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
@@ -296,7 +308,8 @@ In addition to ``extra_context``, the template's context will be:
**Description:**
A monthly archive page showing all objects in a given month. Objects with a
-date in the *future* are not displayed.
+date in the *future* are not displayed unless you set ``allow_future`` to
+``True``.
**Required arguments:**
@@ -346,6 +359,11 @@ date in the *future* are not displayed.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
@@ -378,7 +396,7 @@ In addition to ``extra_context``, the template's context will be:
**Description:**
A weekly archive page showing all objects in a given week. Objects with a date
-in the *future* are not displayed.
+in the *future* are not displayed unless you set ``allow_future`` to ``True``.
**Required arguments:**
@@ -422,6 +440,11 @@ in the *future* are not displayed.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
@@ -445,7 +468,8 @@ In addition to ``extra_context``, the template's context will be:
**Description:**
A day archive page showing all objects in a given day. Days in the future throw
-a 404 error, regardless of whether any objects exist for future days.
+a 404 error, regardless of whether any objects exist for future days, unless
+you set ``allow_future`` to ``True``.
**Required arguments:**
@@ -501,6 +525,11 @@ a 404 error, regardless of whether any objects exist for future days.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
@@ -537,7 +566,9 @@ and today's date is used instead.
**Description:**
-A page representing an individual object.
+A page representing an individual object. If the object has a date value in the
+future, the view will throw a 404 error by default, unless you set
+``allow_future`` to ``True``.
**Required arguments:**
@@ -604,6 +635,11 @@ A page representing an individual object.
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
+ * ``allow_future``: A boolean specifying whether to include "future"
+ objects on this page, where "future" means objects in which the field
+ specified in ``date_field`` is greater than the current date/time. By
+ default, this is ``False``.
+
**Template name:**
If ``template_name`` isn't specified, this view will use the template
diff --git a/docs/i18n.txt b/docs/i18n.txt
index da6983dd59..e12900c2f9 100644
--- a/docs/i18n.txt
+++ b/docs/i18n.txt
@@ -235,7 +235,7 @@ To pluralize, specify both the singular and plural forms with the
``{% plural %}`` tag, which appears within ``{% blocktrans %}`` and
``{% endblocktrans %}``. Example::
- {% blocktrans count list|counted as counter %}
+ {% blocktrans count list|count as counter %}
There is only one {{ name }} object.
{% plural %}
There are {{ counter }} {{ name }} objects.
diff --git a/docs/install.txt b/docs/install.txt
index 800c49b596..fb1bd73122 100644
--- a/docs/install.txt
+++ b/docs/install.txt
@@ -77,9 +77,9 @@ It's easy either way.
Installing the official version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-1. Download Django-0.91.tar.gz from our `download page`_.
-2. ``tar xzvf Django-0.91.tar.gz``
-3. ``cd Django-0.91``
+1. Download Django-0.95.tar.gz from our `download page`_.
+2. ``tar xzvf Django-0.95.tar.gz``
+3. ``cd Django-0.95``
4. ``sudo python setup.py install``
Note that the last command will automatically download and install setuptools_
@@ -89,14 +89,6 @@ connection.
This will install Django in your Python installation's ``site-packages``
directory.
-.. note::
-
- Due to recent backwards-incompatible changes, it is strongly recommended
- that you use the development version (below) for any new applications or
- if you are just starting to work with Django. The 0.91 release is a
- dead-end branch that is primarily of use for supporting legacy Django
- applications.
-
.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
Installing the development version
diff --git a/docs/release_notes_0.95.txt b/docs/release_notes_0.95.txt
new file mode 100644
index 0000000000..e5b89e5a7a
--- /dev/null
+++ b/docs/release_notes_0.95.txt
@@ -0,0 +1,126 @@
+=================================
+Django version 0.95 release notes
+=================================
+
+
+Welcome to the Django 0.95 release.
+
+This represents a significant advance in Django development since the 0.91
+release in January 2006. The details of every change in this release would be
+too extensive to list in full, but a summary is presented below.
+
+Suitability and API stability
+=============================
+
+This release is intended to provide a stable reference point for developers
+wanting to work on production-level applications that use Django.
+
+However, it's not the 1.0 release, and we'll be introducing further changes
+before 1.0. For a clear look at which areas of the framework will change (and
+which ones will *not* change) before 1.0, see the api-stability.txt file, which
+lives in the docs/ directory of the distribution.
+
+You may have a need to use some of the features that are marked as
+"subject to API change" in that document, but that's OK with us as long as it's
+OK with you, and as long as you understand APIs may change in the future.
+
+Fortunately, most of Django's core APIs won't be changing before version 1.0.
+There likely won't be as big of a change between 0.95 and 1.0 versions as there
+was between 0.91 and 0.95.
+
+Changes and new features
+========================
+
+The major changes in this release (for developers currently using the 0.91
+release) are a result of merging the 'magic-removal' branch of development.
+This branch removed a number of constraints in the way Django code had to be
+written that were a consequence of decisions made in the early days of Django,
+prior to its open-source release. It's now possible to write more natural,
+Pythonic code that works as expected, and there's less "black magic" happening
+behind the scenes.
+
+Aside from that, another main theme of this release is a dramatic increase in
+usability. We've made countless improvements in error messages, documentation,
+etc., to improve developers' quality of life.
+
+The new features and changes introduced in 0.95 include:
+
+ * Django now uses a more consistent and natural filtering interface for
+ retrieving objects from the database.
+
+ * User-defined models, functions and constants now appear in the module
+ namespace they were defined in. (Previously everything was magically
+ transferred to the django.models.* namespace.)
+
+ * Some optional applications, such as the FlatPage, Sites and Redirects
+ apps, have been decoupled and moved into django.contrib. If you don't
+ want to use these applications, you no longer have to install their
+ database tables.
+
+ * Django now has support for managing database transactions.
+
+ * We've added the ability to write custom authentication and authorization
+ backends for authenticating users against alternate systems, such as
+ LDAP.
+
+ * We've made it easier to add custom table-level functions to models,
+ through a new "Manager" API.
+
+ * It's now possible to use Django without a database. This simply means
+ that the framework no longer requires you to have a working database set
+ up just to serve dynamic pages. In other words, you can just use
+ URLconfs/views on their own. Previously, the framework required that a
+ database be configured, regardless of whether you actually used it.
+
+ * It's now more explicit and natural to override save() and delete()
+ methods on models, rather than needing to hook into the pre_save() and
+ post_save() method hooks.
+
+ * Individual pieces of the framework now can be configured without
+ requiring the setting of an environment variable. This permits use of,
+ for example, the Django templating system inside other applications.
+
+ * More and more parts of the framework have been internationalized, as
+ we've expanded internationalization (i18n) support. The Django
+ codebase, including code and templates, has now been translated, at least
+ in part, into 31 languages. From Arabic to Chinese to Hungarian to Welsh,
+ it is now possible to use Django's admin site in your native language.
+
+The number of changes required to port from 0.91-compatible code to the 0.95
+code base are significant in some cases. However, they are, for the most part,
+reasonably routine and only need to be done once. A list of the necessary
+changes is described in the `Removing The Magic`_ wiki page. There is also an
+easy checklist_ for reference when undertaking the porting operation.
+
+.. _Removing The Magic: http://code.djangoproject.com/wiki/RemovingTheMagic
+.. _checklist: http://code.djangoproject.com/wiki/MagicRemovalCheatSheet1
+
+Problem reports and getting help
+================================
+
+Need help resolving a problem with Django? The documentation in the
+distribution is also available online_ at the `Django website`_. The FAQ_
+document is especially recommended, as it contains a number of issues that
+come up time and again.
+
+For more personalized help, the `django-users`_ mailing list is a very active
+list, with more than 2,000 subscribers who can help you solve any sort of
+Django problem. We recommend you search the archives first, though, because
+many common questions appear with some regularity, and any particular problem
+may already have been answered.
+
+Finally, for those who prefer the more immediate feedback offered by IRC,
+there's a #django channel or irc.freenode.net that is regularly populated by
+Django users and developers from around the world. Friendly people are usually
+available at any hour of the day -- to help, or just to chat.
+
+.. _online: http://www.djangoproject.com/documentation/
+.. _Django website: http://www.djangoproject.com/
+.. _FAQ: http://www.djangoproject.com/documentation/faq/
+.. _django-users: http://groups.google.com/group/django-users
+
+Thanks for using Django!
+
+The Django Team
+July 2006
+
diff --git a/docs/syndication_feeds.txt b/docs/syndication_feeds.txt
index c84785b20b..b00af200a0 100644
--- a/docs/syndication_feeds.txt
+++ b/docs/syndication_feeds.txt
@@ -427,7 +427,7 @@ This example illustrates all possible attributes and methods for a ``Feed`` clas
author's e-mail as a normal Python string.
"""
- def author_name(self):
+ def author_email(self):
"""
Returns the feed's author's e-mail as a normal Python string.
"""
diff --git a/docs/templates.txt b/docs/templates.txt
index 6117bf7b84..49d30018fe 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -363,10 +363,15 @@ extends
Signal that this template extends a parent template.
-This tag may be used in two ways: ``{% extends "base.html" %}`` (with quotes)
-uses the literal value "base.html" as the name of the parent template to
-extend, or ``{% extends variable %}`` uses the value of ``variable`` as the
-name of the parent template to extend.
+This tag can be used in two ways:
+
+ * ``{% extends "base.html" %}`` (with quotes) uses the literal value
+ ``"base.html"`` as the name of the parent template to extend.
+
+ * ``{% extends variable %}`` uses the value of ``variable``. If the variable
+ evaluates to a string, Django will use that string as the name of the
+ parent template. If the variable evaluates to a ``Template`` object,
+ Django will use that object as the parent template.
See `Template inheritance`_ for more information.
@@ -493,6 +498,11 @@ If you need to combine ``and`` and ``or`` to do advanced logic, just use nested
{% endif %}
{% endif %}
+Multiple uses of the same logical operator are fine, as long as you use the
+same operator. For example, this is valid::
+
+ {% if athlete_list or coach_list or parent_list or teacher_list %}
+
ifchanged
~~~~~~~~~
diff --git a/docs/templates_python.txt b/docs/templates_python.txt
index d353abb5bc..95ccfb3eab 100644
--- a/docs/templates_python.txt
+++ b/docs/templates_python.txt
@@ -198,21 +198,6 @@ some things to keep in mind:
How invalid variables are handled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In Django 0.91, if a variable doesn't exist, the template system fails
-silently. The variable is replaced with an empty string::
-
- >>> t = Template("My name is {{ my_name }}.")
- >>> c = Context({"foo": "bar"})
- >>> t.render(c)
- "My name is ."
-
-This applies to any level of lookup::
-
- >>> t = Template("My name is {{ person.fname }} {{ person.lname }}.")
- >>> c = Context({"person": {"fname": "Stan"}})
- >>> t.render(c)
- "My name is Stan ."
-
If a variable doesn't exist, the template system inserts the value of the
``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` (the empty
string) by default.
@@ -357,7 +342,7 @@ django.core.context_processors.request
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
-``DjangoContext`` will contain a variable ``request``, which is the current
+``RequestContext`` will contain a variable ``request``, which is the current
`HttpRequest object`_. Note that this processor is not enabled by default;
you'll have to activate it.
diff --git a/docs/transactions.txt b/docs/transactions.txt
index c1cd5aa984..2b0755a257 100644
--- a/docs/transactions.txt
+++ b/docs/transactions.txt
@@ -2,7 +2,8 @@
Managing database transactions
==============================
-Django gives you a few ways to control how database transactions are managed.
+Django gives you a few ways to control how database transactions are managed,
+if you're using a database that supports transactions.
Django's default transaction behavior
=====================================
@@ -144,3 +145,19 @@ Thus, this is best used in situations where you want to run your own
transaction-controlling middleware or do something really strange. In almost
all situations, you'll be better off using the default behavior, or the
transaction middleware, and only modify selected functions as needed.
+
+Transactions in MySQL
+=====================
+
+If you're using MySQL, your tables may or may not support transactions; it
+depends on your MySQL version and the table types you're using. (By
+"table types," we mean something like "InnoDB" or "MyISAM".) MySQL transaction
+peculiarities are outside the scope of this article, but the MySQL site has
+`information on MySQL transactions`_.
+
+If your MySQL setup does *not* support transactions, then Django will function
+in auto-commit mode: Statements will be executed and committed as soon as
+they're called. If your MySQL setup *does* support transactions, Django will
+handle transactions as explained in this document.
+
+.. _information on MySQL transactions: http://dev.mysql.com/books/mysqlpress/mysql-tutorial/ch10.html
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index 62db8ab842..1113b603da 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -81,7 +81,7 @@ the following output on the command line::
Validating models...
0 errors found.
- Django version 0.95 (post-magic-removal), using settings 'mysite.settings'
+ Django version 0.95, using settings 'mysite.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C (Unix) or CTRL-BREAK (Windows).
diff --git a/docs/tutorial02.txt b/docs/tutorial02.txt
index 84eae3eb83..bc1717e67c 100644
--- a/docs/tutorial02.txt
+++ b/docs/tutorial02.txt
@@ -54,7 +54,8 @@ http://127.0.0.1:8000/admin/. You should see the admin's login screen:
Enter the admin site
====================
-Now, try logging in. You should see the Django admin index page:
+Now, try logging in. (You created a superuser account in the first part of this
+tutorial, remember?) You should see the Django admin index page:
.. image:: http://media.djangoproject.com/img/doc/tutorial/admin02t.png
:alt: Django admin index page
diff --git a/docs/tutorial04.txt b/docs/tutorial04.txt
index 8ef4a03c6d..f234ed0ce1 100644
--- a/docs/tutorial04.txt
+++ b/docs/tutorial04.txt
@@ -198,7 +198,7 @@ By default, the ``object_detail`` generic view uses a template called
``vote()``.
Similarly, the ``object_list`` generic view uses a template called
-``<app name>/<module name>_list.html``. Thus, rename ``poll/index.html`` to
+``<app name>/<module name>_list.html``. Thus, rename ``polls/index.html`` to
``polls/poll_list.html``.
Because we have more than one entry in the URLconf that uses ``object_detail``
@@ -206,7 +206,7 @@ for the polls app, we manually specify a template name for the results view:
``template_name='polls/results.html'``. Otherwise, both views would use the same
template. Note that we use ``dict()`` to return an altered dictionary in place.
-In previous versions of the tutorial, the templates have been provided with a context
+In previous parts of the tutorial, the templates have been provided with a context
that contains the ``poll` and ``latest_poll_list`` context variables. However,
the generic views provide the variables ``object`` and ``object_list`` as context.
Therefore, you need to change your templates to match the new context variables.
diff --git a/ez_setup.py b/ez_setup.py
index fe3983fef0..33675107b2 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -14,34 +14,20 @@ the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import sys
-DEFAULT_VERSION = "0.6a10"
+DEFAULT_VERSION = "0.6c1"
DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3]
md5_data = {
- 'setuptools-0.5a13-py2.3.egg': '85edcf0ef39bab66e130d3f38f578c86',
- 'setuptools-0.5a13-py2.4.egg': 'ede4be600e3890e06d4ee5e0148e092a',
- 'setuptools-0.6a1-py2.3.egg': 'ee819a13b924d9696b0d6ca6d1c5833d',
- 'setuptools-0.6a1-py2.4.egg': '8256b5f1cd9e348ea6877b5ddd56257d',
- 'setuptools-0.6a10-py2.3.egg': '162d8357f1aff2b0349c6c247ee62987',
- 'setuptools-0.6a10-py2.4.egg': '803a2d8db501c1ac3b5b6fb4e907f788',
- 'setuptools-0.6a10dev_r42346-py2.3.egg': 'a7899272cfceb6aa60094ae8928b8077',
- 'setuptools-0.6a10dev_r42346-py2.4.egg': '5d42a64adca9aedb409f83ecf22156a5',
- 'setuptools-0.6a2-py2.3.egg': 'b98da449da411267c37a738f0ab625ba',
- 'setuptools-0.6a2-py2.4.egg': 'be5b88bc30aed63fdefd2683be135c3b',
- 'setuptools-0.6a3-py2.3.egg': 'ee0e325de78f23aab79d33106dc2a8c8',
- 'setuptools-0.6a3-py2.4.egg': 'd95453d525a456d6c23e7a5eea89a063',
- 'setuptools-0.6a4-py2.3.egg': 'e958cbed4623bbf47dd1f268b99d7784',
- 'setuptools-0.6a4-py2.4.egg': '7f33c3ac2ef1296f0ab4fac1de4767d8',
- 'setuptools-0.6a5-py2.3.egg': '748408389c49bcd2d84f6ae0b01695b1',
- 'setuptools-0.6a5-py2.4.egg': '999bacde623f4284bfb3ea77941d2627',
- 'setuptools-0.6a6-py2.3.egg': '7858139f06ed0600b0d9383f36aca24c',
- 'setuptools-0.6a6-py2.4.egg': 'c10d20d29acebce0dc76219dc578d058',
- 'setuptools-0.6a7-py2.3.egg': 'cfc4125ddb95c07f9500adc5d6abef6f',
- 'setuptools-0.6a7-py2.4.egg': 'c6d62dab4461f71aed943caea89e6f20',
- 'setuptools-0.6a8-py2.3.egg': '2f18eaaa3f544f5543ead4a68f3b2e1a',
- 'setuptools-0.6a8-py2.4.egg': '799018f2894f14c9f8bcb2b34e69b391',
- 'setuptools-0.6a9-py2.3.egg': '8e438ad70438b07b0d8f82cae42b278f',
- 'setuptools-0.6a9-py2.4.egg': '8f6e01fc12fb1cd006dc0d6c04327ec1',
+ 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
+ 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
+ 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
+ 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
+ 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
+ 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
+ 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
+ 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
+ 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
+ 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
}
import sys, os
@@ -56,7 +42,7 @@ def _validate_md5(egg_name, data):
% egg_name
)
sys.exit(2)
- return data
+ return data
def use_setuptools(
@@ -72,7 +58,7 @@ def use_setuptools(
be the number of seconds that will be paused before initiating a download,
should one be required. If an older version of setuptools is installed,
this routine will print a message to ``sys.stderr`` and raise SystemExit in
- an attempt to abort the calling script.
+ an attempt to abort the calling script.
"""
try:
import setuptools
@@ -159,7 +145,7 @@ def main(argv, version=DEFAULT_VERSION):
egg = download_setuptools(version, to_dir=tmpdir, delay=0)
sys.path.insert(0,egg)
from setuptools.command.easy_install import main
- main(list(argv)+[egg])
+ return main(list(argv)+[egg]) # we're done here
finally:
shutil.rmtree(tmpdir)
else:
@@ -187,7 +173,7 @@ def main(argv, version=DEFAULT_VERSION):
print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
-
+
def update_md5(filenames):
"""Update our built-in md5 registry"""
@@ -196,7 +182,7 @@ def update_md5(filenames):
for name in filenames:
base = os.path.basename(name)
- f = open(name,'rb')
+ f = open(name,'rb')
md5_data[base] = md5(f.read()).hexdigest()
f.close()
diff --git a/setup.py b/setup.py
index 845e5da3b5..a9823e5c4c 100644
--- a/setup.py
+++ b/setup.py
@@ -14,37 +14,7 @@ setup(
packages = find_packages(exclude=['examples', 'examples.*']),
package_data = {
'': ['*.TXT'],
- 'django.conf': ['locale/ar/LC_MESSAGES/*',
- 'locale/bn/LC_MESSAGES/*',
- 'locale/cs/LC_MESSAGES/*',
- 'locale/cy/LC_MESSAGES/*',
- 'locale/da/LC_MESSAGES/*',
- 'locale/de/LC_MESSAGES/*',
- 'locale/el/LC_MESSAGES/*',
- 'locale/en/LC_MESSAGES/*',
- 'locale/es/LC_MESSAGES/*',
- 'locale/es_AR/LC_MESSAGES/*',
- 'locale/fr/LC_MESSAGES/*',
- 'locale/gl/LC_MESSAGES/*',
- 'locale/hu/LC_MESSAGES/*',
- 'locale/he/LC_MESSAGES/*',
- 'locale/is/LC_MESSAGES/*',
- 'locale/it/LC_MESSAGES/*',
- 'locale/ja/LC_MESSAGES/*',
- 'locale/nl/LC_MESSAGES/*',
- 'locale/no/LC_MESSAGES/*',
- 'locale/pl/LC_MESSAGES/*',
- 'locale/pt_BR/LC_MESSAGES/*',
- 'locale/ro/LC_MESSAGES/*',
- 'locale/ru/LC_MESSAGES/*',
- 'locale/sk/LC_MESSAGES/*',
- 'locale/sl/LC_MESSAGES/*',
- 'locale/sr/LC_MESSAGES/*',
- 'locale/sv/LC_MESSAGES/*',
- 'locale/ta/LC_MESSAGES/*',
- 'locale/uk/LC_MESSAGES/*',
- 'locale/zh_CN/LC_MESSAGES/*',
- 'locale/zh_TW/LC_MESSAGES/*'],
+ 'django.conf': ['locale/*/LC_MESSAGES/*'],
'django.contrib.admin': ['templates/admin/*.html',
'templates/admin_doc/*.html',
'templates/registration/*.html',
diff --git a/tests/othertests/templates.py b/tests/othertests/templates.py
index 3d23d8123b..9975f3b05c 100644
--- a/tests/othertests/templates.py
+++ b/tests/othertests/templates.py
@@ -410,6 +410,12 @@ TEMPLATE_TESTS = {
# Three-level inheritance with {{ block.super }} from parent and grandparent
'inheritance23': ("{% extends 'inheritance20' %}{% block first %}{{ block.super }}b{% endblock %}", {}, '1_ab3_'),
+ # Inheritance from local context without use of template loader
+ 'inheritance24': ("{% extends context_template %}{% block first %}2{% endblock %}{% block second %}4{% endblock %}", {'context_template': template.Template("1{% block first %}_{% endblock %}3{% block second %}_{% endblock %}")}, '1234'),
+
+ # Inheritance from local context with variable parent template
+ 'inheritance25': ("{% extends context_template.1 %}{% block first %}2{% endblock %}{% block second %}4{% endblock %}", {'context_template': [template.Template("Wrong"), template.Template("1{% block first %}_{% endblock %}3{% block second %}_{% endblock %}")]}, '1234'),
+
### I18N ##################################################################
# {% spaceless %} tag
diff --git a/tests/othertests/urlpatterns_reverse.py b/tests/othertests/urlpatterns_reverse.py
new file mode 100644
index 0000000000..236944d49f
--- /dev/null
+++ b/tests/othertests/urlpatterns_reverse.py
@@ -0,0 +1,47 @@
+"Unit tests for reverse URL lookup"
+
+from django.core.urlresolvers import reverse_helper, NoReverseMatch
+import re
+
+test_data = (
+ ('^places/(\d+)/$', 'places/3/', [3], {}),
+ ('^places/(\d+)/$', 'places/3/', ['3'], {}),
+ ('^places/(\d+)/$', NoReverseMatch, ['a'], {}),
+ ('^places/(\d+)/$', NoReverseMatch, [], {}),
+ ('^places/(?P<id>\d+)/$', 'places/3/', [], {'id': 3}),
+ ('^people/(?P<name>\w+)/$', 'people/adrian/', ['adrian'], {}),
+ ('^people/(?P<name>\w+)/$', 'people/adrian/', [], {'name': 'adrian'}),
+ ('^people/(?P<name>\w+)/$', NoReverseMatch, ['name with spaces'], {}),
+ ('^people/(?P<name>\w+)/$', NoReverseMatch, [], {'name': 'name with spaces'}),
+ ('^people/(?P<name>\w+)/$', NoReverseMatch, [], {}),
+ ('^hardcoded/$', 'hardcoded/', [], {}),
+ ('^hardcoded/$', 'hardcoded/', ['any arg'], {}),
+ ('^hardcoded/$', 'hardcoded/', [], {'kwarg': 'foo'}),
+ ('^people/(?P<state>\w\w)/(?P<name>\w+)/$', 'people/il/adrian/', [], {'state': 'il', 'name': 'adrian'}),
+ ('^people/(?P<state>\w\w)/(?P<name>\d)/$', NoReverseMatch, [], {'state': 'il', 'name': 'adrian'}),
+ ('^people/(?P<state>\w\w)/(?P<name>\w+)/$', NoReverseMatch, [], {'state': 'il'}),
+ ('^people/(?P<state>\w\w)/(?P<name>\w+)/$', NoReverseMatch, [], {'name': 'adrian'}),
+ ('^people/(?P<state>\w\w)/(\w+)/$', NoReverseMatch, ['il'], {'name': 'adrian'}),
+ ('^people/(?P<state>\w\w)/(\w+)/$', 'people/il/adrian/', ['adrian'], {'state': 'il'}),
+)
+
+def run_tests(verbosity=0):
+ for regex, expected, args, kwargs in test_data:
+ passed = True
+ try:
+ got = reverse_helper(re.compile(regex), *args, **kwargs)
+ except NoReverseMatch, e:
+ if expected != NoReverseMatch:
+ passed, got = False, str(e)
+ else:
+ if got != expected:
+ passed, got = False, got
+ if passed and verbosity:
+ print "Passed: %s" % regex
+ elif not passed:
+ print "REVERSE LOOKUP FAILED: %s" % regex
+ print " Got: %s" % got
+ print " Expected: %r" % expected
+
+if __name__ == "__main__":
+ run_tests(1)