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 Avtor: %s
\n"
"\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 (500)"
msgstr "Napaka strežnika (500)"
#: 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\").
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)
\n" +"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)
\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