1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

boulder-oracle-sprint: Merged to trunk [4692].

git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4695 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Boulder Sprinters 2007-03-09 17:43:46 +00:00
parent e17f755514
commit 0b7dd14d1f
190 changed files with 25671 additions and 7854 deletions

40
AUTHORS
View File

@ -1,7 +1,6 @@
Django was originally created in late 2003 at World Online, the Web division Django was originally created in late 2003 at World Online, the Web division
of the Lawrence Journal-World newspaper in Lawrence, Kansas. of the Lawrence Journal-World newspaper in Lawrence, Kansas.
The PRIMARY AUTHORS are (and/or have been): The PRIMARY AUTHORS are (and/or have been):
Adrian Holovaty <http://www.holovaty.com/>, who originally created Django with Adrian Holovaty <http://www.holovaty.com/>, who originally created Django with
@ -43,8 +42,8 @@ people who have submitted patches, reported bugs, added translations, helped
answer newbie questions, and generally made Django that much better: answer newbie questions, and generally made Django that much better:
adurdin@gmail.com adurdin@gmail.com
akaihola
Andreas Andreas
andy@jadedplanet.net
ant9000@netwise.it ant9000@netwise.it
David Ascher <http://ascher.ca/> David Ascher <http://ascher.ca/>
Arthur <avandorp@gmail.com> Arthur <avandorp@gmail.com>
@ -53,10 +52,12 @@ answer newbie questions, and generally made Django that much better:
Shannon -jj Behrens <http://jjinux.blogspot.com/> Shannon -jj Behrens <http://jjinux.blogspot.com/>
Esdras Beleza <linux@esdrasbeleza.com> Esdras Beleza <linux@esdrasbeleza.com>
James Bennett James Bennett
Ben <afternoon@uk2.net>
Paul Bissex <http://e-scribe.com/> Paul Bissex <http://e-scribe.com/>
Simon Blanchard Simon Blanchard
Andrew Brehaut <http://brehaut.net/blog> Andrew Brehaut <http://brehaut.net/blog>
andy@jadedplanet.net brut.alll@gmail.com
Jonathan Buchanan <jonathan.buchanan@gmail.com>
Antonio Cavedoni <http://cavedoni.com/> Antonio Cavedoni <http://cavedoni.com/>
C8E C8E
Chris Chamberlin <dja@cdc.msbx.net> Chris Chamberlin <dja@cdc.msbx.net>
@ -65,42 +66,53 @@ answer newbie questions, and generally made Django that much better:
Ian Clelland <clelland@gmail.com> Ian Clelland <clelland@gmail.com>
crankycoder@gmail.com crankycoder@gmail.com
Matt Croydon <http://www.postneo.com/> Matt Croydon <http://www.postneo.com/>
Jure Cuhalev <gandalf@owca.info>
dackze+django@gmail.com dackze+django@gmail.com
Dirk Datzert <dummy@habmalnefrage.de>
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/> Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
dave@thebarproject.com
Jason Davies (Esaj) <http://www.jasondavies.com/> Jason Davies (Esaj) <http://www.jasondavies.com/>
Alex Dedul Alex Dedul
deric@monowerks.com deric@monowerks.com
dne@mayonnaise.net dne@mayonnaise.net
Maximillian Dornseif <md@hudora.de> Maximillian Dornseif <md@hudora.de>
dummy@habmalnefrage.de
Jeremy Dunck <http://dunck.us/> Jeremy Dunck <http://dunck.us/>
Andy Dustman <farcepest@gmail.com> Andy Dustman <farcepest@gmail.com>
Clint Ecker Clint Ecker
Enrico <rico.bl@gmail.com> Enrico <rico.bl@gmail.com>
Ludvig Ericson <ludvig.ericson@gmail.com>
Dirk Eschler <dirk.eschler@gmx.net>
Marc Fargas <telenieko@telenieko.com>
favo@exoweb.net favo@exoweb.net
Eric Floehr <eric@intellovations.com> Eric Floehr <eric@intellovations.com>
gandalf@owca.info gandalf@owca.info
Baishampayan Ghose Baishampayan Ghose
martin.glueck@gmail.com martin.glueck@gmail.com
Simon Greenhill <dev@simon.net.nz> Simon Greenhill <dev@simon.net.nz>
Owen Griffiths
Espen Grindhaug <http://grindhaug.org/> Espen Grindhaug <http://grindhaug.org/>
Brian Harring <ferringb@gmail.com>
Brant Harris Brant Harris
Hawkeye Hawkeye
heckj@mac.com Joe Heck <http://www.rhonabwy.com/wp/>
Joel Heenan <joelh-django@planetjoel.com> Joel Heenan <joelh-django@planetjoel.com>
hipertracker@gmail.com hipertracker@gmail.com
Ian Holsman <http://feh.holsman.net/> Ian Holsman <http://feh.holsman.net/>
Kieran Holland <http://www.kieranholland.com> Kieran Holland <http://www.kieranholland.com>
Robert Rock Howard <http://djangomojo.com/> Robert Rock Howard <http://djangomojo.com/>
Jason Huggins <http://www.jrandolph.com/blog/> Jason Huggins <http://www.jrandolph.com/blog/>
Baurzhan Ismagulov <ibr@radix50.net> Tom Insam
Baurzhan Ismagulov <ibr@radix50.net>
jcrasta@gmail.com jcrasta@gmail.com
Michael Josephson <http://www.sdjournal.com/> Michael Josephson <http://www.sdjournal.com/>
jpellerin@gmail.com jpellerin@gmail.com
junzhang.jn@gmail.com junzhang.jn@gmail.com
Antti Kaihola <http://akaihola.blogspot.com/>
Ben Dean Kawamura <ben.dean.kawamura@gmail.com>
Garth Kidd <http://www.deadlybloodyserious.com/> Garth Kidd <http://www.deadlybloodyserious.com/>
kilian <kilian.cavalotti@lip6.fr> kilian <kilian.cavalotti@lip6.fr>
Sune Kirkeby <http://ibofobi.dk/> Sune Kirkeby <http://ibofobi.dk/>
Bastian Kleineidam <calvin@debian.org>
Cameron Knight (ckknight) Cameron Knight (ckknight)
Meir Kriheli <http://mksoft.co.il/> Meir Kriheli <http://mksoft.co.il/>
Bruce Kroeze <http://coderseye.com/> Bruce Kroeze <http://coderseye.com/>
@ -108,22 +120,25 @@ answer newbie questions, and generally made Django that much better:
konrad@gwu.edu konrad@gwu.edu
lakin.wecker@gmail.com lakin.wecker@gmail.com
Stuart Langridge <http://www.kryogenix.org/> Stuart Langridge <http://www.kryogenix.org/>
Nicola Larosa <nico@teknico.net>
Eugene Lazutkin <http://lazutkin.com/blog/> Eugene Lazutkin <http://lazutkin.com/blog/>
Jeong-Min Lee <falsetru@gmail.com> Jeong-Min Lee <falsetru@gmail.com>
Christopher Lenz <http://www.cmlenz.net/> Christopher Lenz <http://www.cmlenz.net/>
lerouxb@gmail.com lerouxb@gmail.com
Waylan Limberg <waylan@gmail.com>
limodou limodou
mattmcc mattmcc
Martin Maney <http://www.chipy.org/Martin_Maney> Martin Maney <http://www.chipy.org/Martin_Maney>
masonsimon+django@gmail.com masonsimon+django@gmail.com
Manuzhai Manuzhai
Petar Marić Petar Marić <http://www.petarmaric.com/>
mark@junklight.com mark@junklight.com
Yasushi Masuda <whosaysni@gmail.com> Yasushi Masuda <whosaysni@gmail.com>
mattycakes@gmail.com mattycakes@gmail.com
Jason McBrayer <http://www.carcosa.net/jason/> Jason McBrayer <http://www.carcosa.net/jason/>
mccutchen@gmail.com mccutchen@gmail.com
michael.mcewan@gmail.com michael.mcewan@gmail.com
mikko@sorl.net
mitakummaa@gmail.com mitakummaa@gmail.com
mmarshall mmarshall
Eric Moritz <http://eric.themoritzfamily.com/> Eric Moritz <http://eric.themoritzfamily.com/>
@ -135,9 +150,11 @@ answer newbie questions, and generally made Django that much better:
Neal Norwitz <nnorwitz@google.com> Neal Norwitz <nnorwitz@google.com>
oggie rob <oz.robharvey@gmail.com> oggie rob <oz.robharvey@gmail.com>
Jay Parlar <parlar@gmail.com> Jay Parlar <parlar@gmail.com>
pavithran s <pavithran.s@gmail.com>
pgross@thoughtworks.com pgross@thoughtworks.com
phaedo <http://phaedo.cx/> phaedo <http://phaedo.cx/>
phil@produxion.net phil@produxion.net
phil.h.smith@gmail.com
Gustavo Picon Gustavo Picon
Luke Plant <http://lukeplant.me.uk/> Luke Plant <http://lukeplant.me.uk/>
plisk plisk
@ -146,31 +163,36 @@ answer newbie questions, and generally made Django that much better:
Michael Radziej <mir@noris.de> Michael Radziej <mir@noris.de>
ramiro ramiro
Brian Ray <http://brianray.chipy.org/> Brian Ray <http://brianray.chipy.org/>
remco@diji.biz
rhettg@gmail.com rhettg@gmail.com
Oliver Rutherfurd <http://rutherfurd.net/> Oliver Rutherfurd <http://rutherfurd.net/>
Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/> Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
David Schein David Schein
scott@staplefish.com
serbaut@gmail.com serbaut@gmail.com
Pete Shinners <pete@shinners.org> Pete Shinners <pete@shinners.org>
SmileyChris <smileychris@gmail.com> SmileyChris <smileychris@gmail.com>
smurf@smurf.noris.de smurf@smurf.noris.de
sopel sopel
Thomas Steinacher <tom@eggdrop.ch> Georgi Stanojevski <glisha@gmail.com>
Thomas Steinacher <http://www.eggdrop.ch/>
nowell strite nowell strite
Radek Švarz <http://www.svarz.cz/translate/> Radek Švarz <http://www.svarz.cz/translate/>
Swaroop C H <http://www.swaroopch.info> Swaroop C H <http://www.swaroopch.info>
Aaron Swartz <http://www.aaronsw.com/> Aaron Swartz <http://www.aaronsw.com/>
Tyson Tate <tyson@fallingbullets.com> Tyson Tate <tyson@fallingbullets.com>
Tom Tobin Tom Tobin
Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/> Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
torne-django@wolfpuppy.org.uk
Karen Tracey <graybark@bellsouth.net> Karen Tracey <graybark@bellsouth.net>
Makoto Tsuyuki <mtsuyuki@gmail.com> Makoto Tsuyuki <mtsuyuki@gmail.com>
Amit Upadhyay Amit Upadhyay
Geert Vanderkelen Geert Vanderkelen
viestards.lists@gmail.com
Milton Waddams Milton Waddams
wam-djangobug@wamber.net wam-djangobug@wamber.net
Dan Watson <http://theidioteque.net/> Dan Watson <http://theidioteque.net/>
Chris Wesseling <Chris.Wesseling@cwi.nl>
Rachel Willmer <http://www.willmer.com/kb/> Rachel Willmer <http://www.willmer.com/kb/>
Gary Wilson <gary.wilson@gmail.com> Gary Wilson <gary.wilson@gmail.com>
wojtek wojtek

View File

@ -1,8 +1,10 @@
include AUTHORS include AUTHORS
include INSTALL include INSTALL
include LICENSE include LICENSE
recursive-include docs *
recursive-include scripts *
recursive-include django/conf/locale * recursive-include django/conf/locale *
recursive-include django/contrib/admin/templates recursive-include django/contrib/admin/templates *
recursive-include django/contrib/admin/media recursive-include django/contrib/admin/media *
recursive-include django/contrib/comments/templates recursive-include django/contrib/comments/templates *
recursive-include django/contrib/sitemaps/templates recursive-include django/contrib/sitemaps/templates *

View File

@ -1,9 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python
import optparse
import os import os
import sys import sys
def compile_messages(): def compile_messages(locale=None):
basedir = None basedir = None
if os.path.isdir(os.path.join('conf', 'locale')): if os.path.isdir(os.path.join('conf', 'locale')):
@ -14,6 +15,9 @@ def compile_messages():
print "This script should be run from the Django SVN tree or your project or app tree." print "This script should be run from the Django SVN tree or your project or app tree."
sys.exit(1) sys.exit(1)
if locale is not None:
basedir = os.path.join(basedir, locale, 'LC_MESSAGES')
for dirpath, dirnames, filenames in os.walk(basedir): for dirpath, dirnames, filenames in os.walk(basedir):
for f in filenames: for f in filenames:
if f.endswith('.po'): if f.endswith('.po'):
@ -32,5 +36,14 @@ def compile_messages():
cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"' cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"'
os.system(cmd) os.system(cmd)
def main():
parser = optparse.OptionParser()
parser.add_option('-l', '--locale', dest='locale',
help="The locale to process. Default is to process all.")
options, args = parser.parse_args()
if len(args):
parser.error("This program takes no arguments")
compile_messages(options.locale)
if __name__ == "__main__": if __name__ == "__main__":
compile_messages() main()

View File

@ -7,6 +7,7 @@ a list of all possible variables.
""" """
import os import os
import time # Needed for Windows
from django.conf import global_settings from django.conf import global_settings
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
@ -105,8 +106,10 @@ class Settings(object):
new_installed_apps.append(app) new_installed_apps.append(app)
self.INSTALLED_APPS = new_installed_apps self.INSTALLED_APPS = new_installed_apps
# move the time zone info into os.environ if hasattr(time, 'tzset'):
os.environ['TZ'] = self.TIME_ZONE # Move the time zone info into os.environ. See ticket #2315 for why
# we don't do this unconditionally (breaks Windows).
os.environ['TZ'] = self.TIME_ZONE
def get_all_members(self): def get_all_members(self):
return dir(self) return dir(self)

View File

@ -38,6 +38,7 @@ LANGUAGE_CODE = 'en-us'
LANGUAGES = ( LANGUAGES = (
('ar', gettext_noop('Arabic')), ('ar', gettext_noop('Arabic')),
('bn', gettext_noop('Bengali')), ('bn', gettext_noop('Bengali')),
('ca', gettext_noop('Catalan')),
('cs', gettext_noop('Czech')), ('cs', gettext_noop('Czech')),
('cy', gettext_noop('Welsh')), ('cy', gettext_noop('Welsh')),
('da', gettext_noop('Danish')), ('da', gettext_noop('Danish')),
@ -54,6 +55,9 @@ LANGUAGES = (
('is', gettext_noop('Icelandic')), ('is', gettext_noop('Icelandic')),
('it', gettext_noop('Italian')), ('it', gettext_noop('Italian')),
('ja', gettext_noop('Japanese')), ('ja', gettext_noop('Japanese')),
('kn', gettext_noop('Kannada')),
('lv', gettext_noop('Latvian')),
('mk', gettext_noop('Macedonian')),
('nl', gettext_noop('Dutch')), ('nl', gettext_noop('Dutch')),
('no', gettext_noop('Norwegian')), ('no', gettext_noop('Norwegian')),
('pl', gettext_noop('Polish')), ('pl', gettext_noop('Polish')),
@ -65,6 +69,7 @@ LANGUAGES = (
('sr', gettext_noop('Serbian')), ('sr', gettext_noop('Serbian')),
('sv', gettext_noop('Swedish')), ('sv', gettext_noop('Swedish')),
('ta', gettext_noop('Tamil')), ('ta', gettext_noop('Tamil')),
('te', gettext_noop('Telugu')),
('tr', gettext_noop('Turkish')), ('tr', gettext_noop('Turkish')),
('uk', gettext_noop('Ukrainian')), ('uk', gettext_noop('Ukrainian')),
('zh-cn', gettext_noop('Simplified Chinese')), ('zh-cn', gettext_noop('Simplified Chinese')),
@ -95,7 +100,7 @@ SERVER_EMAIL = 'root@localhost'
SEND_BROKEN_LINK_EMAILS = False SEND_BROKEN_LINK_EMAILS = False
# Database connection info. # Database connection info.
DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = '' # Or path to database file if using sqlite3. DATABASE_NAME = '' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3. DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3.
@ -315,3 +320,10 @@ TEST_RUNNER = 'django.test.simple.run_tests'
# The name of the database to use for testing purposes. # The name of the database to use for testing purposes.
# If None, a name of 'test_' + DATABASE_NAME will be assumed # If None, a name of 'test_' + DATABASE_NAME will be assumed
TEST_DATABASE_NAME = None TEST_DATABASE_NAME = None
############
# FIXTURES #
############
# The list of directories to search for fixtures
FIXTURE_DIRS = ()

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,121 @@
# translation of djangojs.po to
# Spanish translation for the django-admin JS files.
# Copyright (C)
# This file is distributed under the same license as the PACKAGE package.
#
# Jorge Gajon <gajon@gajon.org>, 2005.
# Marc Fargas <marc@fargas.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: djangojs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-15 11:05+1100\n"
"PO-Revision-Date: 2007-01-19 10:30+0100\n"
"Last-Translator: Marc Fargas <marc@fargas.com>\n"
"Language-Team: <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr "%s Disponibles"
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "Seleccionar tots"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "Afegir"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "Eliminar"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "%s Escollits"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr "Faci les seves seleccions i faci click a"
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "Deseleccionar tots"
#: contrib/admin/media/js/dateparse.js:32
#: contrib/admin/media/js/calendar.js:24
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"Febrer Març Abril Maig Juny Juliol Agost Setembre Octubre Novembre Desembre"
#: contrib/admin/media/js/dateparse.js:33
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Diumenge Dilluns Dimarts Dimecres Dijous Divendres Dissabte"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "D L M X J V S"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now"
msgstr "Ara"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock"
msgstr "Rellotje"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time"
msgstr "Esculli una hora"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight"
msgstr "Mitja nit"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m."
msgstr "6 a.m."
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon"
msgstr "Migdia"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel"
msgstr "Cancel·lar"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today"
msgstr "Avui"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar"
msgstr "Calendari"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday"
msgstr "Ahir"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow"
msgstr "Demà"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr ""
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr ""

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n" "POT-Creation-Date: 2005-12-09 11:51+0100\n"
"PO-Revision-Date: 2005-12-04 13:21+0100\n" "PO-Revision-Date: 2005-12-04 13:21+0100\n"
"Last-Translator: Georg Bauer <gb@bofh.ms>\n" "Last-Translator: Dirk Eschler <dirk.eschler@gmx.net>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n" "Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -21,11 +21,11 @@ msgstr "Verf
#: contrib/admin/media/js/SelectFilter2.js:41 #: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all" msgid "Choose all"
msgstr "alles auswählen" msgstr "Alles auswählen"
#: contrib/admin/media/js/SelectFilter2.js:46 #: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add" msgid "Add"
msgstr "Zufügen" msgstr "Hinzufügen"
#: contrib/admin/media/js/SelectFilter2.js:48 #: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove" msgid "Remove"
@ -42,7 +42,7 @@ msgstr "Gew
#: contrib/admin/media/js/SelectFilter2.js:59 #: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all" msgid "Clear all"
msgstr "alles abwählen" msgstr "Alles abwählen"
#: contrib/admin/media/js/dateparse.js:26 #: contrib/admin/media/js/dateparse.js:26
#: contrib/admin/media/js/calendar.js:24 #: contrib/admin/media/js/calendar.js:24
@ -89,7 +89,7 @@ msgstr "Mittag"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
msgid "Cancel" msgid "Cancel"
msgstr "Abbruch" msgstr "Abbrechen"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
@ -107,3 +107,13 @@ msgstr "Gestern"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow" msgid "Tomorrow"
msgstr "Morgen" msgstr "Morgen"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "Anzeigen"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "Verbergen"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,14 @@
# Argentinean spanish translation for the django-admin JS files, based on # Argentinean spanish translation for the django-admin JS files, based on
# Spanish translation work by Jorge Gajon. # Spanish translation work by Jorge Gajon.
# Copyright (C) # This file is distributed under the same license as the Django package.
# This file is distributed under the same license as the PACKAGE package. # Copyright (C) Ramiro Morales <rm0@gmx.net>, 2006,2007.
# Ramiro Morales <rm0@gmx.net>, 2006.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django JavaScript 1.0\n" "Project-Id-Version: Django JavaScript 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-25 15:09-0300\n" "POT-Creation-Date: 2007-02-25 17:48-0300\n"
"PO-Revision-Date: 2006-05-16 10:20-0300\n" "PO-Revision-Date: 2007-02-25 17:55-0300\n"
"Last-Translator: Ramiro Morales <rm0@gmx.net>\n" "Last-Translator: Ramiro Morales <rm0@gmx.net>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Type: text/plain; charset=ISO-8859-1\n"

View File

@ -93,7 +93,7 @@ msgstr "tšekki"
#: conf/global_settings.py:42 #: conf/global_settings.py:42
msgid "Welsh" msgid "Welsh"
msgstr "" msgstr "wales"
#: conf/global_settings.py:43 #: conf/global_settings.py:43
msgid "Danish" msgid "Danish"
@ -169,15 +169,15 @@ msgstr "venäjä"
#: conf/global_settings.py:61 #: conf/global_settings.py:61
msgid "Slovak" msgid "Slovak"
msgstr "" msgstr "slovakia"
#: conf/global_settings.py:62 #: conf/global_settings.py:62
msgid "Slovenian" msgid "Slovenian"
msgstr "" msgstr "slovenia"
#: conf/global_settings.py:63 #: conf/global_settings.py:63
msgid "Serbian" msgid "Serbian"
msgstr "" msgstr "serbia"
#: conf/global_settings.py:64 #: conf/global_settings.py:64
msgid "Swedish" msgid "Swedish"
@ -189,15 +189,15 @@ msgstr ""
#: conf/global_settings.py:66 #: conf/global_settings.py:66
msgid "Ukrainian" msgid "Ukrainian"
msgstr "" msgstr "ukraina"
#: conf/global_settings.py:67 #: conf/global_settings.py:67
msgid "Simplified Chinese" msgid "Simplified Chinese"
msgstr "" msgstr "kiina (yksinkertaistettu)"
#: conf/global_settings.py:68 #: conf/global_settings.py:68
msgid "Traditional Chinese" msgid "Traditional Chinese"
msgstr "" msgstr "kiina (perinteinen)"
#: core/validators.py:63 #: core/validators.py:63
msgid "This value must contain only letters, numbers and underscores." msgid "This value must contain only letters, numbers and underscores."
@ -211,7 +211,7 @@ msgstr "Tässä voidaan käyttää vain kirjaimia (a-z), numeroita (0-9) sekä a
#: core/validators.py:75 #: core/validators.py:75
msgid "Uppercase letters are not allowed here." msgid "Uppercase letters are not allowed here."
msgstr "Versaalit (ABC) eivät kelpaa tässä." msgstr "Isot kirjaimet (ABC) eivät kelpaa tässä."
#: core/validators.py:79 #: core/validators.py:79
msgid "Lowercase letters are not allowed here." msgid "Lowercase letters are not allowed here."
@ -270,7 +270,7 @@ msgstr "Kuva ei kelpaa. Lähettämäsi tiedosto ei ole kuva, tai tiedosto on vio
#: core/validators.py:162 #: core/validators.py:162
#, python-format #, python-format
msgid "The URL %s does not point to a valid image." msgid "The URL %s does not point to a valid image."
msgstr "Osoittessa %s ei ole kelpaavaa kuvaa." msgstr "Osoittessa %s ei ole kuvaa tai se on vioittunut."
#: core/validators.py:166 #: core/validators.py:166
#, python-format #, python-format
@ -280,7 +280,7 @@ msgstr "Puhelinnumeron tulee olla muodossa XXX-XXX-XXXX. \"%s\" ei kelpaa."
#: core/validators.py:174 #: core/validators.py:174
#, python-format #, python-format
msgid "The URL %s does not point to a valid QuickTime video." msgid "The URL %s does not point to a valid QuickTime video."
msgstr "Osoitteessa %s ei ole kelpaavaa QuickTime-videota." msgstr "Osoitteessa %s ei ole QuickTime-videota tai se on vioittunut."
#: core/validators.py:178 #: core/validators.py:178
msgid "A valid URL is required." msgid "A valid URL is required."
@ -308,7 +308,7 @@ msgstr "URL-osoite %s ei kelpaa."
#: core/validators.py:213 core/validators.py:215 #: core/validators.py:213 core/validators.py:215
#, python-format #, python-format
msgid "The URL %s is a broken link." msgid "The URL %s is a broken link."
msgstr "Osoite %s on katkennut linkki." msgstr "Osoite %s on rikkoutunut tai väärä linkki."
#: core/validators.py:221 #: core/validators.py:221
msgid "Enter a valid U.S. state abbreviation." msgid "Enter a valid U.S. state abbreviation."
@ -324,7 +324,7 @@ msgstr[1] "Sanoja \"%s\" ei saa käyttää tässä."
#: core/validators.py:243 #: core/validators.py:243
#, python-format #, python-format
msgid "This field must match the '%s' field." msgid "This field must match the '%s' field."
msgstr "" msgstr "Arvon täytyy olla sama kuin kentässä '%s'."
#: core/validators.py:262 #: core/validators.py:262
msgid "Please enter something for at least one field." msgid "Please enter something for at least one field."
@ -403,7 +403,7 @@ msgstr "Tämä arvo ei kelpaa."
#: core/validators.py:441 #: core/validators.py:441
#, python-format #, python-format
msgid "Could not retrieve anything from %s." msgid "Could not retrieve anything from %s."
msgstr "" msgstr "Tietoja ei voida noutaa kohteesta: %s."
#: core/validators.py:444 #: core/validators.py:444
#, python-format #, python-format
@ -1029,19 +1029,19 @@ msgstr " %(filter_title)s:"
#: contrib/admin/templates/admin/submit_line.html:4 #: contrib/admin/templates/admin/submit_line.html:4
msgid "Save as new" msgid "Save as new"
msgstr "Talleta uutena" msgstr "Tallenna uutena"
#: contrib/admin/templates/admin/submit_line.html:5 #: contrib/admin/templates/admin/submit_line.html:5
msgid "Save and add another" msgid "Save and add another"
msgstr "Talleta ja lisää seuraava" msgstr "Tallenna ja lisää seuraava"
#: contrib/admin/templates/admin/submit_line.html:6 #: contrib/admin/templates/admin/submit_line.html:6
msgid "Save and continue editing" msgid "Save and continue editing"
msgstr "Talleta välillä ja jatka muokkaamista" msgstr "Tallenna välillä ja jatka muokkaamista"
#: contrib/admin/templates/admin/submit_line.html:7 #: contrib/admin/templates/admin/submit_line.html:7
msgid "Save" msgid "Save"
msgstr "Talleta ja poistu" msgstr "Tallenna ja poistu"
#: contrib/admin/templates/admin/change_list.html:11 #: contrib/admin/templates/admin/change_list.html:11
#, python-format #, python-format
@ -1676,7 +1676,13 @@ msgid_plural ""
"\n" "\n"
"%(text)s" "%(text)s"
msgstr[0] "" msgstr[0] ""
"Kommentin kirjoittanut käyttäjä on kirjoittanut vain yhden kommentin:\n"
"\n"
"%(text)s"
msgstr[1] "" msgstr[1] ""
"Kommentin kirjoittanut käyttäjä on kirjoittanut alle %(count)s kommenttia:\n"
"\n"
"%(text)s"
# Mitä "sketchy user" tarkoittaa? # Mitä "sketchy user" tarkoittaa?
#: contrib/comments/views/comments.py:116 #: contrib/comments/views/comments.py:116
@ -1972,38 +1978,38 @@ msgstr "joulu"
#: utils/timesince.py:12 #: utils/timesince.py:12
msgid "year" msgid "year"
msgid_plural "years" msgid_plural "years"
msgstr[0] "" msgstr[0] "vuosi"
msgstr[1] "" msgstr[1] "vuotta"
#: utils/timesince.py:13 #: utils/timesince.py:13
msgid "month" msgid "month"
msgid_plural "months" msgid_plural "months"
msgstr[0] "" msgstr[0] "kuukausi"
msgstr[1] "" msgstr[1] "kuukautta"
#: utils/timesince.py:14 #: utils/timesince.py:14
msgid "week" msgid "week"
msgid_plural "weeks" msgid_plural "weeks"
msgstr[0] "" msgstr[0] "viikko"
msgstr[1] "" msgstr[1] "viikkoa"
#: utils/timesince.py:15 #: utils/timesince.py:15
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "" msgstr[0] "päivä"
msgstr[1] "" msgstr[1] "päivää"
#: utils/timesince.py:16 #: utils/timesince.py:16
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "" msgstr[0] "tunti"
msgstr[1] "" msgstr[1] "tuntia"
#: utils/timesince.py:17 #: utils/timesince.py:17
msgid "minute" msgid "minute"
msgid_plural "minutes" msgid_plural "minutes"
msgstr[0] "" msgstr[0] "minuutti"
msgstr[1] "" msgstr[1] "minuuttia"
#: utils/translation/trans_real.py:362 #: utils/translation/trans_real.py:362
msgid "DATE_FORMAT" msgid "DATE_FORMAT"
@ -2019,10 +2025,9 @@ msgstr "G:i"
#: utils/translation/trans_real.py:380 #: utils/translation/trans_real.py:380
msgid "YEAR_MONTH_FORMAT" msgid "YEAR_MONTH_FORMAT"
msgstr "N j, Y" msgstr "N Y"
#: utils/translation/trans_real.py:381 #: utils/translation/trans_real.py:381
#, fuzzy
msgid "MONTH_DAY_FORMAT" msgid "MONTH_DAY_FORMAT"
msgstr "N j, Y" msgstr "N j, Y"

View File

@ -1491,8 +1491,8 @@ msgstr[1] "mois"
#: utils/timesince.py:14 #: utils/timesince.py:14
msgid "week" msgid "week"
msgid_plural "weeks" msgid_plural "weeks"
msgstr[0] "" msgstr[0] "semaine"
msgstr[1] "" msgstr[1] "semaines"
#: utils/timesince.py:15 #: utils/timesince.py:15
msgid "day" msgid "day"

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,39 @@
# translation of djangojs.po to Italiano
# Italian translation for the django-admin JS files # Italian translation for the django-admin JS files
# Copyright (C) 2006 the Lawrence Journal-World # Copyright (C) 2006 the Lawrence Journal-World
# This file is distributed under the same license as the Django package. # This file is distributed under the same license as the Django package.
# Carlo C8E Miron <carlo.miron AT gmail.com>, 2006.
# #
# Carlo C8E Miron <carlo.miron AT gmail.com>, 2006.
# Nicola 'tekNico' Larosa <nico@tekNico.net>, 2007.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django JavaScript 1.0\n" "Project-Id-Version: djangojs\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n" "POT-Creation-Date: 2007-02-26 20:46+0100\n"
"PO-Revision-Date: 2005-12-04 21:47+0100\n" "PO-Revision-Date: 2007-02-26 20:55+0100\n"
"Last-Translator: Carlo C8E Miron <carlo.miron AT gmail.com>\n" "Last-Translator: Nicola Larosa <nico@tekNico.net>\n"
"Language-Team: Italian <Django-I18N@googlegroups.com>\n"
"MIME-Version: 1.0\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" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.11.2\n"
#: contrib/admin/media/js/calendar.js:24
#: contrib/admin/media/js/dateparse.js:32
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre "
"Novembre Dicembre"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "D L M M G V S"
#: contrib/admin/media/js/dateparse.js:33
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Domenica Lunedì Martedì Mercoledì Giovedì Venerdì Sabato"
#: contrib/admin/media/js/SelectFilter2.js:33 #: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format #, perl-format
@ -23,7 +42,7 @@ msgstr "Disponibile %s"
#: contrib/admin/media/js/SelectFilter2.js:41 #: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all" msgid "Choose all"
msgstr "Seleziona tutto" msgstr "Scegli tutto"
#: contrib/admin/media/js/SelectFilter2.js:46 #: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add" msgid "Add"
@ -36,7 +55,7 @@ msgstr "Rimuovi"
#: contrib/admin/media/js/SelectFilter2.js:53 #: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format #, perl-format
msgid "Chosen %s" msgid "Chosen %s"
msgstr "Selezionato %s" msgstr "Scelto %s"
#: contrib/admin/media/js/SelectFilter2.js:54 #: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click " msgid "Select your choice(s) and click "
@ -46,66 +65,59 @@ msgstr "Seleziona le tue scelte e clicca "
msgid "Clear all" msgid "Clear all"
msgstr "Cancella tutto" msgstr "Cancella tutto"
#: contrib/admin/media/js/dateparse.js:26 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/calendar.js:24 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre "
"Novembre Dicembre"
#: contrib/admin/media/js/dateparse.js:27
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Domenica Lunedì Martedì Mercoledì Giovedì Venerdì Sabato"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "D L M M G V S"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now" msgid "Now"
msgstr "Adesso" msgstr "Adesso"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock" msgid "Clock"
msgstr "Orologio" msgstr "Orologio"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time" msgid "Choose a time"
msgstr "Seleziona un orario" msgstr "Scegli un orario"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight" msgid "Midnight"
msgstr "Mezzanotte" msgstr "Mezzanotte"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m." msgid "6 a.m."
msgstr "6 del mattino" msgstr "6 del mattino"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon" msgid "Noon"
msgstr "Mezzogiorno" msgstr "Mezzogiorno"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel" msgid "Cancel"
msgstr "Annulla" msgstr "Annulla"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today" msgid "Today"
msgstr "Oggi" msgstr "Oggi"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar" msgid "Calendar"
msgstr "Calendario" msgstr "Calendario"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday" msgid "Yesterday"
msgstr "Ieri" msgstr "Ieri"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow" msgid "Tomorrow"
msgstr "Domani" msgstr "Domani"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "Mostra"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "Nascondi"

View File

@ -1,13 +1,13 @@
# Translation of django.po to japanese. # Translation of django.po to japanese.
# Copyright (C) 2005,2006 THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) 2005,2006 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# makoto tsuyuki <mtsuyuki@gmail.com>, 2005,2006. # makoto tsuyuki <mtsuyuki@gmail.com>, 2005,2006,2007.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django 1.0\n" "Project-Id-Version: Django 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-21 20:42+0900\n" "POT-Creation-Date: 2007-02-15 23:43+0900\n"
"PO-Revision-Date: 2006-05-18 00:28+0900\n" "PO-Revision-Date: 2006-05-18 00:28+0900\n"
"Last-Translator: makoto tsuyuki <mtsuyuki@gmail.com>\n" "Last-Translator: makoto tsuyuki <mtsuyuki@gmail.com>\n"
"Language-Team: Japanese <django-ja@googlegroups.com>\n" "Language-Team: Japanese <django-ja@googlegroups.com>\n"
@ -24,126 +24,138 @@ msgid "Bengali"
msgstr "ベンガル語" msgstr "ベンガル語"
#: conf/global_settings.py:41 #: conf/global_settings.py:41
msgid "Catalan"
msgstr "カタロニア語"
#: conf/global_settings.py:42
msgid "Czech" msgid "Czech"
msgstr "チェコ語" msgstr "チェコ語"
#: conf/global_settings.py:42 #: conf/global_settings.py:43
msgid "Welsh" msgid "Welsh"
msgstr "ウェールズ語" msgstr "ウェールズ語"
#: conf/global_settings.py:43 #: conf/global_settings.py:44
msgid "Danish" msgid "Danish"
msgstr "デンマーク語" msgstr "デンマーク語"
#: conf/global_settings.py:44 #: conf/global_settings.py:45
msgid "German" msgid "German"
msgstr "ドイツ語" msgstr "ドイツ語"
#: conf/global_settings.py:45 #: conf/global_settings.py:46
msgid "Greek" msgid "Greek"
msgstr "ギリシャ語" msgstr "ギリシャ語"
#: conf/global_settings.py:46 #: conf/global_settings.py:47
msgid "English" msgid "English"
msgstr "英語" msgstr "英語"
#: conf/global_settings.py:47 #: conf/global_settings.py:48
msgid "Spanish" msgid "Spanish"
msgstr "スペイン語" msgstr "スペイン語"
#: conf/global_settings.py:48 #: conf/global_settings.py:49
msgid "Argentinean Spanish" msgid "Argentinean Spanish"
msgstr "アルゼンチンスペイン語" msgstr "アルゼンチンスペイン語"
#: conf/global_settings.py:49 #: conf/global_settings.py:50
msgid "Finnish" msgid "Finnish"
msgstr "フィンランド語" msgstr "フィンランド語"
#: conf/global_settings.py:50 #: conf/global_settings.py:51
msgid "French" msgid "French"
msgstr "フランス語" msgstr "フランス語"
#: conf/global_settings.py:51 #: conf/global_settings.py:52
msgid "Galician" msgid "Galician"
msgstr "ガリシア語" msgstr "ガリシア語"
#: conf/global_settings.py:52 #: conf/global_settings.py:53
msgid "Hungarian" msgid "Hungarian"
msgstr "ハンガリー語" msgstr "ハンガリー語"
#: conf/global_settings.py:53 #: conf/global_settings.py:54
msgid "Hebrew" msgid "Hebrew"
msgstr "ヘブライ語" msgstr "ヘブライ語"
#: conf/global_settings.py:54 #: conf/global_settings.py:55
msgid "Icelandic" msgid "Icelandic"
msgstr "アイスランド語" msgstr "アイスランド語"
#: conf/global_settings.py:55 #: conf/global_settings.py:56
msgid "Italian" msgid "Italian"
msgstr "イタリア語" msgstr "イタリア語"
#: conf/global_settings.py:56 #: conf/global_settings.py:57
msgid "Japanese" msgid "Japanese"
msgstr "日本語" msgstr "日本語"
#: conf/global_settings.py:57 #: conf/global_settings.py:58
msgid "Latvian"
msgstr "ラトビア語"
#: conf/global_settings.py:59
msgid "Macedonian"
msgstr "マケドニア語"
#: conf/global_settings.py:60
msgid "Dutch" msgid "Dutch"
msgstr "オランダ語" msgstr "オランダ語"
#: conf/global_settings.py:58 #: conf/global_settings.py:61
msgid "Norwegian" msgid "Norwegian"
msgstr "ノルウェー語" msgstr "ノルウェー語"
#: conf/global_settings.py:59 #: conf/global_settings.py:62
msgid "Polish" msgid "Polish"
msgstr "ポーランド語" msgstr "ポーランド語"
#: conf/global_settings.py:60 #: conf/global_settings.py:63
msgid "Brazilian" msgid "Brazilian"
msgstr "ブラジル語" msgstr "ブラジル語"
#: conf/global_settings.py:61 #: conf/global_settings.py:64
msgid "Romanian" msgid "Romanian"
msgstr "ルーマニア語" msgstr "ルーマニア語"
#: conf/global_settings.py:62 #: conf/global_settings.py:65
msgid "Russian" msgid "Russian"
msgstr "ロシア語" msgstr "ロシア語"
#: conf/global_settings.py:63 #: conf/global_settings.py:66
msgid "Slovak" msgid "Slovak"
msgstr "スロバキア語" msgstr "スロバキア語"
#: conf/global_settings.py:64 #: conf/global_settings.py:67
msgid "Slovenian" msgid "Slovenian"
msgstr "スロヴェニア語" msgstr "スロヴェニア語"
#: conf/global_settings.py:65 #: conf/global_settings.py:68
msgid "Serbian" msgid "Serbian"
msgstr "セルビア語" msgstr "セルビア語"
#: conf/global_settings.py:66 #: conf/global_settings.py:69
msgid "Swedish" msgid "Swedish"
msgstr "スウェーデン語" msgstr "スウェーデン語"
#: conf/global_settings.py:67 #: conf/global_settings.py:70
msgid "Tamil" msgid "Tamil"
msgstr "タミル語" msgstr "タミル語"
#: conf/global_settings.py:68 #: conf/global_settings.py:71
msgid "Turkish" msgid "Turkish"
msgstr "トルコ語" msgstr "トルコ語"
#: conf/global_settings.py:69 #: conf/global_settings.py:72
msgid "Ukrainian" msgid "Ukrainian"
msgstr "ウクライナ語" msgstr "ウクライナ語"
#: conf/global_settings.py:70 #: conf/global_settings.py:73
msgid "Simplified Chinese" msgid "Simplified Chinese"
msgstr "簡体字中国語" msgstr "簡体字中国語"
#: conf/global_settings.py:71 #: conf/global_settings.py:74
msgid "Traditional Chinese" msgid "Traditional Chinese"
msgstr "繁体字中国語" msgstr "繁体字中国語"
@ -181,15 +193,18 @@ msgstr "今月"
msgid "This year" msgid "This year"
msgstr "今年" msgstr "今年"
#: contrib/admin/filterspecs.py:143 #: contrib/admin/filterspecs.py:143 newforms/widgets.py:170
#: oldforms/__init__.py:572
msgid "Yes" msgid "Yes"
msgstr "はい" msgstr "はい"
#: contrib/admin/filterspecs.py:143 #: contrib/admin/filterspecs.py:143 newforms/widgets.py:170
#: oldforms/__init__.py:572
msgid "No" msgid "No"
msgstr "いいえ" msgstr "いいえ"
#: contrib/admin/filterspecs.py:150 #: contrib/admin/filterspecs.py:150 newforms/widgets.py:170
#: oldforms/__init__.py:572
msgid "Unknown" msgid "Unknown"
msgstr "不明" msgstr "不明"
@ -237,6 +252,7 @@ msgstr "申し訳ありませんが、お探しのページは見つかりませ
#: contrib/admin/templates/admin/delete_confirmation.html:6 #: contrib/admin/templates/admin/delete_confirmation.html:6
#: contrib/admin/templates/admin/invalid_setup.html:4 #: contrib/admin/templates/admin/invalid_setup.html:4
#: contrib/admin/templates/admin/object_history.html:5 #: contrib/admin/templates/admin/object_history.html:5
#: contrib/admin/templates/admin/auth/user/change_password.html:12
#: contrib/admin/templates/admin_doc/bookmarklets.html:3 #: contrib/admin/templates/admin_doc/bookmarklets.html:3
#: contrib/admin/templates/registration/logged_out.html:4 #: contrib/admin/templates/registration/logged_out.html:4
#: contrib/admin/templates/registration/password_change_done.html:4 #: contrib/admin/templates/registration/password_change_done.html:4
@ -275,6 +291,7 @@ msgstr "ようこそ"
#: contrib/admin/templates/admin/change_list.html:5 #: contrib/admin/templates/admin/change_list.html:5
#: contrib/admin/templates/admin/delete_confirmation.html:3 #: contrib/admin/templates/admin/delete_confirmation.html:3
#: contrib/admin/templates/admin/object_history.html:3 #: contrib/admin/templates/admin/object_history.html:3
#: contrib/admin/templates/admin/auth/user/change_password.html:9
#: contrib/admin/templates/admin_doc/bookmarklets.html:3 #: contrib/admin/templates/admin_doc/bookmarklets.html:3
#: contrib/admin/templates/registration/password_change_done.html:3 #: contrib/admin/templates/registration/password_change_done.html:3
#: contrib/admin/templates/registration/password_change_form.html:3 #: contrib/admin/templates/registration/password_change_form.html:3
@ -286,6 +303,9 @@ msgstr "ドキュメント"
#: contrib/admin/templates/admin/change_list.html:5 #: contrib/admin/templates/admin/change_list.html:5
#: contrib/admin/templates/admin/delete_confirmation.html:3 #: contrib/admin/templates/admin/delete_confirmation.html:3
#: contrib/admin/templates/admin/object_history.html:3 #: contrib/admin/templates/admin/object_history.html:3
#: contrib/admin/templates/admin/auth/user/change_password.html:9
#: contrib/admin/templates/admin/auth/user/change_password.html:15
#: contrib/admin/templates/admin/auth/user/change_password.html:46
#: contrib/admin/templates/admin_doc/bookmarklets.html:4 #: contrib/admin/templates/admin_doc/bookmarklets.html:4
#: contrib/admin/templates/admin_doc/index.html:4 #: contrib/admin/templates/admin_doc/index.html:4
#: contrib/admin/templates/admin_doc/missing_docutils.html:4 #: contrib/admin/templates/admin_doc/missing_docutils.html:4
@ -306,6 +326,7 @@ msgstr "パスワードの変更"
#: contrib/admin/templates/admin/change_list.html:5 #: contrib/admin/templates/admin/change_list.html:5
#: contrib/admin/templates/admin/delete_confirmation.html:3 #: contrib/admin/templates/admin/delete_confirmation.html:3
#: contrib/admin/templates/admin/object_history.html:3 #: contrib/admin/templates/admin/object_history.html:3
#: contrib/admin/templates/admin/auth/user/change_password.html:9
#: contrib/admin/templates/admin_doc/bookmarklets.html:4 #: contrib/admin/templates/admin_doc/bookmarklets.html:4
#: contrib/admin/templates/admin_doc/index.html:4 #: contrib/admin/templates/admin_doc/index.html:4
#: contrib/admin/templates/admin_doc/missing_docutils.html:4 #: contrib/admin/templates/admin_doc/missing_docutils.html:4
@ -335,30 +356,31 @@ msgstr "Django 管理サイト"
msgid "Add" msgid "Add"
msgstr "追加" msgstr "追加"
#: contrib/admin/templates/admin/change_form.html:20 #: contrib/admin/templates/admin/change_form.html:21
#: contrib/admin/templates/admin/object_history.html:5 #: contrib/admin/templates/admin/object_history.html:5
msgid "History" msgid "History"
msgstr "履歴" msgstr "履歴"
#: contrib/admin/templates/admin/change_form.html:21 #: contrib/admin/templates/admin/change_form.html:22
msgid "View on site" msgid "View on site"
msgstr "サイト上で表示" msgstr "サイト上で表示"
#: contrib/admin/templates/admin/change_form.html:30 #: contrib/admin/templates/admin/change_form.html:32
#: contrib/admin/templates/admin/auth/user/change_password.html:24
msgid "Please correct the error below." msgid "Please correct the error below."
msgid_plural "Please correct the errors below." msgid_plural "Please correct the errors below."
msgstr[0] "下記のエラーを修正してください。" msgstr[0] "下記のエラーを修正してください。"
msgstr[1] "下記のエラーを修正してください。" msgstr[1] "下記のエラーを修正してください。"
#: contrib/admin/templates/admin/change_form.html:48 #: contrib/admin/templates/admin/change_form.html:50
msgid "Ordering" msgid "Ordering"
msgstr "順序" msgstr "順序"
#: contrib/admin/templates/admin/change_form.html:51 #: contrib/admin/templates/admin/change_form.html:53
msgid "Order:" msgid "Order:"
msgstr "並び変え:" msgstr "並び変え:"
#: contrib/admin/templates/admin/change_list.html:11 #: contrib/admin/templates/admin/change_list.html:12
#, python-format #, python-format
msgid "Add %(name)s" msgid "Add %(name)s"
msgstr "%(name)s を追加" msgstr "%(name)s を追加"
@ -451,10 +473,6 @@ msgstr "ユーザ名:"
msgid "Password:" msgid "Password:"
msgstr "パスワード:" msgstr "パスワード:"
#: contrib/admin/templates/admin/login.html:22
msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?"
msgstr "<a href=\"/password_reset/\">パスワードをお忘れですか</a>"
#: contrib/admin/templates/admin/login.html:25 #: contrib/admin/templates/admin/login.html:25
#: contrib/admin/views/decorators.py:24 #: contrib/admin/views/decorators.py:24
msgid "Log in" msgid "Log in"
@ -533,17 +551,25 @@ msgid "Username"
msgstr "ユーザ名" msgstr "ユーザ名"
#: contrib/admin/templates/admin/auth/user/add_form.html:18 #: contrib/admin/templates/admin/auth/user/add_form.html:18
#: contrib/admin/templates/admin/auth/user/change_password.html:34
msgid "Password" msgid "Password"
msgstr "パスワード" msgstr "パスワード"
#: contrib/admin/templates/admin/auth/user/add_form.html:23 #: contrib/admin/templates/admin/auth/user/add_form.html:23
#: contrib/admin/templates/admin/auth/user/change_password.html:39
msgid "Password (again)" msgid "Password (again)"
msgstr "パスワード(確認用)" msgstr "パスワード(確認用)"
#: contrib/admin/templates/admin/auth/user/add_form.html:24 #: contrib/admin/templates/admin/auth/user/add_form.html:24
#: contrib/admin/templates/admin/auth/user/change_password.html:40
msgid "Enter the same password as above, for verification." msgid "Enter the same password as above, for verification."
msgstr "確認のため、再度パスワードを入力してください。" msgstr "確認のため、再度パスワードを入力してください。"
#: contrib/admin/templates/admin/auth/user/change_password.html:28
#, python-format
msgid "Enter a new password for the user <strong>%(username)s</strong>."
msgstr "<strong>%(username)s</strong>さんの新しいパスワードを入力してください。"
#: contrib/admin/templates/admin_doc/bookmarklets.html:3 #: contrib/admin/templates/admin_doc/bookmarklets.html:3
msgid "Bookmarklets" msgid "Bookmarklets"
msgstr "ブックマークレット" msgstr "ブックマークレット"
@ -743,25 +769,34 @@ msgstr "現在:"
msgid "Change:" msgid "Change:"
msgstr "変更:" msgstr "変更:"
#: contrib/admin/templatetags/admin_list.py:230 #: contrib/admin/templatetags/admin_list.py:238
msgid "All dates" msgid "All dates"
msgstr "いつでも" msgstr "いつでも"
#: contrib/admin/views/auth.py:17 contrib/admin/views/main.py:257 #: contrib/admin/views/auth.py:19 contrib/admin/views/main.py:257
#, python-format #, python-format
msgid "The %(name)s \"%(obj)s\" was added successfully." msgid "The %(name)s \"%(obj)s\" was added successfully."
msgstr "%(name)s \"%(obj)s\" を追加しました。" msgstr "%(name)s \"%(obj)s\" を追加しました。"
#: contrib/admin/views/auth.py:22 contrib/admin/views/main.py:261 #: contrib/admin/views/auth.py:24 contrib/admin/views/main.py:261
#: contrib/admin/views/main.py:347 #: contrib/admin/views/main.py:347
msgid "You may edit it again below." msgid "You may edit it again below."
msgstr "続けて編集できます。" msgstr "続けて編集できます。"
#: contrib/admin/views/auth.py:28 #: contrib/admin/views/auth.py:30
msgid "Add user" msgid "Add user"
msgstr "ユーザを追加" msgstr "ユーザを追加"
#: contrib/admin/views/decorators.py:10 contrib/auth/forms.py:59 #: contrib/admin/views/auth.py:57
msgid "Password changed successfully."
msgstr "パスワードを変更しました"
#: contrib/admin/views/auth.py:64
#, python-format
msgid "Change password: %s"
msgstr "パスワードの変更: %s"
#: contrib/admin/views/decorators.py:10 contrib/auth/forms.py:60
msgid "" msgid ""
"Please enter a correct username and password. Note that both fields are case-" "Please enter a correct username and password. Note that both fields are case-"
"sensitive." "sensitive."
@ -949,7 +984,7 @@ msgid "Added %s."
msgstr "%s を追加しました。" msgstr "%s を追加しました。"
#: contrib/admin/views/main.py:335 contrib/admin/views/main.py:337 #: contrib/admin/views/main.py:335 contrib/admin/views/main.py:337
#: contrib/admin/views/main.py:339 #: contrib/admin/views/main.py:339 db/models/manipulators.py:306
msgid "and" msgid "and"
msgstr "と" msgstr "と"
@ -1021,15 +1056,15 @@ msgstr "変更する %s を選択"
msgid "Database error" msgid "Database error"
msgstr "データベースエラー" msgstr "データベースエラー"
#: contrib/auth/forms.py:16 #: contrib/auth/forms.py:17 contrib/auth/forms.py:138
msgid "The two password fields didn't match." msgid "The two password fields didn't match."
msgstr "確認用パスワードが一致しません。" msgstr "確認用パスワードが一致しません。"
#: contrib/auth/forms.py:24 #: contrib/auth/forms.py:25
msgid "A user with that username already exists." msgid "A user with that username already exists."
msgstr "同じユーザ名が既に登録済みです。" msgstr "同じユーザ名が既に登録済みです。"
#: contrib/auth/forms.py:52 #: contrib/auth/forms.py:53
msgid "" msgid ""
"Your Web browser doesn't appear to have cookies enabled. Cookies are " "Your Web browser doesn't appear to have cookies enabled. Cookies are "
"required for logging in." "required for logging in."
@ -1037,21 +1072,21 @@ msgstr ""
"お使いのブラウザはクッキーを有効にしていないようです。ログインにはクッキーが" "お使いのブラウザはクッキーを有効にしていないようです。ログインにはクッキーが"
"必要です。" "必要です。"
#: contrib/auth/forms.py:61 #: contrib/auth/forms.py:62
msgid "This account is inactive." msgid "This account is inactive."
msgstr "アカウントが無効です。" msgstr "アカウントが無効です。"
#: contrib/auth/forms.py:84 #: contrib/auth/forms.py:85
msgid "" msgid ""
"That e-mail address doesn't have an associated user account. Are you sure " "That e-mail address doesn't have an associated user account. Are you sure "
"you've registered?" "you've registered?"
msgstr "メールアドレスの一致するユーザはいません。本当に登録しましたか?" msgstr "メールアドレスの一致するユーザはいません。本当に登録しましたか?"
#: contrib/auth/forms.py:116 #: contrib/auth/forms.py:117
msgid "The two 'new password' fields didn't match." msgid "The two 'new password' fields didn't match."
msgstr "新しいパスワード(確認用)が一致しません。" msgstr "新しいパスワード(確認用)が一致しません。"
#: contrib/auth/forms.py:123 #: contrib/auth/forms.py:124
msgid "Your old password was entered incorrectly. Please enter it again." msgid "Your old password was entered incorrectly. Please enter it again."
msgstr "元のパスワードが間違っています。もう一度入力してください。" msgstr "元のパスワードが間違っています。もう一度入力してください。"
@ -1108,8 +1143,12 @@ msgid "password"
msgstr "パスワード" msgstr "パスワード"
#: contrib/auth/models.py:94 #: contrib/auth/models.py:94
msgid "Use '[algo]$[salt]$[hexdigest]'" msgid ""
msgstr "'[アルゴリズム]$[ソルト]$[ダイジェスト(hex)]' 形式を使って下さい" "Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change "
"password form</a>."
msgstr ""
"'[algo]$[salt]$[hexdigest]'形式か、"
"<a href=\"password/\">パスワード変更フォーム</a>を使ってください。"
#: contrib/auth/models.py:95 #: contrib/auth/models.py:95
msgid "staff status" msgid "staff status"
@ -1478,15 +1517,15 @@ msgstr "コメント ID が不正です"
msgid "No voting for yourself" msgid "No voting for yourself"
msgstr "自分には投票できません。" msgstr "自分には投票できません。"
#: contrib/contenttypes/models.py:20 #: contrib/contenttypes/models.py:26
msgid "python model class name" msgid "python model class name"
msgstr "Python モデルクラス名" msgstr "Python モデルクラス名"
#: contrib/contenttypes/models.py:23 #: contrib/contenttypes/models.py:29
msgid "content type" msgid "content type"
msgstr "コンテンツタイプ" msgstr "コンテンツタイプ"
#: contrib/contenttypes/models.py:24 #: contrib/contenttypes/models.py:30
msgid "content types" msgid "content types"
msgstr "コンテンツタイプ" msgstr "コンテンツタイプ"
@ -1536,6 +1575,10 @@ msgstr "フラットページ"
msgid "flat pages" msgid "flat pages"
msgstr "フラットページ" msgstr "フラットページ"
#: contrib/localflavor/usa/forms.py:13
msgid "Enter a zip code in the format XXXXX or XXXXX-XXXX."
msgstr "XXXXXか、XXXXX-XXXXの形式で郵便番号を入力してください。"
#: contrib/redirects/models.py:7 #: contrib/redirects/models.py:7
msgid "redirect from" msgid "redirect from"
msgstr "リダイレクト元" msgstr "リダイレクト元"
@ -1600,92 +1643,92 @@ msgstr "サイト"
msgid "sites" msgid "sites"
msgstr "サイト" msgstr "サイト"
#: core/validators.py:63 #: core/validators.py:64
msgid "This value must contain only letters, numbers and underscores." msgid "This value must contain only letters, numbers and underscores."
msgstr "半角の英数字およびアンダースコア以外は使用できません。" msgstr "半角の英数字およびアンダースコア以外は使用できません。"
#: core/validators.py:67 #: core/validators.py:68
msgid "" msgid ""
"This value must contain only letters, numbers, underscores, dashes or " "This value must contain only letters, numbers, underscores, dashes or "
"slashes." "slashes."
msgstr "" msgstr ""
"半角の英数字、アンダースコア、ダッシュ、スラッシュ以外は使用できません。" "半角の英数字、アンダースコア、ダッシュ、スラッシュ以外は使用できません。"
#: core/validators.py:71 #: core/validators.py:72
msgid "This value must contain only letters, numbers, underscores or hyphens." msgid "This value must contain only letters, numbers, underscores or hyphens."
msgstr "半角の英数字、アンダースコア、ハイフン以外は使用できません。" msgstr "半角の英数字、アンダースコア、ハイフン以外は使用できません。"
#: core/validators.py:75 #: core/validators.py:76
msgid "Uppercase letters are not allowed here." msgid "Uppercase letters are not allowed here."
msgstr "大文字はここでは使用できません。" msgstr "大文字はここでは使用できません。"
#: core/validators.py:79 #: core/validators.py:80
msgid "Lowercase letters are not allowed here." msgid "Lowercase letters are not allowed here."
msgstr "小文字はここでは使用できません。" msgstr "小文字はここでは使用できません。"
#: core/validators.py:86 #: core/validators.py:87
msgid "Enter only digits separated by commas." msgid "Enter only digits separated by commas."
msgstr "カンマ区切りの数字だけを入力してください。" msgstr "カンマ区切りの数字だけを入力してください。"
#: core/validators.py:98 #: core/validators.py:99
msgid "Enter valid e-mail addresses separated by commas." msgid "Enter valid e-mail addresses separated by commas."
msgstr "カンマ区切りの有効なメールアドレスを入力してください。" msgstr "カンマ区切りの有効なメールアドレスを入力してください。"
#: core/validators.py:102 #: core/validators.py:103
msgid "Please enter a valid IP address." msgid "Please enter a valid IP address."
msgstr "有効な IP アドレスを入力してください。" msgstr "有効な IP アドレスを入力してください。"
#: core/validators.py:106 #: core/validators.py:107
msgid "Empty values are not allowed here." msgid "Empty values are not allowed here."
msgstr "入力は必須です。" msgstr "入力は必須です。"
#: core/validators.py:110 #: core/validators.py:111
msgid "Non-numeric characters aren't allowed here." msgid "Non-numeric characters aren't allowed here."
msgstr "数値以外は使用できません。" msgstr "数値以外は使用できません。"
#: core/validators.py:114 #: core/validators.py:115
msgid "This value can't be comprised solely of digits." msgid "This value can't be comprised solely of digits."
msgstr "数値だけの値にはできません。" msgstr "数値だけの値にはできません。"
#: core/validators.py:119 #: core/validators.py:120 newforms/fields.py:126
msgid "Enter a whole number." msgid "Enter a whole number."
msgstr "整数を入力してください。" msgstr "整数を入力してください。"
#: core/validators.py:123 #: core/validators.py:124
msgid "Only alphabetical characters are allowed here." msgid "Only alphabetical characters are allowed here."
msgstr "半角アルファベット以外使用できません。" msgstr "半角アルファベット以外使用できません。"
#: core/validators.py:138 #: core/validators.py:139
msgid "Year must be 1900 or later." msgid "Year must be 1900 or later."
msgstr "1900年以降を指定してください。" msgstr "1900年以降を指定してください。"
#: core/validators.py:142 #: core/validators.py:143
#, python-format #, python-format
msgid "Invalid date: %s." msgid "Invalid date: %s."
msgstr "無効な日付: %s" msgstr "無効な日付: %s"
#: core/validators.py:146 db/models/fields/__init__.py:424 #: core/validators.py:147 db/models/fields/__init__.py:454
msgid "Enter a valid date in YYYY-MM-DD format." msgid "Enter a valid date in YYYY-MM-DD format."
msgstr "YYYY-MM-DD形式で日付を入力してください。" msgstr "YYYY-MM-DD形式で日付を入力してください。"
#: core/validators.py:151 #: core/validators.py:152
msgid "Enter a valid time in HH:MM format." msgid "Enter a valid time in HH:MM format."
msgstr "HH:MM形式で時刻を入力してください。" msgstr "HH:MM形式で時刻を入力してください。"
#: core/validators.py:155 db/models/fields/__init__.py:486 #: core/validators.py:156 db/models/fields/__init__.py:521
msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format." msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format."
msgstr "YYYY-MM-DD HH:MM形式で日時を入力してください。" msgstr "YYYY-MM-DD HH:MM形式で日時を入力してください。"
#: core/validators.py:160 #: core/validators.py:161 newforms/fields.py:269
msgid "Enter a valid e-mail address." msgid "Enter a valid e-mail address."
msgstr "有効なメールアドレスを入力してください。" msgstr "有効なメールアドレスを入力してください。"
#: core/validators.py:172 core/validators.py:401 forms/__init__.py:662 #: core/validators.py:173 core/validators.py:442 oldforms/__init__.py:667
msgid "No file was submitted. Check the encoding type on the form." msgid "No file was submitted. Check the encoding type on the form."
msgstr "" msgstr ""
"ファイルが取得できませんでした。formのencoding typeを確認してください。" "ファイルが取得できませんでした。formのencoding typeを確認してください。"
#: core/validators.py:176 #: core/validators.py:177
msgid "" msgid ""
"Upload a valid image. The file you uploaded was either not an image or a " "Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image." "corrupted image."
@ -1693,26 +1736,26 @@ msgstr ""
"画像をアップロードしてください。アップロードした画像は画像でないか、または壊" "画像をアップロードしてください。アップロードした画像は画像でないか、または壊"
"れています。" "れています。"
#: core/validators.py:183 #: core/validators.py:184
#, python-format #, python-format
msgid "The URL %s does not point to a valid image." msgid "The URL %s does not point to a valid image."
msgstr "URL ( %s ) は画像ではありません。" msgstr "URL ( %s ) は画像ではありません。"
#: core/validators.py:187 #: core/validators.py:188
#, python-format #, python-format
msgid "Phone numbers must be in XXX-XXX-XXXX format. \"%s\" is invalid." msgid "Phone numbers must be in XXX-XXX-XXXX format. \"%s\" is invalid."
msgstr "電話番号は XXX-XXX-XXXX 形式で入力してください。\"%s\" は無効です。" msgstr "電話番号は XXX-XXX-XXXX 形式で入力してください。\"%s\" は無効です。"
#: core/validators.py:195 #: core/validators.py:196
#, python-format #, python-format
msgid "The URL %s does not point to a valid QuickTime video." msgid "The URL %s does not point to a valid QuickTime video."
msgstr "URL ( %s ) は QuickTime ビデオではありません。" msgstr "URL ( %s ) は QuickTime ビデオではありません。"
#: core/validators.py:199 #: core/validators.py:200
msgid "A valid URL is required." msgid "A valid URL is required."
msgstr "正しい URL を入力してください。" msgstr "正しい URL を入力してください。"
#: core/validators.py:213 #: core/validators.py:214
#, python-format #, python-format
msgid "" msgid ""
"Valid HTML is required. Specific errors are:\n" "Valid HTML is required. Specific errors are:\n"
@ -1721,71 +1764,86 @@ msgstr ""
"有効な HTML を入力してください。エラー:\n" "有効な HTML を入力してください。エラー:\n"
"%s" "%s"
#: core/validators.py:220 #: core/validators.py:221
#, python-format #, python-format
msgid "Badly formed XML: %s" msgid "Badly formed XML: %s"
msgstr "不正な XML です: %s" msgstr "不正な XML です: %s"
#: core/validators.py:230 #: core/validators.py:238
#, python-format #, python-format
msgid "Invalid URL: %s" msgid "Invalid URL: %s"
msgstr "無効なURL: %s" msgstr "無効なURL: %s"
#: core/validators.py:234 core/validators.py:236 #: core/validators.py:243 core/validators.py:245
#, python-format #, python-format
msgid "The URL %s is a broken link." msgid "The URL %s is a broken link."
msgstr "URL ( %s ) はリンクが壊れています。" msgstr "URL ( %s ) はリンクが壊れています。"
#: core/validators.py:242 #: core/validators.py:251
msgid "Enter a valid U.S. state abbreviation." msgid "Enter a valid U.S. state abbreviation."
msgstr "正しい米州略称を入力してください。" msgstr "正しい米州略称を入力してください。"
#: core/validators.py:256 #: core/validators.py:265
#, python-format #, python-format
msgid "Watch your mouth! The word %s is not allowed here." msgid "Watch your mouth! The word %s is not allowed here."
msgid_plural "Watch your mouth! The words %s are not allowed here." msgid_plural "Watch your mouth! The words %s are not allowed here."
msgstr[0] "言葉使いに気を付けて! %s という言葉は使えません。" msgstr[0] "言葉使いに気を付けて! %s という言葉は使えません。"
msgstr[1] "言葉使いに気を付けて! %s という言葉は使えません。" msgstr[1] "言葉使いに気を付けて! %s という言葉は使えません。"
#: core/validators.py:263 #: core/validators.py:272
#, python-format #, python-format
msgid "This field must match the '%s' field." msgid "This field must match the '%s' field."
msgstr "このフィールドは '%s' フィールドと一致せねばなりません。" msgstr "このフィールドは '%s' フィールドと一致せねばなりません。"
#: core/validators.py:282 #: core/validators.py:291
msgid "Please enter something for at least one field." msgid "Please enter something for at least one field."
msgstr "少なくとも一つのフィールドに何か入力してください。" msgstr "少なくとも一つのフィールドに何か入力してください。"
#: core/validators.py:291 core/validators.py:302 #: core/validators.py:300 core/validators.py:311
msgid "Please enter both fields or leave them both empty." msgid "Please enter both fields or leave them both empty."
msgstr "両方のフィールドに入力するか、両方とも未入力にしてください。" msgstr "両方のフィールドに入力するか、両方とも未入力にしてください。"
#: core/validators.py:309 #: core/validators.py:318
#, python-format #, python-format
msgid "This field must be given if %(field)s is %(value)s" msgid "This field must be given if %(field)s is %(value)s"
msgstr "" msgstr ""
"%(field)s を %(value)s にするのなら、このフィールドに必ず入力してください。" "%(field)s を %(value)s にするのなら、このフィールドに必ず入力してください。"
#: core/validators.py:321 #: core/validators.py:330
#, python-format #, python-format
msgid "This field must be given if %(field)s is not %(value)s" msgid "This field must be given if %(field)s is not %(value)s"
msgstr "" msgstr ""
"%(field)s を %(value)s にしないのなら、このフィールドに必ず入力してください。" "%(field)s を %(value)s にしないのなら、このフィールドに必ず入力してください。"
#: core/validators.py:340 #: core/validators.py:349
msgid "Duplicate values are not allowed." msgid "Duplicate values are not allowed."
msgstr "重複する値は認められません。" msgstr "重複する値は認められません。"
#: core/validators.py:363 #: core/validators.py:364
#, python-format
msgid "This value must be between %s and %s."
msgstr "この値は %s から %s の間でなければなりません。"
#: core/validators.py:366
#, python-format
msgid "This value must be at least %s."
msgstr "この値は %s 以上でなければなりません。"
#: core/validators.py:368
#, python-format
msgid "This value must be no more than %s."
msgstr "この値は %s より小さくなければなりません。"
#: core/validators.py:404
#, python-format #, python-format
msgid "This value must be a power of %s." msgid "This value must be a power of %s."
msgstr "この値は %s の累乗でなければなりません。" msgstr "この値は %s の累乗でなければなりません。"
#: core/validators.py:374 #: core/validators.py:415
msgid "Please enter a valid decimal number." msgid "Please enter a valid decimal number."
msgstr "有効な 10 進数を入力してください。" msgstr "有効な 10 進数を入力してください。"
#: core/validators.py:378 #: core/validators.py:419
#, python-format #, python-format
msgid "Please enter a valid decimal number with at most %s total digit." msgid "Please enter a valid decimal number with at most %s total digit."
msgid_plural "" msgid_plural ""
@ -1793,7 +1851,7 @@ msgid_plural ""
msgstr[0] "全体で %s 文字以下の数字を入力してください。" msgstr[0] "全体で %s 文字以下の数字を入力してください。"
msgstr[1] "全体で %s 文字以下の数字を入力してください。" msgstr[1] "全体で %s 文字以下の数字を入力してください。"
#: core/validators.py:381 #: core/validators.py:422
#, python-format #, python-format
msgid "" msgid ""
"Please enter a valid decimal number with a whole part of at most %s digit." "Please enter a valid decimal number with a whole part of at most %s digit."
@ -1802,7 +1860,7 @@ msgid_plural ""
msgstr[0] "整数部は %s 文字以下の数字を入力してください。" msgstr[0] "整数部は %s 文字以下の数字を入力してください。"
msgstr[1] "整数部は %s 文字以下の数字を入力してください。" msgstr[1] "整数部は %s 文字以下の数字を入力してください。"
#: core/validators.py:384 #: core/validators.py:425
#, python-format #, python-format
msgid "Please enter a valid decimal number with at most %s decimal place." msgid "Please enter a valid decimal number with at most %s decimal place."
msgid_plural "" msgid_plural ""
@ -1810,37 +1868,37 @@ msgid_plural ""
msgstr[0] "小数部は %s 文字以下の数字を入力してください。" msgstr[0] "小数部は %s 文字以下の数字を入力してください。"
msgstr[1] "小数部は %s 文字以下の数字を入力してください。" msgstr[1] "小数部は %s 文字以下の数字を入力してください。"
#: core/validators.py:394 #: core/validators.py:435
#, python-format #, python-format
msgid "Make sure your uploaded file is at least %s bytes big." msgid "Make sure your uploaded file is at least %s bytes big."
msgstr "アップロードするファイルの大きさは %s バイト以上にしてください。" msgstr "アップロードするファイルの大きさは %s バイト以上にしてください。"
#: core/validators.py:395 #: core/validators.py:436
#, python-format #, python-format
msgid "Make sure your uploaded file is at most %s bytes big." msgid "Make sure your uploaded file is at most %s bytes big."
msgstr "アップロードするファイルの大きさは %s 最大バイトまでです。" msgstr "アップロードするファイルの大きさは %s 最大バイトまでです。"
#: core/validators.py:412 #: core/validators.py:453
msgid "The format for this field is wrong." msgid "The format for this field is wrong."
msgstr "フィールドの形式が正しくありません。" msgstr "フィールドの形式が正しくありません。"
#: core/validators.py:427 #: core/validators.py:468
msgid "This field is invalid." msgid "This field is invalid."
msgstr "このフィールドは無効です。" msgstr "このフィールドは無効です。"
#: core/validators.py:463 #: core/validators.py:504
#, python-format #, python-format
msgid "Could not retrieve anything from %s." msgid "Could not retrieve anything from %s."
msgstr "%s から何も検索できませんでした。" msgstr "%s から何も検索できませんでした。"
#: core/validators.py:466 #: core/validators.py:507
#, python-format #, python-format
msgid "" msgid ""
"The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'." "The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'."
msgstr "" msgstr ""
"URL %(url)s は無効なコンテンツタイプヘッダ '%(contenttype)s' を返しました。" "URL %(url)s は無効なコンテンツタイプヘッダ '%(contenttype)s' を返しました。"
#: core/validators.py:499 #: core/validators.py:540
#, python-format #, python-format
msgid "" msgid ""
"Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with " "Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with "
@ -1849,7 +1907,7 @@ msgstr ""
"%(line)s 行目から始まる %(tag)s タグを閉じてください (\"%(start)s\" で始まる" "%(line)s 行目から始まる %(tag)s タグを閉じてください (\"%(start)s\" で始まる"
"行です)。" "行です)。"
#: core/validators.py:503 #: core/validators.py:544
#, python-format #, python-format
msgid "" msgid ""
"Some text starting on line %(line)s is not allowed in that context. (Line " "Some text starting on line %(line)s is not allowed in that context. (Line "
@ -1858,7 +1916,7 @@ msgstr ""
"%(line)s 行目から始まるテキストはこのコンテキストでは使えません。 (\"%(start)" "%(line)s 行目から始まるテキストはこのコンテキストでは使えません。 (\"%(start)"
"s\" で始まる行です)。" "s\" で始まる行です)。"
#: core/validators.py:508 #: core/validators.py:549
#, python-format #, python-format
msgid "" msgid ""
"\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%" "\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%"
@ -1867,7 +1925,7 @@ msgstr ""
"%(line)s 行目の \"%(attr)s\" は無効なアトリビュートです (\"%(start)s\" で始ま" "%(line)s 行目の \"%(attr)s\" は無効なアトリビュートです (\"%(start)s\" で始ま"
"る行です)。" "る行です)。"
#: core/validators.py:513 #: core/validators.py:554
#, python-format #, python-format
msgid "" msgid ""
"\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%" "\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%"
@ -1876,7 +1934,7 @@ msgstr ""
"%(line)s 行目の \"<%(tag)s>\" は無効なタグです( \"%(start)s\" で始まる行で" "%(line)s 行目の \"<%(tag)s>\" は無効なタグです( \"%(start)s\" で始まる行で"
"す)。" "す)。"
#: core/validators.py:517 #: core/validators.py:558
#, python-format #, python-format
msgid "" msgid ""
"A tag on line %(line)s is missing one or more required attributes. (Line " "A tag on line %(line)s is missing one or more required attributes. (Line "
@ -1885,7 +1943,7 @@ msgstr ""
"%(line)s 行目のタグは必須アトリビュートが未入力です( \"%(start)s\" で始まる行" "%(line)s 行目のタグは必須アトリビュートが未入力です( \"%(start)s\" で始まる行"
"です)。" "です)。"
#: core/validators.py:522 #: core/validators.py:563
#, python-format #, python-format
msgid "" msgid ""
"The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line " "The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line "
@ -1900,50 +1958,51 @@ msgid "%(object)s with this %(type)s already exists for the given %(field)s."
msgstr "" msgstr ""
"%(field)s に入力されたものは、この %(type)s の %(object)s に既に存在します。" "%(field)s に入力されたものは、この %(type)s の %(object)s に既に存在します。"
#: db/models/fields/__init__.py:41 #: db/models/fields/__init__.py:42
#, python-format #, python-format
msgid "%(optname)s with this %(fieldname)s already exists." msgid "%(optname)s with this %(fieldname)s already exists."
msgstr "%(fieldname)s に %(optname)s は既に存在します。" msgstr "%(fieldname)s に %(optname)s は既に存在します。"
#: db/models/fields/__init__.py:115 db/models/fields/__init__.py:266 #: db/models/fields/__init__.py:116 db/models/fields/__init__.py:273
#: db/models/fields/__init__.py:560 db/models/fields/__init__.py:571 #: db/models/fields/__init__.py:605 db/models/fields/__init__.py:616
#: forms/__init__.py:347 #: newforms/fields.py:78 newforms/fields.py:373 newforms/fields.py:449
#: newforms/fields.py:460 oldforms/__init__.py:352
msgid "This field is required." msgid "This field is required."
msgstr "このフィールドは必須です。" msgstr "このフィールドは必須です。"
#: db/models/fields/__init__.py:349 #: db/models/fields/__init__.py:366
msgid "This value must be an integer." msgid "This value must be an integer."
msgstr "値は整数でなければなりません。" msgstr "値は整数でなければなりません。"
#: db/models/fields/__init__.py:381 #: db/models/fields/__init__.py:401
msgid "This value must be either True or False." msgid "This value must be either True or False."
msgstr "値は真: True または偽: False でなければなりません。" msgstr "値は真: True または偽: False でなければなりません。"
#: db/models/fields/__init__.py:397 #: db/models/fields/__init__.py:422
msgid "This field cannot be null." msgid "This field cannot be null."
msgstr "このフィールドには NULL を指定できません。" msgstr "このフィールドには NULL を指定できません。"
#: db/models/fields/__init__.py:580 #: db/models/fields/__init__.py:625
msgid "Enter a valid filename." msgid "Enter a valid filename."
msgstr "正しいファイル名を入力してください。" msgstr "正しいファイル名を入力してください。"
#: db/models/fields/related.py:51 #: db/models/fields/related.py:53
#, python-format #, python-format
msgid "Please enter a valid %s." msgid "Please enter a valid %s."
msgstr "正しい %s を入力してください。" msgstr "正しい %s を入力してください。"
#: db/models/fields/related.py:618 #: db/models/fields/related.py:642
msgid "Separate multiple IDs with commas." msgid "Separate multiple IDs with commas."
msgstr "複数の ID はカンマで区切ってください。" msgstr "複数の ID はカンマで区切ってください。"
#: db/models/fields/related.py:620 #: db/models/fields/related.py:644
msgid "" msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one." "Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr "" msgstr ""
"複数選択するときには Control キーを押したまま選択してください。Mac は " "複数選択するときには Control キーを押したまま選択してください。Mac は "
"Command キーを使ってください" "Command キーを使ってください"
#: db/models/fields/related.py:664 #: db/models/fields/related.py:691
#, python-format #, python-format
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid." msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid."
msgid_plural "" msgid_plural ""
@ -1951,39 +2010,96 @@ msgid_plural ""
msgstr[0] "正しい %(self)s IDを入力してください。 %(value)r は無効です。" msgstr[0] "正しい %(self)s IDを入力してください。 %(value)r は無効です。"
msgstr[1] "正しい %(self)s IDを入力してください。 %(value)r は無効です。" msgstr[1] "正しい %(self)s IDを入力してください。 %(value)r は無効です。"
#: forms/__init__.py:382 #: newforms/fields.py:101 newforms/fields.py:254
#, python-format
msgid "Ensure this value has at most %d characters."
msgstr "%d 字以下で入力してください。"
#: newforms/fields.py:103 newforms/fields.py:256
#, python-format
msgid "Ensure this value has at least %d characters."
msgstr "%d 字以上で入力してください。"
#: newforms/fields.py:128
#, python-format
msgid "Ensure this value is less than or equal to %s."
msgstr "この値は %s 以下でなければなりません。"
#: newforms/fields.py:130
#, python-format
msgid "Ensure this value is greater than or equal to %s."
msgstr "この値は %s 以上でなければなりません。"
#: newforms/fields.py:163
msgid "Enter a valid date."
msgstr "日付を正しく入力してください。"
#: newforms/fields.py:190
msgid "Enter a valid time."
msgstr "時間を正しく入力してください。"
#: newforms/fields.py:226
msgid "Enter a valid date/time."
msgstr "日付/時間を正しく入力してください。"
#: newforms/fields.py:240
msgid "Enter a valid value."
msgstr "値を正しく入力してください。"
#: newforms/fields.py:287 newforms/fields.py:309
msgid "Enter a valid URL."
msgstr "URLを正しく入力してください。"
#: newforms/fields.py:311
msgid "This URL appears to be a broken link."
msgstr "このURLはリンクが壊れています。"
#: newforms/fields.py:359
msgid "Select a valid choice. That choice is not one of the available choices."
msgstr "正しく選択してください。選択したものは候補にありません。"
#: newforms/fields.py:377 newforms/fields.py:453
msgid "Enter a list of values."
msgstr "リストを入力してください。"
#: newforms/fields.py:386
#, python-format
msgid "Select a valid choice. %s is not one of the available choices."
msgstr "正しく選択してください。 %s は候補にありません。"
#: oldforms/__init__.py:387
#, python-format #, python-format
msgid "Ensure your text is less than %s character." msgid "Ensure your text is less than %s character."
msgid_plural "Ensure your text is less than %s characters." msgid_plural "Ensure your text is less than %s characters."
msgstr[0] "%s 字以下で入力してください。" msgstr[0] "%s 字以下で入力してください。"
msgstr[1] "%s 字以下で入力してください。" msgstr[1] "%s 字以下で入力してください。"
#: forms/__init__.py:387 #: oldforms/__init__.py:392
msgid "Line breaks are not allowed here." msgid "Line breaks are not allowed here."
msgstr "改行はできません。" msgstr "改行はできません。"
#: forms/__init__.py:488 forms/__init__.py:561 forms/__init__.py:600 #: oldforms/__init__.py:493 oldforms/__init__.py:566 oldforms/__init__.py:605
#, python-format #, python-format
msgid "Select a valid choice; '%(data)s' is not in %(choices)s." msgid "Select a valid choice; '%(data)s' is not in %(choices)s."
msgstr "正しく選択してください。; '%(data)s' は %(choices)s にありません。" msgstr "正しく選択してください。; '%(data)s' は %(choices)s にありません。"
#: forms/__init__.py:664 #: oldforms/__init__.py:669
msgid "The submitted file is empty." msgid "The submitted file is empty."
msgstr "入力されたファイルは空です。" msgstr "入力されたファイルは空です。"
#: forms/__init__.py:720 #: oldforms/__init__.py:725
msgid "Enter a whole number between -32,768 and 32,767." msgid "Enter a whole number between -32,768 and 32,767."
msgstr "-32,768 から 32,767 までの整数を入力してください。" msgstr "-32,768 から 32,767 までの整数を入力してください。"
#: forms/__init__.py:730 #: oldforms/__init__.py:735
msgid "Enter a positive number." msgid "Enter a positive number."
msgstr "正の数を入力してください。" msgstr "正の数を入力してください。"
#: forms/__init__.py:740 #: oldforms/__init__.py:745
msgid "Enter a whole number between 0 and 32,767." msgid "Enter a whole number between 0 and 32,767."
msgstr "0 から 32,767 までの整数を入力してください。" msgstr "0 から 32,767 までの整数を入力してください。"
#: template/defaultfilters.py:401 #: template/defaultfilters.py:436
msgid "yes,no,maybe" msgid "yes,no,maybe"
msgstr "はい,いいえ,たぶん" msgstr "はい,いいえ,たぶん"
@ -2209,21 +2325,3 @@ msgstr "%(verbose_name)s を更新しました。"
#, python-format #, python-format
msgid "The %(verbose_name)s was deleted." msgid "The %(verbose_name)s was deleted."
msgstr " %(verbose_name)s を削除しました。" msgstr " %(verbose_name)s を削除しました。"
#~ msgid "String (up to 50)"
#~ msgstr "文字列 (50 字まで)"
#~ msgid "Comment"
#~ msgstr "コメント"
#~ msgid "Comments"
#~ msgstr "コメント"
#~ msgid "label"
#~ msgstr "ラベル"
#~ msgid "package"
#~ msgstr "パッケージ"
#~ msgid "packages"
#~ msgstr "パッケージ"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,116 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Django-kn 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-25 15:43+0200\n"
"PO-Revision-Date: 2007-01-08 20:22+0530\n"
"Last-Translator: Kannada Localization Team <translation@sampada.info>\n"
"Language-Team: Kannada <translation@sampada.info>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit"
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr "ಲಭ್ಯ %s "
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "ಎಲ್ಲವನ್ನೂ ಆಯ್ದುಕೊಳ್ಳಿ"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "ಸೇರಿಸಿ"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "ತೆಗೆದು ಹಾಕಿ"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "%s ಆಯ್ದುಕೊಳ್ಳಲಾಗಿದೆ"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr ""
"ನಿಮ್ಮ ಆಯ್ಕೆ(ಗಳ)ನ್ನು ಆರಿಸಿ "
"ಮತ್ತು ಕ್ಲಿಕ್ಕಿಸಿ"
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ"
#: contrib/admin/media/js/dateparse.js:26
#: contrib/admin/media/js/calendar.js:24
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"ಜನವರಿ ಫೆಬ್ರುವರಿ ಮಾರ್ಚ್ "
"ಎಪ್ರಿಲ್ ಮೇ ಜೂನ್ ಜುಲೈ ಆಗಸ್ಟ್ "
"ಸೆಪ್ಟೆಂಬರ್ ನವೆಂಬರ್ ಡಿಸೆಂಬರ್"
#: contrib/admin/media/js/dateparse.js:27
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr ""
"ರವಿವಾರ ಸೋಮವಾರ ಮಂಗಳವಾರ "
"ಬುಧವಾರ ಗುರುವಾರ ಶುಕ್ರವಾರ "
"ಶನಿವಾರ"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "ರ ಸೋ ಮ ಬು ಗು ಶು ಶ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now"
msgstr "ಈಗ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48
msgid "Clock"
msgstr "ಗಡಿಯಾರ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
msgid "Choose a time"
msgstr "ಸಮಯವೊಂದನ್ನು ಆರಿಸಿ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Midnight"
msgstr "ಮಧ್ಯರಾತ್ರಿ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m."
msgstr "ಬೆಳಗಿನ ೬ ಗಂಟೆ "
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon"
msgstr "ಮಧ್ಯಾಹ್ನ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
msgid "Cancel"
msgstr "ರದ್ದುಗೊಳಿಸಿ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
msgid "Today"
msgstr "ಈ ದಿನ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114
msgid "Calendar"
msgstr "ಪಂಚಾಂಗ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160
msgid "Yesterday"
msgstr "ನಿನ್ನೆ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow"
msgstr "ನಾಳೆ"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,118 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-15 10:46+1100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr ""
#: contrib/admin/media/js/dateparse.js:32
#: contrib/admin/media/js/calendar.js:24
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
#: contrib/admin/media/js/dateparse.js:33
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr ""
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m."
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday"
msgstr ""
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow"
msgstr ""
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr ""
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr ""

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,119 @@
# translation of djangojs.po to Macedonian
#
# Georgi Stanojevski <glisha@gmail.com>, 2006, 2007.
msgid ""
msgstr ""
"Project-Id-Version: djangojs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-15 10:53+1100\n"
"PO-Revision-Date: 2007-02-24 13:49+0100\n"
"Last-Translator: Georgi Stanojevski <glisha@gmail.com>\n"
"Language-Team: Macedonian <ossm-members@hedona.on.net.mk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr "Достапно %s"
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "Избери ги сите"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "Додади"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "Отстрани"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "Избрано %s"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr "Означете го вашиот избор/и и кликнете"
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "Исчисти ги сите"
#: contrib/admin/media/js/dateparse.js:32
#: contrib/admin/media/js/calendar.js:24
msgid ""
"January February March April May June July August September October November "
"December"
msgstr ""
"Јануари Февруари Март Април Мај Јуни Јули Август Септември Октомври Ноември "
"Декември"
#: contrib/admin/media/js/dateparse.js:33
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Недела Понеделник Вторник Среда Четврток Петок Сабота"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "Н П В С Ч П С"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now"
msgstr "Сега"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock"
msgstr "Часовник"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time"
msgstr "Избери време"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight"
msgstr "Полноќ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m."
msgstr "6 наутро"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon"
msgstr "Пладне"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel"
msgstr "Откажи"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today"
msgstr "Денеска"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar"
msgstr "Календар"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday"
msgstr "Вчера"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow"
msgstr "Утре"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "Прикажи"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "Скриј"

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
# translation of django.po to Slovenian # translation of django.po to Slovenian
# Igor Kolar <ike@email.si), 2006. # Igor Kolar <ike@email.si), 2006.
# Nena Kojadin <nena@kiberpipa.org), 2006. # Nena Kojadin <nena@kiberpipa.org), 2006.
# Jure Cuhalev <gandalf@owca.info>, 2006. # Jure Cuhalev <gandalf@owca.info>, 2006, 2007.
# Gasper Koren <gasper@fdvinfo.net>, 2007.
# Jozko Skrablin <jozko.skrablin@gmail.com>, 2007.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
msgid "" msgid ""
@ -9,8 +11,8 @@ msgstr ""
"Project-Id-Version: django\n" "Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-05-16 10:13+0200\n" "POT-Creation-Date: 2006-05-16 10:13+0200\n"
"PO-Revision-Date: 2006-07-29 11:52+0100\n" "PO-Revision-Date: 2007-02-15 21:47+0100\n"
"Last-Translator: Jure Čuhalev <gandalf@owca.info>\n" "Last-Translator: Gasper Koren <gasper@fdvinfo.net>\n"
"Language-Team: Slovenian <lugos-slo@lugos.si>\n" "Language-Team: Slovenian <lugos-slo@lugos.si>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
@ -90,7 +92,7 @@ msgstr "je odstranjen/-a"
#: contrib/comments/models.py:86 #: 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." 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\"." msgstr "Odkljukaj, če je komentar neprimeren. Namesto komentarja bo vidno obvestilo \"Ta komentar je bil odstranjen\"."
#: contrib/comments/models.py:91 #: contrib/comments/models.py:91
msgid "comments" msgid "comments"
@ -126,7 +128,7 @@ msgstr "ip naslov"
#: contrib/comments/models.py:173 #: contrib/comments/models.py:173
msgid "approved by staff" msgid "approved by staff"
msgstr "potrjeno s strani osebja" msgstr "osebje je potrdilo"
#: contrib/comments/models.py:176 #: contrib/comments/models.py:176
msgid "free comment" msgid "free comment"
@ -174,7 +176,7 @@ msgstr "datum označitve (zastavice)"
#: contrib/comments/models.py:268 #: contrib/comments/models.py:268
msgid "user flag" msgid "user flag"
msgstr "uporabnikova zastavica" msgstr "uporabniška zastavica"
#: contrib/comments/models.py:269 #: contrib/comments/models.py:269
msgid "user flags" msgid "user flags"
@ -204,7 +206,7 @@ msgstr "Izbris opravil moderator %r"
#: contrib/comments/views/karma.py:19 #: contrib/comments/views/karma.py:19
msgid "Anonymous users cannot vote" msgid "Anonymous users cannot vote"
msgstr "Anonimni upirabniki ne morejo glasovati" msgstr "Anonimni uporabniki ne morejo glasovati"
#: contrib/comments/views/karma.py:23 #: contrib/comments/views/karma.py:23
msgid "Invalid comment ID" msgid "Invalid comment ID"
@ -216,7 +218,7 @@ msgstr "Ni mogoče glasovati zase"
#: contrib/comments/views/comments.py:28 #: 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." msgstr "To oceno moraš podati, ker si podal vsaj še eno drugo oceno."
#: contrib/comments/views/comments.py:112 #: contrib/comments/views/comments.py:112
#, python-format #, python-format
@ -233,17 +235,17 @@ msgstr[0] ""
"\n" "\n"
"%(text)s" "%(text)s"
msgstr[1] "" msgstr[1] ""
"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" "Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarja:\n"
"\n" "\n"
"%(text)s" "%(text)s"
msgstr[3] "" msgstr[2] ""
"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarje:\n" "Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarje:\n"
"\n" "\n"
"%(text)s" "%(text)s"
msgstr[3] ""
"Ta komentar je poslal uporabnik, ki je do zdaj poslal manj kot %(count)s komentarjev:\n"
"\n"
"%(text)s"
#: contrib/comments/views/comments.py:117 #: contrib/comments/views/comments.py:117
#, python-format #, python-format
@ -259,7 +261,7 @@ msgstr ""
#: contrib/comments/views/comments.py:189 #: contrib/comments/views/comments.py:189
#: contrib/comments/views/comments.py:280 #: contrib/comments/views/comments.py:280
msgid "Only POSTs are allowed" msgid "Only POSTs are allowed"
msgstr "Dovoljena je le metoda POST" msgstr "Dovoljena je le POST metoda"
#: contrib/comments/views/comments.py:193 #: contrib/comments/views/comments.py:193
#: contrib/comments/views/comments.py:284 #: contrib/comments/views/comments.py:284
@ -398,7 +400,7 @@ msgstr "Neznano"
#: contrib/admin/models.py:16 #: contrib/admin/models.py:16
msgid "action time" msgid "action time"
msgstr "čas oprave dejanja" msgstr "čas dejanja"
#: contrib/admin/models.py:19 #: contrib/admin/models.py:19
msgid "object id" msgid "object id"
@ -410,7 +412,7 @@ msgstr "predstavitev objekta"
#: contrib/admin/models.py:21 #: contrib/admin/models.py:21
msgid "action flag" msgid "action flag"
msgstr "zastavica za določeno dejanje" msgstr "zastavica dejanja"
#: contrib/admin/models.py:22 #: contrib/admin/models.py:22
msgid "change message" msgid "change message"
@ -432,7 +434,7 @@ msgstr "Vsi datumi"
#: contrib/auth/forms.py:36 #: contrib/auth/forms.py:36
#: contrib/auth/forms.py:41 #: contrib/auth/forms.py:41
msgid "Please enter a correct username and password. Note that both fields are case-sensitive." 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" msgstr "Prosimo, vnesite veljavno uporabniško ime in geslo. Opomba: obe polji upoštevata velikost črk."
#: contrib/admin/views/decorators.py:23 #: contrib/admin/views/decorators.py:23
#: contrib/admin/templates/admin/login.html:25 #: contrib/admin/templates/admin/login.html:25
@ -441,11 +443,11 @@ msgstr "Prijavite se"
#: contrib/admin/views/decorators.py:61 #: contrib/admin/views/decorators.py:61
msgid "Please log in again, because your session has expired. Don't worry: Your submission has been saved." 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." msgstr "Vaša seja je pretekla; prosimo da se ponovno prijavite. Brez skrbi, vaše objave so varno shranjene."
#: contrib/admin/views/decorators.py:68 #: 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." 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." msgstr "Izgleda, da vaš brskalnik nima podpore za piškotke. Prosimo, vključite piškotke, osvežite stran in poskusite še enkrat."
#: contrib/admin/views/decorators.py:82 #: contrib/admin/views/decorators.py:82
msgid "Usernames cannot contain the '@' character." msgid "Usernames cannot contain the '@' character."
@ -454,7 +456,7 @@ msgstr "Uporabniška imena ne smejo vsebovati znaka '@'."
#: contrib/admin/views/decorators.py:84 #: contrib/admin/views/decorators.py:84
#, python-format #, python-format
msgid "Your e-mail address is not your username. Try '%s' instead." 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-main naslov ni vaše uporabniško ime. Poskusite uporabiti '%s'."
#: contrib/admin/views/main.py:226 #: contrib/admin/views/main.py:226
msgid "Site administration" msgid "Site administration"
@ -484,7 +486,7 @@ msgstr "Dodaj %s"
#: contrib/admin/views/main.py:336 #: contrib/admin/views/main.py:336
#, python-format #, python-format
msgid "Added %s." msgid "Added %s."
msgstr "Dodal %s." msgstr "Dodan %s."
#: contrib/admin/views/main.py:336 #: contrib/admin/views/main.py:336
#: contrib/admin/views/main.py:338 #: contrib/admin/views/main.py:338
@ -495,12 +497,12 @@ msgstr "in"
#: contrib/admin/views/main.py:338 #: contrib/admin/views/main.py:338
#, python-format #, python-format
msgid "Changed %s." msgid "Changed %s."
msgstr "Spremenil %s." msgstr "Spremenjen %s."
#: contrib/admin/views/main.py:340 #: contrib/admin/views/main.py:340
#, python-format #, python-format
msgid "Deleted %s." msgid "Deleted %s."
msgstr "Izbrisal %s." msgstr "Izbrisn %s."
#: contrib/admin/views/main.py:343 #: contrib/admin/views/main.py:343
msgid "No fields changed." msgid "No fields changed."
@ -509,12 +511,12 @@ msgstr "Nobeno polje ni bilo spremenjeno."
#: contrib/admin/views/main.py:346 #: contrib/admin/views/main.py:346
#, python-format #, python-format
msgid "The %(name)s \"%(obj)s\" was changed successfully." msgid "The %(name)s \"%(obj)s\" was changed successfully."
msgstr "%(name)s \"%(obj)s\" je bilo uspešno spremenjeno." msgstr "%(name)s \"%(obj)s\" je bil uspešno spremenjeno."
#: contrib/admin/views/main.py:354 #: contrib/admin/views/main.py:354
#, python-format #, python-format
msgid "The %(name)s \"%(obj)s\" was added successfully. You may edit it again below." 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." msgstr "%(name)s \"%(obj)s\" je bil uspešno dodano. Ponovno ga lahko urejdite spodaj."
#: contrib/admin/views/main.py:392 #: contrib/admin/views/main.py:392
#, python-format #, python-format
@ -534,7 +536,7 @@ msgstr "Eden ali več %(fieldname)s v %(name)s:"
#: contrib/admin/views/main.py:508 #: contrib/admin/views/main.py:508
#, python-format #, python-format
msgid "The %(name)s \"%(obj)s\" was deleted successfully." msgid "The %(name)s \"%(obj)s\" was deleted successfully."
msgstr "%(name)s \"%(obj)s\" je bilo uspešno izbrisano." msgstr "%(name)s \"%(obj)s\" je bilo uspešno izbrisan."
#: contrib/admin/views/main.py:511 #: contrib/admin/views/main.py:511
msgid "Are you sure?" msgid "Are you sure?"
@ -562,11 +564,11 @@ msgstr "Izberite %s, ki ga želite spremeniti"
#: contrib/admin/views/doc.py:295 #: contrib/admin/views/doc.py:295
#: contrib/admin/views/doc.py:297 #: contrib/admin/views/doc.py:297
msgid "Integer" msgid "Integer"
msgstr "Število (integer)" msgstr "Celo število (integer)"
#: contrib/admin/views/doc.py:278 #: contrib/admin/views/doc.py:278
msgid "Boolean (Either True or False)" msgid "Boolean (Either True or False)"
msgstr "Boolean (ali True ali False)" msgstr "Boolean (True ali False)"
#: contrib/admin/views/doc.py:279 #: contrib/admin/views/doc.py:279
#: contrib/admin/views/doc.py:296 #: contrib/admin/views/doc.py:296
@ -576,19 +578,19 @@ msgstr "Niz (vse do %(maxlength)s)"
#: contrib/admin/views/doc.py:280 #: contrib/admin/views/doc.py:280
msgid "Comma-separated integers" msgid "Comma-separated integers"
msgstr "Z vejico ločeni integerji" msgstr "Z vejico ločena cela števila (integer)"
#: contrib/admin/views/doc.py:281 #: contrib/admin/views/doc.py:281
msgid "Date (without time)" msgid "Date (without time)"
msgstr "Datum (brez časa)" msgstr "Datum (brez ure)"
#: contrib/admin/views/doc.py:282 #: contrib/admin/views/doc.py:282
msgid "Date (with time)" msgid "Date (with time)"
msgstr "Datum (s časom)" msgstr "Datum (z uro)"
#: contrib/admin/views/doc.py:283 #: contrib/admin/views/doc.py:283
msgid "E-mail address" msgid "E-mail address"
msgstr "E-naslov" msgstr "E-mail naslov"
#: contrib/admin/views/doc.py:284 #: contrib/admin/views/doc.py:284
#: contrib/admin/views/doc.py:287 #: contrib/admin/views/doc.py:287
@ -601,7 +603,7 @@ msgstr "Decimalno število"
#: contrib/admin/views/doc.py:291 #: contrib/admin/views/doc.py:291
msgid "Boolean (Either True, False or None)" msgid "Boolean (Either True, False or None)"
msgstr "Boolean (ali True ali False ali None)" msgstr "Boolean (True, False ali None)"
#: contrib/admin/views/doc.py:292 #: contrib/admin/views/doc.py:292
msgid "Relation to parent model" msgid "Relation to parent model"
@ -701,11 +703,11 @@ msgstr "N j, Y, H:i"
#: contrib/admin/templates/admin/object_history.html:36 #: 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." 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." msgstr "Ta objekt nima zgodovine sprememb. Verjetno ni bil dodan preko te strani za administracijo."
#: contrib/admin/templates/admin/base_site.html:4 #: contrib/admin/templates/admin/base_site.html:4
msgid "Django site admin" msgid "Django site admin"
msgstr "Django site admin" msgstr "Vmesnik za administracijo Django strani"
#: contrib/admin/templates/admin/base_site.html:7 #: contrib/admin/templates/admin/base_site.html:7
msgid "Django administration" msgid "Django administration"
@ -717,7 +719,7 @@ msgstr "Napaka strežnika"
#: contrib/admin/templates/admin/500.html:6 #: contrib/admin/templates/admin/500.html:6
msgid "Server error (500)" msgid "Server error (500)"
msgstr "Django napaka (500)" msgstr "Napaka strežnika (500)"
#: contrib/admin/templates/admin/500.html:9 #: contrib/admin/templates/admin/500.html:9
msgid "Server Error <em>(500)</em>" msgid "Server Error <em>(500)</em>"
@ -725,7 +727,7 @@ msgstr "Napaka strežnika <em>(500)</em>"
#: contrib/admin/templates/admin/500.html:10 #: 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." 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." msgstr "Prišlo je do nepričakovane napake. Administrator je preko e-pošte prejel obvestilo o napaki in jo bo v kratkem odpravil. Hvala za potrpljenje."
#: contrib/admin/templates/admin/404.html:4 #: contrib/admin/templates/admin/404.html:4
#: contrib/admin/templates/admin/404.html:8 #: contrib/admin/templates/admin/404.html:8
@ -734,7 +736,7 @@ msgstr "Strani ni mogoče najti"
#: contrib/admin/templates/admin/404.html:10 #: contrib/admin/templates/admin/404.html:10
msgid "We're sorry, but the requested page could not be found." msgid "We're sorry, but the requested page could not be found."
msgstr "Se opravičujemo, a zahtevane strani ni mogoče najti." msgstr "Opravičujemo se, a zahtevane strani ni mogoče najti."
#: contrib/admin/templates/admin/index.html:17 #: contrib/admin/templates/admin/index.html:17
#, python-format #, python-format
@ -773,7 +775,7 @@ msgstr "Dodaj %(name)s"
#: contrib/admin/templates/admin/login.html:22 #: contrib/admin/templates/admin/login.html:22
msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?" msgid "Have you <a href=\"/password_reset/\">forgotten your password</a>?"
msgstr "Ste <a href=\"/password_reset/\">pozabili geslo</a>" msgstr "Ste <a href=\"/password_reset/\">pozabili geslo</a>?"
#: contrib/admin/templates/admin/base.html:23 #: contrib/admin/templates/admin/base.html:23
msgid "Welcome," msgid "Welcome,"
@ -787,7 +789,7 @@ msgstr "Izbriši"
#: contrib/admin/templates/admin/delete_confirmation.html:14 #: contrib/admin/templates/admin/delete_confirmation.html:14
#, python-format #, 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:" 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:" msgstr "Izbris %(object_name)s '%(object)s' bi pomenil izbris povezanih objektov, vendar nimate dovoljenja za izbris naslednjih tipov objektov:"
#: contrib/admin/templates/admin/delete_confirmation.html:21 #: contrib/admin/templates/admin/delete_confirmation.html:21
#, python-format #, python-format
@ -815,17 +817,17 @@ msgstr "Poglej na strani"
msgid "Please correct the error below." msgid "Please correct the error below."
msgid_plural "Please correct the errors below." msgid_plural "Please correct the errors below."
msgstr[0] "Prosimo, odpravite sledečo napako." msgstr[0] "Prosimo, odpravite sledečo napako."
msgstr[1] "Prosimo, odpravite sledeče napake." msgstr[1] "Prosimo, odpravite sledeči napaki."
msgstr[2] "Prosimo, odpravite sledeči napaki." msgstr[2] "Prosimo, odpravite sledeče napake."
msgstr[3] "Prosimo, odpravite sledeče napake." msgstr[3] "Prosimo, odpravite sledeče napake."
#: contrib/admin/templates/admin/change_form.html:48 #: contrib/admin/templates/admin/change_form.html:48
msgid "Ordering" msgid "Ordering"
msgstr "Urejanje" msgstr "Razvrščanje"
#: contrib/admin/templates/admin/change_form.html:51 #: contrib/admin/templates/admin/change_form.html:51
msgid "Order:" msgid "Order:"
msgstr "Uredi:" msgstr "Razvrsti:"
#: contrib/admin/templates/admin/submit_line.html:4 #: contrib/admin/templates/admin/submit_line.html:4
msgid "Save as new" msgid "Save as new"
@ -853,7 +855,7 @@ msgstr "Sprememba gesla"
#: contrib/admin/templates/registration/password_change_done.html:6 #: contrib/admin/templates/registration/password_change_done.html:6
#: contrib/admin/templates/registration/password_change_done.html:10 #: contrib/admin/templates/registration/password_change_done.html:10
msgid "Password change successful" msgid "Password change successful"
msgstr "Geslo uspešno spremenjeno" msgstr "Sprememba gesla je uspela"
#: contrib/admin/templates/registration/password_change_done.html:12 #: contrib/admin/templates/registration/password_change_done.html:12
msgid "Your password was changed." msgid "Your password was changed."
@ -864,23 +866,23 @@ msgstr "Vaše geslo je bilo spremenjeno."
#: contrib/admin/templates/registration/password_reset_form.html:10 #: contrib/admin/templates/registration/password_reset_form.html:10
#: contrib/admin/templates/registration/password_reset_done.html:4 #: contrib/admin/templates/registration/password_reset_done.html:4
msgid "Password reset" msgid "Password reset"
msgstr "Obnova gesla" msgstr "Ponastavitev gesla"
#: contrib/admin/templates/registration/password_reset_form.html:12 #: 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." 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." msgstr "Ste pozabili geslo? Vnesite vaš e-mail naslov in poslali vam bomo novo geslo."
#: contrib/admin/templates/registration/password_reset_form.html:16 #: contrib/admin/templates/registration/password_reset_form.html:16
msgid "E-mail address:" msgid "E-mail address:"
msgstr "E-naslov" msgstr "Naslov e-pošte:"
#: contrib/admin/templates/registration/password_reset_form.html:16 #: contrib/admin/templates/registration/password_reset_form.html:16
msgid "Reset my password" msgid "Reset my password"
msgstr "Obnova gesla" msgstr "Ponastavi moje geslo"
#: contrib/admin/templates/registration/logged_out.html:8 #: contrib/admin/templates/registration/logged_out.html:8
msgid "Thanks for spending some quality time with the Web site today." msgid "Thanks for spending some quality time with the Web site today."
msgstr "Hvala, ker ste si vzeli nekaj časa za to spletno stran." msgstr "Hvala, ker ste si danes vzeli nekaj časa za to spletno stran."
#: contrib/admin/templates/registration/logged_out.html:10 #: contrib/admin/templates/registration/logged_out.html:10
msgid "Log in again" msgid "Log in again"
@ -889,15 +891,15 @@ msgstr "Ponovna prijava"
#: contrib/admin/templates/registration/password_reset_done.html:6 #: contrib/admin/templates/registration/password_reset_done.html:6
#: contrib/admin/templates/registration/password_reset_done.html:10 #: contrib/admin/templates/registration/password_reset_done.html:10
msgid "Password reset successful" msgid "Password reset successful"
msgstr "Geslo je bilo uspešno obnovljeno" msgstr "Ponastavitev gesla je uspela"
#: contrib/admin/templates/registration/password_reset_done.html:12 #: 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" 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 #: 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." 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)" 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 #: contrib/admin/templates/registration/password_change_form.html:17
msgid "Old password:" msgid "Old password:"
@ -913,16 +915,16 @@ msgstr "Potrditev gesla:"
#: contrib/admin/templates/registration/password_change_form.html:23 #: contrib/admin/templates/registration/password_change_form.html:23
msgid "Change my password" msgid "Change my password"
msgstr "Sprememba gesla" msgstr "Spremeni moje geslo"
#: contrib/admin/templates/registration/password_reset_email.html:2 #: contrib/admin/templates/registration/password_reset_email.html:2
msgid "You're receiving this e-mail because you requested a password reset" msgid "You're receiving this e-mail because you requested a password reset"
msgstr "To pošto ste dobili, ker ste zahtevali spremembo gesla" msgstr "Ta e-mail ste dobili, ker ste zahtevali ponastavitev gesla"
#: contrib/admin/templates/registration/password_reset_email.html:3 #: contrib/admin/templates/registration/password_reset_email.html:3
#, python-format #, python-format
msgid "for your user account at %(site_name)s" msgid "for your user account at %(site_name)s"
msgstr "za vaš uporabniški račun pri %(site_name)s" msgstr "za vaš uporabniški račun na %(site_name)s"
#: contrib/admin/templates/registration/password_reset_email.html:5 #: contrib/admin/templates/registration/password_reset_email.html:5
#, python-format #, python-format
@ -935,7 +937,7 @@ msgstr "Geslo lahko spremenite z obiskom strani:"
#: contrib/admin/templates/registration/password_reset_email.html:11 #: contrib/admin/templates/registration/password_reset_email.html:11
msgid "Your username, in case you've forgotten:" msgid "Your username, in case you've forgotten:"
msgstr "Vaše uporabniško ime (za vsak primer)" msgstr "Vaše uporabniško ime (za vsak primer):"
#: contrib/admin/templates/registration/password_reset_email.html:13 #: contrib/admin/templates/registration/password_reset_email.html:13
msgid "Thanks for using our site!" msgid "Thanks for using our site!"
@ -955,6 +957,7 @@ msgid "Documentation bookmarklets"
msgstr "Dokumentacijske zaznamkice" msgstr "Dokumentacijske zaznamkice"
#: contrib/admin/templates/admin_doc/bookmarklets.html:9 #: contrib/admin/templates/admin_doc/bookmarklets.html:9
#, fuzzy
msgid "" msgid ""
"\n" "\n"
"<p class=\"help\">To install bookmarklets, drag the link to your bookmarks\n" "<p class=\"help\">To install bookmarklets, drag the link to your bookmarks\n"
@ -966,11 +969,11 @@ msgid ""
msgstr "" msgstr ""
"\n" "\n"
"<p class=\"help\">Za inštalacijo zaznamkic povlečite povezavo v orodno vrstico\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" "z zaznamki, ali kliknite z desno miškino tipko na povezavo in jo dodajte med zaznamke. Zdaj lahko izberete zaznamkico s katerekoli strani. Opomba: nekatere izmed teh strani lahko gledate le z računalnika, ki je označen kot \"notranji\" (v kolikor niste prepričani, če je vaš računalnik označen kot \"notranji\"se obrnite na sistemskega administratorja).</p>\n"
#: contrib/admin/templates/admin_doc/bookmarklets.html:19 #: contrib/admin/templates/admin_doc/bookmarklets.html:19
msgid "Documentation for this page" msgid "Documentation for this page"
msgstr "Dokumentacija za to stran" msgstr "Dokumentacija te strani"
#: contrib/admin/templates/admin_doc/bookmarklets.html:20 #: contrib/admin/templates/admin_doc/bookmarklets.html:20
msgid "Jumps you from any page to the documentation for the view that generates that page." msgid "Jumps you from any page to the documentation for the view that generates that page."
@ -986,7 +989,7 @@ msgstr "Pokaže content-type in unikatni ID za strani, ki predstavljajo en objek
#: contrib/admin/templates/admin_doc/bookmarklets.html:25 #: contrib/admin/templates/admin_doc/bookmarklets.html:25
msgid "Edit this object (current window)" msgid "Edit this object (current window)"
msgstr "Uredi trenutni objekt (v trenutnem oknu)" msgstr "Uredi objekt (v trenutnem oknu)"
#: contrib/admin/templates/admin_doc/bookmarklets.html:26 #: contrib/admin/templates/admin_doc/bookmarklets.html:26
msgid "Jumps to the admin page for pages that represent a single object." msgid "Jumps to the admin page for pages that represent a single object."
@ -1006,7 +1009,7 @@ msgstr "Datum:"
#: contrib/admin/templates/widget/date_time.html:4 #: contrib/admin/templates/widget/date_time.html:4
msgid "Time:" msgid "Time:"
msgstr "Čas:" msgstr "Ura:"
#: contrib/admin/templates/widget/file.html:2 #: contrib/admin/templates/widget/file.html:2
msgid "Currently:" msgid "Currently:"
@ -1022,7 +1025,7 @@ msgstr "preusmeritev iz"
#: contrib/redirects/models.py:8 #: contrib/redirects/models.py:8
msgid "This should be an absolute path, excluding the domain name. Example: '/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'-" msgstr "Ta pot mora biti absolutna, brez imena domene. Primer: '/events/search'"
#: contrib/redirects/models.py:9 #: contrib/redirects/models.py:9
msgid "redirect to" msgid "redirect to"
@ -1030,7 +1033,7 @@ msgstr "preusmeri na"
#: contrib/redirects/models.py:10 #: contrib/redirects/models.py:10
msgid "This can be either an absolute path (as above) or a full URL starting with '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://')" msgstr "To je lahko absolutna pot (kot zgoraj) ali popoln URL naslov (ki se začne s 'http://')"
#: contrib/redirects/models.py:12 #: contrib/redirects/models.py:12
msgid "redirect" msgid "redirect"
@ -1042,7 +1045,7 @@ msgstr "preusmeritve"
#: contrib/flatpages/models.py:8 #: contrib/flatpages/models.py:8
msgid "Example: '/about/contact/'. Make sure to have leading and trailing slashes." 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." msgstr "Primer: '/about/contact/'. Preverite ali vsebuje / (poševnico) na začetku in koncu vnosa."
#: contrib/flatpages/models.py:9 #: contrib/flatpages/models.py:9
msgid "title" msgid "title"
@ -1070,7 +1073,7 @@ msgstr "obvezna registracija"
#: contrib/flatpages/models.py:14 #: contrib/flatpages/models.py:14
msgid "If this is checked, only logged-in users will be able to view the page." 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 izbrano, si bodo to stran lahko ogledali le prijavljeni uporabniki."
#: contrib/flatpages/models.py:18 #: contrib/flatpages/models.py:18
msgid "flat page" msgid "flat page"
@ -1121,7 +1124,7 @@ msgstr "priimek"
#: contrib/auth/models.py:58 #: contrib/auth/models.py:58
msgid "e-mail address" msgid "e-mail address"
msgstr "e-naslov" msgstr "e-mail naslov"
#: contrib/auth/models.py:59 #: contrib/auth/models.py:59
msgid "password" msgid "password"
@ -1157,7 +1160,7 @@ msgstr "član od"
#: contrib/auth/models.py:66 #: 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." 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." msgstr "Poleg ročno določenih dovoljenj bo ta uporabnik dobil tudi vsa dovoljenja, ki pripadajo skupinam, katerih član je."
#: contrib/auth/models.py:67 #: contrib/auth/models.py:67
msgid "user permissions" msgid "user permissions"
@ -1201,19 +1204,19 @@ msgstr "python ime razreda modela"
#: contrib/contenttypes/models.py:28 #: contrib/contenttypes/models.py:28
msgid "content type" msgid "content type"
msgstr "content type" msgstr "tip vsebine"
#: contrib/contenttypes/models.py:29 #: contrib/contenttypes/models.py:29
msgid "content types" msgid "content types"
msgstr "content types" msgstr "tipi vsebine"
#: contrib/sessions/models.py:35 #: contrib/sessions/models.py:35
msgid "session key" msgid "session key"
msgstr "sejni ključ" msgstr "ključ seje"
#: contrib/sessions/models.py:36 #: contrib/sessions/models.py:36
msgid "session data" msgid "session data"
msgstr "podatki v seji" msgstr "podatki seje"
#: contrib/sessions/models.py:37 #: contrib/sessions/models.py:37
msgid "expire date" msgid "expire date"
@ -1415,50 +1418,50 @@ msgstr "dec."
#: utils/timesince.py:12 #: utils/timesince.py:12
msgid "year" msgid "year"
msgid_plural "years" msgid_plural "years"
msgstr[0] "let" msgstr[0] "leto"
msgstr[1] "leto" msgstr[1] "leti"
msgstr[2] "leti" msgstr[2] "leta"
msgstr[3] "leta" msgstr[3] "let"
#: utils/timesince.py:13 #: utils/timesince.py:13
msgid "month" msgid "month"
msgid_plural "months" msgid_plural "months"
msgstr[0] "mesecev" msgstr[0] "mesec"
msgstr[1] "mesec" msgstr[1] "meseca"
msgstr[2] "meseca" msgstr[2] "meseci"
msgstr[3] "meseci" msgstr[3] "mesecev"
#: utils/timesince.py:14 #: utils/timesince.py:14
msgid "week" msgid "week"
msgid_plural "weeks" msgid_plural "weeks"
msgstr[0] "tednov" msgstr[0] "teden"
msgstr[1] "teden" msgstr[1] "tedna"
msgstr[2] "tedna" msgstr[2] "tedni"
msgstr[3] "tednov" msgstr[3] "tednov"
#: utils/timesince.py:15 #: utils/timesince.py:15
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "dni" msgstr[0] "dan"
msgstr[1] "dan" msgstr[1] "dneva"
msgstr[2] "dneva" msgstr[2] "dnevi"
msgstr[3] "dni" msgstr[3] "dni"
#: utils/timesince.py:16 #: utils/timesince.py:16
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "ur" msgstr[0] "ura"
msgstr[1] "ura" msgstr[1] "uri"
msgstr[2] "uri" msgstr[2] "ure"
msgstr[3] "ure" msgstr[3] "ur"
#: utils/timesince.py:17 #: utils/timesince.py:17
msgid "minute" msgid "minute"
msgid_plural "minutes" msgid_plural "minutes"
msgstr[0] "minut" msgstr[0] "minuta"
msgstr[1] "minuta" msgstr[1] "minuti"
msgstr[2] "minuti" msgstr[2] "minute"
msgstr[3] "minute" msgstr[3] "minut"
#: conf/global_settings.py:37 #: conf/global_settings.py:37
msgid "Bengali" msgid "Bengali"
@ -1562,7 +1565,7 @@ msgstr "Ukrajinski"
#: conf/global_settings.py:62 #: conf/global_settings.py:62
msgid "Simplified Chinese" msgid "Simplified Chinese"
msgstr "Poenostavljen kitajski" msgstr "Poenostavljeni kitajski"
#: conf/global_settings.py:63 #: conf/global_settings.py:63
msgid "Traditional Chinese" msgid "Traditional Chinese"
@ -1570,27 +1573,27 @@ msgstr "Tradicionalni kitajski"
#: core/validators.py:60 #: core/validators.py:60
msgid "This value must contain only letters, numbers and underscores." msgid "This value must contain only letters, numbers and underscores."
msgstr "To polje lahko vsebuje le črke, števila in podčrtaje (_)." msgstr "Ta vrednost mora vsebovati le črke, števila in podčrtaje (_)."
#: core/validators.py:64 #: core/validators.py:64
msgid "This value must contain only letters, numbers, underscores, dashes or slashes." 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." msgstr "Ta vrednost mora vsebovati le črke, števila, podčrtaje, poševnice ali pomišljaje."
#: core/validators.py:72 #: core/validators.py:72
msgid "Uppercase letters are not allowed here." msgid "Uppercase letters are not allowed here."
msgstr "Velike tiskane črke tu niso dovoljene." msgstr "Velike tiskane črke niso dovoljene."
#: core/validators.py:76 #: core/validators.py:76
msgid "Lowercase letters are not allowed here." msgid "Lowercase letters are not allowed here."
msgstr "Majhne tiskane črke tu niso dovoljene." msgstr "Majhne tiskane črke niso dovoljene."
#: core/validators.py:83 #: core/validators.py:83
msgid "Enter only digits separated by commas." msgid "Enter only digits separated by commas."
msgstr "Vnesite števila, ločena z vejicami." msgstr "Vnesite samo števila, ločena z vejicami."
#: core/validators.py:95 #: core/validators.py:95
msgid "Enter valid e-mail addresses separated by commas." msgid "Enter valid e-mail addresses separated by commas."
msgstr "Vnesite veljavne e-pošne naslove, ločene z vejicami." msgstr "Vnesite veljavne e-mail naslove, ločene z vejicami."
#: core/validators.py:99 #: core/validators.py:99
msgid "Please enter a valid IP address." msgid "Please enter a valid IP address."
@ -1602,11 +1605,11 @@ msgstr "Prazne vrednosti tu niso dovoljene."
#: core/validators.py:107 #: core/validators.py:107
msgid "Non-numeric characters aren't allowed here." msgid "Non-numeric characters aren't allowed here."
msgstr "Nenumerične vrednosti tukaj niso dovoljne." msgstr "Nenumerični znaki tukaj niso dovoljne."
#: core/validators.py:111 #: core/validators.py:111
msgid "This value can't be comprised solely of digits." msgid "This value can't be comprised solely of digits."
msgstr "To polje ne sme vsebovati le števk." msgstr "Ta vrednost ne sme vsebovati le števk."
#: core/validators.py:116 #: core/validators.py:116
msgid "Enter a whole number." msgid "Enter a whole number."
@ -1614,7 +1617,7 @@ msgstr "Vnesite celo število."
#: core/validators.py:120 #: core/validators.py:120
msgid "Only alphabetical characters are allowed here." msgid "Only alphabetical characters are allowed here."
msgstr "Le črke iz abecede so dovoljene tukaj." msgstr "Tukaj so dovoljene samo črke."
#: core/validators.py:124 #: core/validators.py:124
msgid "Enter a valid date in YYYY-MM-DD format." msgid "Enter a valid date in YYYY-MM-DD format."
@ -1631,11 +1634,11 @@ msgstr "Vnesite veljavni datum/čas v zapisu YYYY-MM-DD HH:MM (leto-mesec-dan ur
#: core/validators.py:136 #: core/validators.py:136
msgid "Enter a valid e-mail address." msgid "Enter a valid e-mail address."
msgstr "Vnesite veljavni e-naslov." msgstr "Vnesite veljaven e-mail."
#: core/validators.py:148 #: core/validators.py:148
msgid "Upload a valid image. The file you uploaded was either not an image or a corrupted image." 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." msgstr "Naložite veljavno sliko. Naložena datoteka ni bila slika ali pa je bila le-ta okvarjena."
#: core/validators.py:155 #: core/validators.py:155
#, python-format #, python-format
@ -1654,7 +1657,7 @@ msgstr "URL %s ne kaže na veljavni QuickTime video."
#: core/validators.py:171 #: core/validators.py:171
msgid "A valid URL is required." msgid "A valid URL is required."
msgstr "Potreben je veljavni URL naslov." msgstr "Potreben je veljaven URL naslov."
#: core/validators.py:185 #: core/validators.py:185
#, python-format #, python-format
@ -1662,24 +1665,24 @@ msgid ""
"Valid HTML is required. Specific errors are:\n" "Valid HTML is required. Specific errors are:\n"
"%s" "%s"
msgstr "" msgstr ""
"Potreben je veljavni HTML. Trenutni ima sledeče napake:\n" "Potreben je veljaven HTML. Trenutni ima sledeče napake:\n"
"%s" "%s"
#: core/validators.py:192 #: core/validators.py:192
#, python-format #, python-format
msgid "Badly formed XML: %s" msgid "Badly formed XML: %s"
msgstr "Pokvarjen XML: %s" msgstr "Nepravilen XML: %s"
#: core/validators.py:202 #: core/validators.py:202
#, python-format #, python-format
msgid "Invalid URL: %s" msgid "Invalid URL: %s"
msgstr "Neveljavni URL naslov: %s" msgstr "Neveljaven URL naslov: %s"
#: core/validators.py:206 #: core/validators.py:206
#: core/validators.py:208 #: core/validators.py:208
#, python-format #, python-format
msgid "The URL %s is a broken link." msgid "The URL %s is a broken link."
msgstr "URL povezava %s je polomljena." msgstr "URL povezava %s ne deluje."
#: core/validators.py:214 #: core/validators.py:214
msgid "Enter a valid U.S. state abbreviation." msgid "Enter a valid U.S. state abbreviation."
@ -1690,7 +1693,7 @@ msgstr "Vnesi veljavno okrajšavo za ameriško zvezno državo."
msgid "Watch your mouth! The word %s is not allowed here." msgid "Watch your mouth! The word %s is not allowed here."
msgid_plural "Watch your mouth! The words %s are 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[0] "Pazite na jezik! Beseda %s tu ni dovoljena."
msgstr[1] "Pazite na jezik! Besede %s tu niso dovoljene." msgstr[1] "Pazite na jezik! Besedi %s tu nista dovoljeni."
msgstr[2] "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." msgstr[3] "Pazite na jezik! Besede %s tu niso dovoljene."
@ -1701,22 +1704,22 @@ msgstr "To polje mora ustrezati polju '%s'."
#: core/validators.py:255 #: core/validators.py:255
msgid "Please enter something for at least one field." msgid "Please enter something for at least one field."
msgstr "Prosim, vnesite nekaj v vsaj eno od polj." msgstr "Prosim, vnesite nekaj v vsaj eno izmed polj."
#: core/validators.py:264 #: core/validators.py:264
#: core/validators.py:275 #: core/validators.py:275
msgid "Please enter both fields or leave them both empty." msgid "Please enter both fields or leave them both empty."
msgstr "Prosimo, izpolnite obe polji ali ju pustite obe prazni." msgstr "Prosimo, izpolnite obe polji ali pa pustite obe prazni."
#: core/validators.py:282 #: core/validators.py:282
#, python-format #, python-format
msgid "This field must be given if %(field)s is %(value)s" msgid "This field must be given if %(field)s is %(value)s"
msgstr "To polje mora biti izpolnjeno, če je %(field)s %(value)s" msgstr "To polje mora biti podano, če je %(field)s %(value)s"
#: core/validators.py:294 #: core/validators.py:294
#, python-format #, python-format
msgid "This field must be given if %(field)s is not %(value)s" msgid "This field must be given if %(field)s is not %(value)s"
msgstr "To polje mora biti izpolnjeno, če ni %(field)s %(value)s" msgstr "To polje mora biti podano, če ni %(field)s %(value)s"
#: core/validators.py:313 #: core/validators.py:313
msgid "Duplicate values are not allowed." msgid "Duplicate values are not allowed."
@ -1729,7 +1732,7 @@ msgstr "Ta vrednost mora biti potenca od %s."
#: core/validators.py:347 #: core/validators.py:347
msgid "Please enter a valid decimal number." msgid "Please enter a valid decimal number."
msgstr "Prosim vnesite decimalno število." msgstr "Prosim vnesite veljavno decimalno število."
#: core/validators.py:349 #: core/validators.py:349
#, python-format #, python-format
@ -1745,19 +1748,19 @@ msgstr[3] "Prosimo, vnesite veljavno decimalno število z največ %s števkami."
msgid "Please enter a valid decimal number with at most %s decimal place." 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." 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[0] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnim mestom."
msgstr[1] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti." msgstr[1] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnima mestoma."
msgstr[2] "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." msgstr[3] "Prosimo, vnesite veljavno decimalno število z največ %s decimalnimi mesti."
#: core/validators.py:362 #: core/validators.py:362
#, python-format #, python-format
msgid "Make sure your uploaded file is at least %s bytes big." msgid "Make sure your uploaded file is at least %s bytes big."
msgstr "Prosimo, poskrbite, da bo prenesena datoteka velika vsaj %s bajtov." msgstr "Prosimo, poskrbite, da bo naložena datoteka velika vsaj %s bajtov."
#: core/validators.py:363 #: core/validators.py:363
#, python-format #, python-format
msgid "Make sure your uploaded file is at most %s bytes big." msgid "Make sure your uploaded file is at most %s bytes big."
msgstr "Poskrbite, da bo prenesena datoteka velika največ %s bajtov." msgstr "Poskrbite, da bo naložena datoteka velika največ %s bajtov."
#: core/validators.py:376 #: core/validators.py:376
msgid "The format for this field is wrong." msgid "The format for this field is wrong."
@ -1770,7 +1773,7 @@ msgstr "To polje ni veljavno."
#: core/validators.py:426 #: core/validators.py:426
#, python-format #, python-format
msgid "Could not retrieve anything from %s." msgid "Could not retrieve anything from %s."
msgstr "Iz %s nisem mogel izločiti ničesar." msgstr "Iz %s nisem mogel pridobiti ničesar."
#: core/validators.py:429 #: core/validators.py:429
#, python-format #, python-format
@ -1780,7 +1783,7 @@ msgstr "URL %(url)s je vrnil neveljavni Content-Type '%(contenttype)s'."
#: core/validators.py:462 #: core/validators.py:462
#, python-format #, python-format
msgid "Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with \"%(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\".)" msgstr "Prosimo, zaprite %(tag)s oznako v vrstici %(line)s. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:466 #: core/validators.py:466
#, python-format #, python-format
@ -1790,7 +1793,7 @@ msgstr "Tekst z začetka vrstice %(line)s ni dovoljen v tem kontekstu. (Vrstica
#: core/validators.py:471 #: core/validators.py:471
#, python-format #, python-format
msgid "\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%(start)s\".)" 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\".)" msgstr "\"%(attr)s\" v vrstici %(line)s je neveljaven atribut. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:476 #: core/validators.py:476
#, python-format #, python-format
@ -1800,12 +1803,12 @@ msgstr "\"<%(tag)s>\" v vrstici %(line)s je neveljavna oznaka. (Vrstica se začn
#: core/validators.py:480 #: core/validators.py:480
#, python-format #, python-format
msgid "A tag on line %(line)s is missing one or more required attributes. (Line starts with \"%(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\".)" msgstr "Oznaki v vrstici %(line)s manjka eden ali več zahtevanih parametrov. (Vrstica se začne z \"%(start)s\".)"
#: core/validators.py:485 #: core/validators.py:485
#, python-format #, python-format
msgid "The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line starts with \"%(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\".)" msgstr "Parameter \"%(attr)s\" v vrstici %(line)s vsebuje neveljavno vrednost. (Vrstica se začne z \"%(start)s\".)"
#: db/models/manipulators.py:302 #: db/models/manipulators.py:302
#, python-format #, python-format
@ -1827,7 +1830,7 @@ msgstr "To polje je obvezno"
#: db/models/fields/__init__.py:337 #: db/models/fields/__init__.py:337
msgid "This value must be an integer." msgid "This value must be an integer."
msgstr "Ta vrednost mora biti število." msgstr "Ta vrednost mora biti celo število."
#: db/models/fields/__init__.py:369 #: db/models/fields/__init__.py:369
msgid "This value must be either True or False." msgid "This value must be either True or False."
@ -1858,8 +1861,8 @@ msgstr "Držite \"Control\" (ali \"Command\" na Mac-u), za izbiro več kot enega
#, python-format #, python-format
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid." 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." 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[0] "Prosimo, vnesite veljavne %(self)s ID-e. Vrednost %(value)r ni veljavna."
msgstr[1] "Prosimo, vnesite veljavni %(self)s ID. Vrednosti %(value)r niso veljavne." msgstr[1] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednosti %(value)r nista veljavni."
msgstr[2] "Prosimo, vnesite veljavne %(self)s ID-je. 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." msgstr[3] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednosti %(value)r niso veljavne."
@ -1867,8 +1870,8 @@ msgstr[3] "Prosimo, vnesite veljavne %(self)s ID-je. Vrednosti %(value)r niso ve
#, python-format #, python-format
msgid "Ensure your text is less than %s character." msgid "Ensure your text is less than %s character."
msgid_plural "Ensure your text is less than %s characters." msgid_plural "Ensure your text is less than %s characters."
msgstr[0] "Poskrbite, da bo tekst krajši od %s znakov." msgstr[0] "Poskrbite, da bo tekst krajši od %s znaka."
msgstr[1] "Poskrbite, da bo tekst krajši od %s znaka." msgstr[1] "Poskrbite, da bo tekst krajši od %s znakov."
msgstr[2] "Poskrbite, da bo tekst krajši od %s znakov." msgstr[2] "Poskrbite, da bo tekst krajši od %s znakov."
msgstr[3] "Poskrbite, da bo tekst krajši od %s znakov." msgstr[3] "Poskrbite, da bo tekst krajši od %s znakov."
@ -1885,11 +1888,11 @@ msgstr "Izberite veljavno možnost; '%(data)s' ni v %(choices)s."
#: forms/__init__.py:645 #: forms/__init__.py:645
msgid "The submitted file is empty." msgid "The submitted file is empty."
msgstr "Poslano polje je prazno." msgstr "Poslana datoteka je prazna."
#: forms/__init__.py:699 #: forms/__init__.py:699
msgid "Enter a whole number between -32,768 and 32,767." msgid "Enter a whole number between -32,768 and 32,767."
msgstr "Vnesite celo število med -32,768 in 32,767." msgstr "Vnesite celo število med -32.768 in 32.767."
#: forms/__init__.py:708 #: forms/__init__.py:708
msgid "Enter a positive number." msgid "Enter a positive number."
@ -1897,11 +1900,11 @@ msgstr "Vnesite pozitivno število."
#: forms/__init__.py:717 #: forms/__init__.py:717
msgid "Enter a whole number between 0 and 32,767." msgid "Enter a whole number between 0 and 32,767."
msgstr "Vnesite celo število med 0 in 32,767." msgstr "Vnesite celo število med 0 in 32.767."
#: template/defaultfilters.py:379 #: template/defaultfilters.py:379
msgid "yes,no,maybe" msgid "yes,no,maybe"
msgstr "ja,ne,morda" msgstr "da,ne,morda"
msgid "Comment" msgid "Comment"
msgstr "Komentar" msgstr "Komentar"

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,12 @@ msgstr ""
"Project-Id-Version: django\n" "Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n" "POT-Creation-Date: 2005-12-09 11:51+0100\n"
"PO-Revision-Date: 2006-01-15 11:24+0100\n" "PO-Revision-Date: 2007-02-20 18:51+0100\n"
"Last-Translator: Nebojša Đorđević <nesh@studioquattro.co.yu>\n" "Last-Translator: Petar Marić <petar.maric@gmail.com>\n"
"Language-Team: Nesh <nesh@studioquatro.co.yu> & Petar <petar.maric@gmail.com> <sr@li.org>\n" "Language-Team: Nesh <nesh@studioquatro.co.yu> & Petar <petar.maric@gmail.com> <sr@li.org>\n"
"MIME-Version: 1.0\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" "Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Serbian\n"
"X-Poedit-Country: YUGOSLAVIA\n" "X-Poedit-Country: YUGOSLAVIA\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
@ -25,15 +24,15 @@ msgstr "Dostupno %s"
#: contrib/admin/media/js/SelectFilter2.js:41 #: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all" msgid "Choose all"
msgstr "Izaberi sve" msgstr "Izaberite sve"
#: contrib/admin/media/js/SelectFilter2.js:46 #: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add" msgid "Add"
msgstr "Dodaj" msgstr "Dodajte"
#: contrib/admin/media/js/SelectFilter2.js:48 #: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove" msgid "Remove"
msgstr "Izbaci" msgstr "Izbacite"
#: contrib/admin/media/js/SelectFilter2.js:53 #: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format #, perl-format
@ -72,7 +71,7 @@ msgstr "Sat"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
msgid "Choose a time" msgid "Choose a time"
msgstr "Izaberi vreme" msgstr "Izaberite vreme"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Midnight" msgid "Midnight"

File diff suppressed because it is too large Load Diff

View File

@ -1,112 +1,125 @@
# SOME DESCRIPTIVE TITLE. # Swedish translation of Django
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # Copyright (C) 2005
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the Django package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#
# Robin Sonefors <ozamosi@blinkenlights.se>, 2005.
# Mikko Hellsing <mikko@sorl.net>, 2007.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django\n" "Project-Id-Version: djangojs\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n" "POT-Creation-Date: 2007-03-06 02:29+0100\n"
"PO-Revision-Date: 2005-12-04 14:12+0100\n" "PO-Revision-Date: 2007-03-06 10:30+0100\n"
"Last-Translator: Robin Sonefors <ozamosi@blinkenlights.se>\n" "Last-Translator: Mikko Hellsing <mikko@sorl.net>\n"
"Language-Team: Django Translators <Django-I18N@googlegroups.com>\n" "Language-Team: Django I18N <Django-I18N@googlegroups.com>\n"
"MIME-Version: 1.0\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" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Swedish\n" "X-Poedit-Language: Swedish\n"
"X-Poedit-Country: SWEDEN\n" "X-Poedit-Country: SWEDEN\n"
#: contrib/admin/media/js/SelectFilter2.js:33 #: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format #, perl-format
msgid "Available %s" msgid "Available %s"
msgstr "" msgstr "Tillgänglig %s"
#: contrib/admin/media/js/SelectFilter2.js:41 #: contrib/admin/media/js/SelectFilter2.js:41
#, fuzzy
msgid "Choose all" msgid "Choose all"
msgstr "Välj en tidpunkt" msgstr "Välj alla"
#: contrib/admin/media/js/SelectFilter2.js:46 #: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add" msgid "Add"
msgstr "" msgstr "Lägg till"
#: contrib/admin/media/js/SelectFilter2.js:48 #: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove" msgid "Remove"
msgstr "" msgstr "Ta bort"
#: contrib/admin/media/js/SelectFilter2.js:53 #: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format #, perl-format
msgid "Chosen %s" msgid "Chosen %s"
msgstr "" msgstr "Vald %s"
#: contrib/admin/media/js/SelectFilter2.js:54 #: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click " msgid "Select your choice(s) and click "
msgstr "" msgstr "Gör dina val och klicka på "
#: contrib/admin/media/js/SelectFilter2.js:59 #: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all" msgid "Clear all"
msgstr "" msgstr "Ta bort alla"
#: contrib/admin/media/js/dateparse.js:26 #: contrib/admin/media/js/dateparse.js:32
#: contrib/admin/media/js/calendar.js:24 #: contrib/admin/media/js/calendar.js:24
msgid "" msgid ""
"January February March April May June July August September October November " "January February March April May June July August September October November "
"December" "December"
msgstr "" msgstr ""
"Januari Februari Mars April Maj Juni Juli Augusti September Oktober November "
"December"
#: contrib/admin/media/js/dateparse.js:27 #: contrib/admin/media/js/dateparse.js:33
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday" msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "" msgstr "Söndag Mondag Tisdag Onsdag Torsdag Fredag Lördag"
#: contrib/admin/media/js/calendar.js:25 #: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S" msgid "S M T W T F S"
msgstr "" msgstr "S M T O T F L"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45 #: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80 #: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "Visa"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "Göm"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now" msgid "Now"
msgstr "Nu" msgstr "Nu"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock" msgid "Clock"
msgstr "Klocka" msgstr "Klocka"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time" msgid "Choose a time"
msgstr "Välj en tidpunkt" msgstr "Välj en tidpunkt"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight" msgid "Midnight"
msgstr "Midnatt" msgstr "Midnatt"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m." msgid "6 a.m."
msgstr "06.00" msgstr "06.00"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon" msgid "Noon"
msgstr "Mitt på dagen" msgstr "Mitt på dagen"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel" msgid "Cancel"
msgstr "Ångra" msgstr "Avbryt"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today" msgid "Today"
msgstr "Idag" msgstr "Idag"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar" msgid "Calendar"
msgstr "Kalender" msgstr "Kalender"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday" msgid "Yesterday"
msgstr "Igår" msgstr "Igår"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow" msgid "Tomorrow"
msgstr "Imorgon" msgstr "Imorgon"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,110 @@
# translation of djangojs.po to Telugu
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# pavithran <pavithran.s@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: djangojs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n"
"PO-Revision-Date: 2007-03-06 16:08+0530\n"
"Last-Translator: pavithran <pavithran.s@gmail.com>\n"
"Language-Team: Telugu <indlinux-telugu@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr "ఆందుబాతులోఉన్న %s "
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "అన్నీ ఎన్నుకోండి"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "ఙత చేయి"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "తీసివేయండి"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "ఎన్నుకున్న %s"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr "మీ ఇష్టాలు ఎన్నుకోండి"
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "అన్ని తీసివేయు"
#: contrib/admin/media/js/dateparse.js:26
#: contrib/admin/media/js/calendar.js:24
msgid ""
"January February March April May June July August September October November "
"December"
msgstr "ఙాన్వరి ఫిబ్రవరి మార్చి ఎప్రిల్ మే ఙూను ఙులై ఆగష్టు సెప్టెంబర్ అక్టోబర్ నవంబర్ డిసెంబర్"
#: contrib/admin/media/js/dateparse.js:27
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "ఆదివారము సోమవారము మంగళవారము బుధవారము గురువారము శుక్రవారము శనివారము"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "ఆ సో మం భు గు శు శ"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now"
msgstr "ఇప్పుడు"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48
msgid "Clock"
msgstr "గడియారము"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
msgid "Choose a time"
msgstr "ఒక సమయము ఎన్నుకోండి"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Midnight"
msgstr "ఆర్ధరాత్రి"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m."
msgstr "6"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon"
msgstr "మధ్యాహ్నము"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
msgid "Cancel"
msgstr "రద్దు చేయు"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
msgid "Today"
msgstr "ఈనాడు"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114
msgid "Calendar"
msgstr "కాలెండర్"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160
msgid "Yesterday"
msgstr "నిన్న"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow"
msgstr "రేపు"

View File

@ -9,15 +9,18 @@ ADMINS = (
MANAGERS = ADMINS MANAGERS = ADMINS
DATABASE_ENGINE = '' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
DATABASE_NAME = '' # Or path to database file if using sqlite3. DATABASE_NAME = '' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3. DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. All choices can be found here: # Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
# although not all variations may be possible on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago' TIME_ZONE = 'America/Chicago'
# Language code for this installation. All choices can be found here: # Language code for this installation. All choices can be found here:

View File

@ -1,6 +0,0 @@
from django.conf.urls.defaults import *
urlpatterns = patterns('django.views',
(r'^$', 'registration.passwords.password_reset', {'is_admin_site' : True}),
(r'^done/$', 'registration.passwords.password_reset_done'),
)

View File

@ -1,19 +0,0 @@
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^login/$', 'django.contrib.auth.views.login'),
(r'^logout/$', 'django.contrib.auth.views.logout'),
(r'^login_another/$', 'django.contrib.auth.views.logout_then_login'),
(r'^register/$', 'ellington.registration.views.registration.signup'),
(r'^register/(?P<challenge_string>\w{32})/$', 'ellington.registration.views.registration.register_form'),
(r'^profile/$', 'ellington.registration.views.profile.profile'),
(r'^profile/welcome/$', 'ellington.registration.views.profile.profile_welcome'),
(r'^profile/edit/$', 'ellington.registration.views.profile.edit_profile'),
(r'^password_reset/$', 'django.contrib.auth.views.password_reset'),
(r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
(r'^password_change/$', 'django.contrib.auth.views.password_change'),
(r'^password_change/done/$', 'django.contrib.auth.views.password_change_done'),
)

View File

@ -57,4 +57,4 @@ fieldset.monospace textarea { font-family:"Bitstream Vera Sans Mono",Monaco,"Cou
.vURLField { width:30em; } .vURLField { width:30em; }
.vLargeTextField, .vXMLLargeTextField { width:48em; } .vLargeTextField, .vXMLLargeTextField { width:48em; }
.flatpages-flatpage #id_content { height:40.2em; } .flatpages-flatpage #id_content { height:40.2em; }
.module table .vPositiveSmallIntegerField { width:2.2em; } .module table .vPositiveSmallIntegerField { width:2.2em; }

View File

@ -7,7 +7,7 @@ function URLify(s, num_chars) {
"with"]; "with"];
r = new RegExp('\\b(' + removelist.join('|') + ')\\b', 'gi'); r = new RegExp('\\b(' + removelist.join('|') + ')\\b', 'gi');
s = s.replace(r, ''); s = s.replace(r, '');
s = s.replace(/[^-A-Z0-9\s]/gi, ''); // remove unneeded chars s = s.replace(/[^-\w\s]/g, ''); // remove unneeded chars
s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens s = s.replace(/[-\s]+/g, '-'); // convert spaces to hyphens
s = s.toLowerCase(); // convert to lowercase s = s.toLowerCase(); // convert to lowercase

View File

@ -84,22 +84,31 @@ def result_headers(cl):
header = attr.short_description header = attr.short_description
except AttributeError: except AttributeError:
header = field_name.replace('_', ' ') header = field_name.replace('_', ' ')
# Non-field list_display values don't get ordering capability.
yield {"text": header} # It is a non-field, but perhaps one that is sortable
if not getattr(getattr(cl.model, field_name), "admin_order_field", None):
yield {"text": header}
continue
# So this _is_ a sortable non-field. Go to the yield
# after the else clause.
else: else:
if isinstance(f.rel, models.ManyToOneRel) and f.null: if isinstance(f.rel, models.ManyToOneRel) and f.null:
yield {"text": f.verbose_name} yield {"text": f.verbose_name}
continue
else: else:
th_classes = [] header = f.verbose_name
new_order_type = 'asc'
if field_name == cl.order_field:
th_classes.append('sorted %sending' % cl.order_type.lower())
new_order_type = {'asc': 'desc', 'desc': 'asc'}[cl.order_type.lower()]
yield {"text": f.verbose_name, th_classes = []
"sortable": True, new_order_type = 'asc'
"url": cl.get_query_string({ORDER_VAR: i, ORDER_TYPE_VAR: new_order_type}), if field_name == cl.order_field:
"class_attrib": (th_classes and ' class="%s"' % ' '.join(th_classes) or '')} th_classes.append('sorted %sending' % cl.order_type.lower())
new_order_type = {'asc': 'desc', 'desc': 'asc'}[cl.order_type.lower()]
yield {"text": header,
"sortable": True,
"url": cl.get_query_string({ORDER_VAR: i, ORDER_TYPE_VAR: new_order_type}),
"class_attrib": (th_classes and ' class="%s"' % ' '.join(th_classes) or '')}
def _boolean_icon(field_val): def _boolean_icon(field_val):
BOOLEAN_MAPPING = {True: 'yes', False: 'no', None: 'unknown'} BOOLEAN_MAPPING = {True: 'yes', False: 'no', None: 'unknown'}

View File

@ -11,6 +11,7 @@ import re
register = template.Library() register = template.Library()
word_re = re.compile('[A-Z][a-z]+') word_re = re.compile('[A-Z][a-z]+')
absolute_url_re = re.compile(r'^(?:http(?:s)?:/)?/', re.IGNORECASE)
def class_name_to_underscored(name): def class_name_to_underscored(name):
return '_'.join([s.lower() for s in word_re.findall(name)[:-1]]) return '_'.join([s.lower() for s in word_re.findall(name)[:-1]])
@ -18,18 +19,19 @@ def class_name_to_underscored(name):
def include_admin_script(script_path): def include_admin_script(script_path):
""" """
Returns an HTML script element for including a script from the admin Returns an HTML script element for including a script from the admin
media url. media url (or other location if an absolute url is given).
Example usage:: Example usage::
{% include_admin_script js/calendar.js %} {% include_admin_script "js/calendar.js" %}
could return:: could return::
<script type="text/javascript" src="/media/admin/js/calendar.js"> <script type="text/javascript" src="/media/admin/js/calendar.js">
""" """
if not absolute_url_re.match(script_path):
return '<script type="text/javascript" src="%s%s"></script>' % (settings.ADMIN_MEDIA_PREFIX, script_path) script_path = '%s%s' % (settings.ADMIN_MEDIA_PREFIX, script_path)
return '<script type="text/javascript" src="%s"></script>' % script_path
include_admin_script = register.simple_tag(include_admin_script) include_admin_script = register.simple_tag(include_admin_script)
def submit_row(context): def submit_row(context):

View File

@ -461,9 +461,12 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
opts_seen.append(related.opts) opts_seen.append(related.opts)
rel_opts_name = related.get_accessor_name() rel_opts_name = related.get_accessor_name()
has_related_objs = False has_related_objs = False
rel_objs = getattr(obj, rel_opts_name, None)
if rel_objs: # related.get_accessor_name() could return None for symmetrical relationships
has_related_objs = True if rel_opts_name:
rel_objs = getattr(obj, rel_opts_name, None)
if rel_objs:
has_related_objs = True
if has_related_objs: if has_related_objs:
for sub_obj in rel_objs.all(): for sub_obj in rel_objs.all():
@ -655,10 +658,17 @@ class ChangeList(object):
order_field, order_type = ordering[0], 'asc' order_field, order_type = ordering[0], 'asc'
if params.has_key(ORDER_VAR): if params.has_key(ORDER_VAR):
try: try:
field_name = lookup_opts.admin.list_display[int(params[ORDER_VAR])]
try: try:
f = lookup_opts.get_field(lookup_opts.admin.list_display[int(params[ORDER_VAR])]) f = lookup_opts.get_field(field_name)
except models.FieldDoesNotExist: except models.FieldDoesNotExist:
pass # see if field_name is a name of a non-field
# that allows sorting
try:
attr = getattr(lookup_opts.admin.manager.model, field_name)
order_field = attr.admin_order_field
except IndexError:
pass
else: else:
if not isinstance(f.rel, models.ManyToOneRel) or not f.null: if not isinstance(f.rel, models.ManyToOneRel) or not f.null:
order_field = f.name order_field = f.name

View File

@ -4,6 +4,7 @@ from django.contrib.sites.models import Site
from django.template import Context, loader from django.template import Context, loader
from django.core import validators from django.core import validators
from django import oldforms from django import oldforms
from django.utils.translation import gettext as _
class UserCreationForm(oldforms.Manipulator): class UserCreationForm(oldforms.Manipulator):
"A form that creates a user, with no privileges, from the given username and password." "A form that creates a user, with no privileges, from the given username and password."

View File

View File

@ -0,0 +1,19 @@
"""
UK-specific Form helpers
"""
from django.newforms.fields import RegexField
from django.utils.translation import gettext
class UKPostcodeField(RegexField):
"""
A form field that validates its input is a UK postcode.
The regular expression used is sourced from the schema for British Standard
BS7666 address types: http://www.govtalk.gov.uk/gdsc/schemas/bs7666-v2-0.xsd
"""
def __init__(self, *args, **kwargs):
super(UKPostcodeField, self).__init__(r'^(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HIK-Y][0-9](|[0-9]|[ABEHMNPRVWXY]))|[0-9][A-HJKSTUW]) [0-9][ABD-HJLNP-UW-Z]{2})$',
max_length=None, min_length=None,
error_message=gettext(u'Enter a postcode. A space is required between the two postcode parts.'),
*args, **kwargs)

View File

@ -0,0 +1,59 @@
"""
USA-specific Form helpers
"""
from django.newforms import ValidationError
from django.newforms.fields import Field, RegexField, Select, EMPTY_VALUES
from django.newforms.util import smart_unicode
from django.utils.translation import gettext
import re
phone_digits_re = re.compile(r'^(?:1-?)?(\d{3})[-\.]?(\d{3})[-\.]?(\d{4})$')
class USZipCodeField(RegexField):
def __init__(self, *args, **kwargs):
super(USZipCodeField, self).__init__(r'^\d{5}(?:-\d{4})?$',
max_length=None, min_length=None,
error_message=gettext(u'Enter a zip code in the format XXXXX or XXXXX-XXXX.'),
*args, **kwargs)
class USPhoneNumberField(Field):
def clean(self, value):
super(USPhoneNumberField, self).clean(value)
if value in EMPTY_VALUES:
return u''
value = re.sub('(\(|\)|\s+)', '', smart_unicode(value))
m = phone_digits_re.search(value)
if m:
return u'%s-%s-%s' % (m.group(1), m.group(2), m.group(3))
raise ValidationError(u'Phone numbers must be in XXX-XXX-XXXX format.')
class USStateField(Field):
"""
A form field that validates its input is a U.S. state name or abbreviation.
It normalizes the input to the standard two-leter postal service
abbreviation for the given state.
"""
def clean(self, value):
from us_states import STATES_NORMALIZED # relative import
super(USStateField, self).clean(value)
if value in EMPTY_VALUES:
return u''
try:
value = value.strip().lower()
except AttributeError:
pass
else:
try:
return STATES_NORMALIZED[value.strip().lower()].decode('ascii')
except KeyError:
pass
raise ValidationError(u'Enter a U.S. state or territory.')
class USStateSelect(Select):
"""
A Select widget that uses a list of U.S. states/territories as its choices.
"""
def __init__(self, attrs=None):
from us_states import STATE_CHOICES # relative import
super(USStateSelect, self).__init__(attrs, choices=STATE_CHOICES)

View File

@ -0,0 +1,239 @@
"""
A mapping of state misspellings/abbreviations to normalized abbreviations, and
an alphabetical list of states for use as `choices` in a formfield.
This exists in this standalone file so that it's only imported into memory
when explicitly needed.
"""
STATE_CHOICES = (
('AL', 'Alabama'),
('AK', 'Alaska'),
('AS', 'American Samoa'),
('AZ', 'Arizona'),
('AR', 'Arkansas'),
('CA', 'California'),
('CO', 'Colorado'),
('CT', 'Connecticut'),
('DE', 'Deleware'),
('DC', 'District of Columbia'),
('FM', 'Federated States of Micronesia'),
('FL', 'Florida'),
('GA', 'Georgia'),
('GU', 'Guam'),
('HI', 'Hawaii'),
('ID', 'Idaho'),
('IL', 'Illinois'),
('IN', 'Indiana'),
('IA', 'Iowa'),
('KS', 'Kansas'),
('KY', 'Kentucky'),
('LA', 'Louisiana'),
('ME', 'Maine'),
('MH', 'Marshall Islands'),
('MD', 'Maryland'),
('MA', 'Massachusetts'),
('MI', 'Michigan'),
('MN', 'Minnesota'),
('MS', 'Mississippi'),
('MO', 'Missouri'),
('MT', 'Montana'),
('NE', 'Nebraska'),
('NV', 'Nevada'),
('NH', 'New Hampshire'),
('NJ', 'New Jersey'),
('NM', 'New Mexico'),
('NY', 'New York'),
('NC', 'North Carolina'),
('ND', 'North Dakota'),
('MP', 'Northern Mariana Islands'),
('OH', 'Ohio'),
('OK', 'Oklahoma'),
('OR', 'Oregon'),
('PW', 'Palau'),
('PA', 'Pennsylvania'),
('PR', 'Puerto Rico'),
('RI', 'Rhode Island'),
('SC', 'South Carolina'),
('SD', 'South Dakota'),
('TN', 'Tennessee'),
('TX', 'Texas'),
('UT', 'Utah'),
('VT', 'Vermont'),
('VI', 'Virgin Islands'),
('VA', 'Virginia'),
('WA', 'Washington'),
('WV', 'West Virginia'),
('WI', 'Wisconsin'),
('WY', 'Wyoming'),
)
STATES_NORMALIZED = {
'ak': 'AK',
'al': 'AL',
'ala': 'AL',
'alabama': 'AL',
'alaska': 'AK',
'american samao': 'AS',
'american samoa': 'AS',
'ar': 'AR',
'ariz': 'AZ',
'arizona': 'AZ',
'ark': 'AR',
'arkansas': 'AR',
'as': 'AS',
'az': 'AZ',
'ca': 'CA',
'calf': 'CA',
'calif': 'CA',
'california': 'CA',
'co': 'CO',
'colo': 'CO',
'colorado': 'CO',
'conn': 'CT',
'connecticut': 'CT',
'ct': 'CT',
'dc': 'DC',
'de': 'DE',
'del': 'DE',
'delaware': 'DE',
'district of columbia': 'DC',
'federated states of micronesia': 'FM',
'fl': 'FL',
'fla': 'FL',
'florida': 'FL',
'fm': 'FM',
'ga': 'GA',
'georgia': 'GA',
'gu': 'GU',
'guam': 'GU',
'hawaii': 'HI',
'hi': 'HI',
'ia': 'IA',
'id': 'ID',
'idaho': 'ID',
'il': 'IL',
'ill': 'IL',
'illinois': 'IL',
'in': 'IN',
'ind': 'IN',
'indiana': 'IN',
'iowa': 'IA',
'kan': 'KS',
'kans': 'KS',
'kansas': 'KS',
'kentucky': 'KY',
'ks': 'KS',
'ky': 'KY',
'la': 'LA',
'louisiana': 'LA',
'ma': 'MA',
'maine': 'ME',
'marianas islands': 'MP',
'marianas islands of the pacific': 'MP',
'marinas islands of the pacific': 'MP',
'maryland': 'MD',
'mass': 'MA',
'massachusetts': 'MA',
'massachussetts': 'MA',
'md': 'MD',
'me': 'ME',
'mi': 'MI',
'mich': 'MI',
'michigan': 'MI',
'micronesia': 'FM',
'minn': 'MN',
'minnesota': 'MN',
'miss': 'MS',
'mississippi': 'MS',
'missouri': 'MO',
'mn': 'MN',
'mo': 'MO',
'mont': 'MT',
'montana': 'MT',
'mp': 'MP',
'ms': 'MS',
'mt': 'MT',
'n d': 'ND',
'n dak': 'ND',
'n h': 'NH',
'n j': 'NJ',
'n m': 'NM',
'n mex': 'NM',
'nc': 'NC',
'nd': 'ND',
'ne': 'NE',
'neb': 'NE',
'nebr': 'NE',
'nebraska': 'NE',
'nev': 'NV',
'nevada': 'NV',
'new hampshire': 'NH',
'new jersey': 'NJ',
'new mexico': 'NM',
'new york': 'NY',
'nh': 'NH',
'nj': 'NJ',
'nm': 'NM',
'nmex': 'NM',
'north carolina': 'NC',
'north dakota': 'ND',
'northern mariana islands': 'MP',
'nv': 'NV',
'ny': 'NY',
'oh': 'OH',
'ohio': 'OH',
'ok': 'OK',
'okla': 'OK',
'oklahoma': 'OK',
'or': 'OR',
'ore': 'OR',
'oreg': 'OR',
'oregon': 'OR',
'pa': 'PA',
'penn': 'PA',
'pennsylvania': 'PA',
'pr': 'PR',
'puerto rico': 'PR',
'rhode island': 'RI',
'ri': 'RI',
's dak': 'SD',
'sc': 'SC',
'sd': 'SD',
'sdak': 'SD',
'south carolina': 'SC',
'south dakota': 'SD',
'tenn': 'TN',
'tennessee': 'TN',
'territory of hawaii': 'HI',
'tex': 'TX',
'texas': 'TX',
'tn': 'TN',
'tx': 'TX',
'us virgin islands': 'VI',
'usvi': 'VI',
'ut': 'UT',
'utah': 'UT',
'va': 'VA',
'vermont': 'VT',
'vi': 'VI',
'viginia': 'VA',
'virgin islands': 'VI',
'virgina': 'VA',
'virginia': 'VA',
'vt': 'VT',
'w va': 'WV',
'wa': 'WA',
'wash': 'WA',
'washington': 'WA',
'west virginia': 'WV',
'wi': 'WI',
'wis': 'WI',
'wisc': 'WI',
'wisconsin': 'WI',
'wv': 'WV',
'wva': 'WV',
'wy': 'WY',
'wyo': 'WY',
'wyoming': 'WY',
}

View File

@ -10,6 +10,7 @@ TEST_COOKIE_VALUE = 'worked'
class SessionWrapper(object): class SessionWrapper(object):
def __init__(self, session_key): def __init__(self, session_key):
self.session_key = session_key self.session_key = session_key
self.accessed = False
self.modified = False self.modified = False
def __contains__(self, key): def __contains__(self, key):
@ -46,6 +47,7 @@ class SessionWrapper(object):
def _get_session(self): def _get_session(self):
# Lazily loads session from storage. # Lazily loads session from storage.
self.accessed = True
try: try:
return self._session_cache return self._session_cache
except AttributeError: except AttributeError:
@ -72,12 +74,14 @@ class SessionMiddleware(object):
def process_response(self, request, response): def process_response(self, request, response):
# If request.session was modified, or if response.session was set, save # If request.session was modified, or if response.session was set, save
# those changes and set a session cookie. # those changes and set a session cookie.
patch_vary_headers(response, ('Cookie',))
try: try:
accessed = request.session.accessed
modified = request.session.modified modified = request.session.modified
except AttributeError: except AttributeError:
pass pass
else: else:
if accessed:
patch_vary_headers(response, ('Cookie',))
if modified or settings.SESSION_SAVE_EVERY_REQUEST: if modified or settings.SESSION_SAVE_EVERY_REQUEST:
session_key = request.session.session_key or Session.objects.get_new_session_key() session_key = request.session.session_key or Session.objects.get_new_session_key()
if settings.SESSION_EXPIRE_AT_BROWSER_CLOSE: if settings.SESSION_EXPIRE_AT_BROWSER_CLOSE:

View File

@ -78,6 +78,7 @@ class Feed(object):
author_link = self.__get_dynamic_attr('author_link', obj), author_link = self.__get_dynamic_attr('author_link', obj),
author_email = self.__get_dynamic_attr('author_email', obj), author_email = self.__get_dynamic_attr('author_email', obj),
categories = self.__get_dynamic_attr('categories', obj), categories = self.__get_dynamic_attr('categories', obj),
feed_copyright = self.__get_dynamic_attr('feed_copyright', obj),
) )
try: try:
@ -116,5 +117,6 @@ class Feed(object):
author_email = author_email, author_email = author_email,
author_link = author_link, author_link = author_link,
categories = self.__get_dynamic_attr('item_categories', item), categories = self.__get_dynamic_attr('item_categories', item),
item_copyright = self.__get_dynamic_attr('item_copyright', item),
) )
return feed return feed

View File

@ -3,12 +3,24 @@
from django.conf import settings from django.conf import settings
from email.MIMEText import MIMEText from email.MIMEText import MIMEText
from email.Header import Header from email.Header import Header
import smtplib, rfc822 from email.Utils import formatdate
import smtplib
import socket import socket
import time import time
import random import random
DNS_NAME = socket.getfqdn() # Cache the hostname # Cache the hostname, but do it lazily: socket.getfqdn() can take a couple of
# seconds, which slows down the restart of the server.
class CachedDnsName(object):
def __str__(self):
return self.get_fqdn()
def get_fqdn(self):
if not hasattr(self, '_fqdn'):
self._fqdn = socket.getfqdn()
return self._fqdn
DNS_NAME = CachedDnsName()
class BadHeaderError(ValueError): class BadHeaderError(ValueError):
pass pass
@ -22,21 +34,34 @@ class SafeMIMEText(MIMEText):
val = Header(val, settings.DEFAULT_CHARSET) val = Header(val, settings.DEFAULT_CHARSET)
MIMEText.__setitem__(self, name, val) MIMEText.__setitem__(self, name, val)
def send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=settings.EMAIL_HOST_USER, auth_password=settings.EMAIL_HOST_PASSWORD): def send_mail(subject, message, from_email, recipient_list, fail_silently=False, auth_user=None, auth_password=None):
""" """
Easy wrapper for sending a single message to a recipient list. All members Easy wrapper for sending a single message to a recipient list. All members
of the recipient list will see the other recipients in the 'To' field. of the recipient list will see the other recipients in the 'To' field.
If auth_user is None, the EMAIL_HOST_USER setting is used.
If auth_password is None, the EMAIL_HOST_PASSWORD setting is used.
""" """
if auth_user is None:
auth_user = settings.EMAIL_HOST_USER
if auth_password is None:
auth_password = settings.EMAIL_HOST_PASSWORD
return send_mass_mail([[subject, message, from_email, recipient_list]], fail_silently, auth_user, auth_password) return send_mass_mail([[subject, message, from_email, recipient_list]], fail_silently, auth_user, auth_password)
def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST_USER, auth_password=settings.EMAIL_HOST_PASSWORD): def send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None):
""" """
Given a datatuple of (subject, message, from_email, recipient_list), sends Given a datatuple of (subject, message, from_email, recipient_list), sends
each message to each recipient list. Returns the number of e-mails sent. each message to each recipient list. Returns the number of e-mails sent.
If from_email is None, the DEFAULT_FROM_EMAIL setting is used. If from_email is None, the DEFAULT_FROM_EMAIL setting is used.
If auth_user and auth_password are set, they're used to log in. If auth_user and auth_password are set, they're used to log in.
If auth_user is None, the EMAIL_HOST_USER setting is used.
If auth_password is None, the EMAIL_HOST_PASSWORD setting is used.
""" """
if auth_user is None:
auth_user = settings.EMAIL_HOST_USER
if auth_password is None:
auth_password = settings.EMAIL_HOST_PASSWORD
try: try:
server = smtplib.SMTP(settings.EMAIL_HOST, settings.EMAIL_PORT) server = smtplib.SMTP(settings.EMAIL_HOST, settings.EMAIL_PORT)
if auth_user and auth_password: if auth_user and auth_password:
@ -54,7 +79,7 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=settings.EMAIL_HOST
msg['Subject'] = subject msg['Subject'] = subject
msg['From'] = from_email msg['From'] = from_email
msg['To'] = ', '.join(recipient_list) msg['To'] = ', '.join(recipient_list)
msg['Date'] = rfc822.formatdate() msg['Date'] = formatdate()
try: try:
random_bits = str(random.getrandbits(64)) random_bits = str(random.getrandbits(64))
except AttributeError: # Python 2.3 doesn't have random.getrandbits(). except AttributeError: # Python 2.3 doesn't have random.getrandbits().

View File

@ -72,6 +72,25 @@ def _get_table_list():
cursor = connection.cursor() cursor = connection.cursor()
return get_introspection_module().get_table_list(cursor) return get_introspection_module().get_table_list(cursor)
def _get_sequence_list():
"Returns a list of information about all DB sequences for all models in all apps"
from django.db import models
apps = models.get_apps()
sequence_list = []
for app in apps:
for model in models.get_models(app):
for f in model._meta.fields:
if isinstance(f, models.AutoField):
sequence_list.append({'table':model._meta.db_table,'column':f.column,})
break # Only one AutoField is allowed per model, so don't bother continuing.
for f in model._meta.many_to_many:
sequence_list.append({'table':f.m2m_db_table(),'column':None,})
return sequence_list
# If the foreign key points to an AutoField, a PositiveIntegerField or a # If the foreign key points to an AutoField, a PositiveIntegerField or a
# PositiveSmallIntegerField, the foreign key should be an IntegerField, not the # PositiveSmallIntegerField, the foreign key should be an IntegerField, not the
# referred field type. Otherwise, the foreign key should be the same type of # referred field type. Otherwise, the foreign key should be the same type of
@ -172,7 +191,8 @@ def _get_sql_model_create(model, known_models=set()):
if f.rel.to in known_models: if f.rel.to in known_models:
field_output.append(style.SQL_KEYWORD('REFERENCES') + ' ' + \ field_output.append(style.SQL_KEYWORD('REFERENCES') + ' ' + \
style.SQL_TABLE(backend.quote_name(f.rel.to._meta.db_table)) + ' (' + \ style.SQL_TABLE(backend.quote_name(f.rel.to._meta.db_table)) + ' (' + \
style.SQL_FIELD(backend.quote_name(f.rel.to._meta.get_field(f.rel.field_name).column)) + ')' style.SQL_FIELD(backend.quote_name(f.rel.to._meta.get_field(f.rel.field_name).column)) + ')' +
backend.get_deferrable_sql()
) )
else: else:
# We haven't yet created the table to which this field # We haven't yet created the table to which this field
@ -221,9 +241,10 @@ def _get_sql_for_pending_references(model, pending_references):
table = opts.db_table table = opts.db_table
col = opts.get_field(f.rel.field_name).column col = opts.get_field(f.rel.field_name).column
r_name = '%s_refs_%s_%s_%s' % (r_col, col, r_table, table) r_name = '%s_refs_%s_%s_%s' % (r_col, col, r_table, table)
final_output.append(style.SQL_KEYWORD('ALTER TABLE') + ' %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s);' % \ final_output.append(style.SQL_KEYWORD('ALTER TABLE') + ' %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s)%s;' % \
(backend.quote_name(r_table), truncate_name(r_name, backend.get_max_name_length()), (backend.quote_name(r_table), truncate_name(r_name, backend.get_max_name_length()),
backend.quote_name(r_col), backend.quote_name(table), backend.quote_name(col))) backend.quote_name(r_col), backend.quote_name(table), backend.quote_name(col),
backend.get_deferrable_sql()))
del pending_references[model] del pending_references[model]
return final_output return final_output
@ -243,18 +264,20 @@ def _get_many_to_many_sql_for_model(model):
(style.SQL_FIELD(backend.quote_name('id')), (style.SQL_FIELD(backend.quote_name('id')),
style.SQL_COLTYPE(data_types['AutoField']), style.SQL_COLTYPE(data_types['AutoField']),
style.SQL_KEYWORD('NOT NULL PRIMARY KEY'))) style.SQL_KEYWORD('NOT NULL PRIMARY KEY')))
table_output.append(' %s %s %s %s (%s),' % \ table_output.append(' %s %s %s %s (%s)%s,' % \
(style.SQL_FIELD(backend.quote_name(f.m2m_column_name())), (style.SQL_FIELD(backend.quote_name(f.m2m_column_name())),
style.SQL_COLTYPE(data_types[get_rel_data_type(opts.pk)] % opts.pk.__dict__), style.SQL_COLTYPE(data_types[get_rel_data_type(opts.pk)] % opts.pk.__dict__),
style.SQL_KEYWORD('NOT NULL REFERENCES'), style.SQL_KEYWORD('NOT NULL REFERENCES'),
style.SQL_TABLE(backend.quote_name(opts.db_table)), style.SQL_TABLE(backend.quote_name(opts.db_table)),
style.SQL_FIELD(backend.quote_name(opts.pk.column)))) style.SQL_FIELD(backend.quote_name(opts.pk.column)),
table_output.append(' %s %s %s %s (%s),' % \ backend.get_deferrable_sql()))
table_output.append(' %s %s %s %s (%s)%s,' % \
(style.SQL_FIELD(backend.quote_name(f.m2m_reverse_name())), (style.SQL_FIELD(backend.quote_name(f.m2m_reverse_name())),
style.SQL_COLTYPE(data_types[get_rel_data_type(f.rel.to._meta.pk)] % f.rel.to._meta.pk.__dict__), style.SQL_COLTYPE(data_types[get_rel_data_type(f.rel.to._meta.pk)] % f.rel.to._meta.pk.__dict__),
style.SQL_KEYWORD('NOT NULL REFERENCES'), style.SQL_KEYWORD('NOT NULL REFERENCES'),
style.SQL_TABLE(backend.quote_name(f.rel.to._meta.db_table)), style.SQL_TABLE(backend.quote_name(f.rel.to._meta.db_table)),
style.SQL_FIELD(backend.quote_name(f.rel.to._meta.pk.column)))) style.SQL_FIELD(backend.quote_name(f.rel.to._meta.pk.column)),
backend.get_deferrable_sql()))
table_output.append(' %s (%s, %s)' % \ table_output.append(' %s (%s, %s)' % \
(style.SQL_KEYWORD('UNIQUE'), (style.SQL_KEYWORD('UNIQUE'),
style.SQL_FIELD(backend.quote_name(f.m2m_column_name())), style.SQL_FIELD(backend.quote_name(f.m2m_column_name())),
@ -352,7 +375,15 @@ def get_sql_reset(app):
get_sql_reset.help_doc = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)." get_sql_reset.help_doc = "Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s)."
get_sql_reset.args = APP_ARGS get_sql_reset.args = APP_ARGS
def get_sql_initial_data_for_model(model): def get_sql_flush():
"Returns a list of the SQL statements used to flush the database"
from django.db import backend
statements = backend.get_sql_flush(style, _get_table_list(), _get_sequence_list())
return statements
get_sql_flush.help_doc = "Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed."
get_sql_flush.args = ''
def get_custom_sql_for_model(model):
from django.db import models from django.db import models
from django.conf import settings from django.conf import settings
@ -379,8 +410,8 @@ def get_sql_initial_data_for_model(model):
return output return output
def get_sql_initial_data(app): def get_custom_sql(app):
"Returns a list of the initial INSERT SQL statements for the given app." "Returns a list of the custom table modifying SQL statements for the given app."
from django.db.models import get_models from django.db.models import get_models
output = [] output = []
@ -388,11 +419,17 @@ def get_sql_initial_data(app):
app_dir = os.path.normpath(os.path.join(os.path.dirname(app.__file__), 'sql')) app_dir = os.path.normpath(os.path.join(os.path.dirname(app.__file__), 'sql'))
for model in app_models: for model in app_models:
output.extend(get_sql_initial_data_for_model(model)) output.extend(get_custom_sql_for_model(model))
return output return output
get_sql_initial_data.help_doc = "Prints the initial INSERT SQL statements for the given app name(s)." get_custom_sql.help_doc = "Prints the custom table modifying SQL statements for the given app name(s)."
get_sql_initial_data.args = APP_ARGS get_custom_sql.args = APP_ARGS
def get_sql_initial_data(apps):
"Returns a list of the initial INSERT SQL statements for the given app."
return style.ERROR("This action has been renamed. Try './manage.py sqlcustom %s'." % ' '.join(apps and apps or ['app1', 'app2']))
get_sql_initial_data.help_doc = "RENAMED: see 'sqlcustom'"
get_sql_initial_data.args = ''
def get_sql_sequence_reset(app): def get_sql_sequence_reset(app):
"Returns a list of the SQL statements to reset PostgreSQL sequences for the given app." "Returns a list of the SQL statements to reset PostgreSQL sequences for the given app."
@ -451,16 +488,26 @@ def get_sql_indexes_for_model(model):
def get_sql_all(app): def get_sql_all(app):
"Returns a list of CREATE TABLE SQL, initial-data inserts, and CREATE INDEX SQL for the given module." "Returns a list of CREATE TABLE SQL, initial-data inserts, and CREATE INDEX SQL for the given module."
return get_sql_create(app) + get_sql_initial_data(app) + get_sql_indexes(app) return get_sql_create(app) + get_custom_sql(app) + get_sql_indexes(app)
get_sql_all.help_doc = "Prints the CREATE TABLE, initial-data and CREATE INDEX SQL statements for the given model module name(s)." get_sql_all.help_doc = "Prints the CREATE TABLE, initial-data and CREATE INDEX SQL statements for the given model module name(s)."
get_sql_all.args = APP_ARGS get_sql_all.args = APP_ARGS
def _emit_post_sync_signal(created_models, verbosity, interactive):
from django.db import models
from django.dispatch import dispatcher
# Emit the post_sync signal for every application.
for app in models.get_apps():
app_name = app.__name__.split('.')[-2]
if verbosity >= 2:
print "Running post-sync handlers for application", app_name
dispatcher.send(signal=models.signals.post_syncdb, sender=app,
app=app, created_models=created_models,
verbosity=verbosity, interactive=interactive)
def syncdb(verbosity=1, interactive=True): def syncdb(verbosity=1, interactive=True):
"Creates the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." "Creates the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
from django.db import backend, connection, transaction, models, get_creation_module from django.db import backend, connection, transaction, models, get_creation_module
from django.db.models import signals
from django.conf import settings from django.conf import settings
from django.dispatch import dispatcher
disable_termcolors() disable_termcolors()
@ -526,27 +573,22 @@ def syncdb(verbosity=1, interactive=True):
# Send the post_syncdb signal, so individual apps can do whatever they need # Send the post_syncdb signal, so individual apps can do whatever they need
# to do at this point. # to do at this point.
for app in models.get_apps(): _emit_post_sync_signal(created_models, verbosity, interactive)
app_name = app.__name__.split('.')[-2]
if verbosity >= 2:
print "Running post-sync handlers for application", app_name
dispatcher.send(signal=signals.post_syncdb, sender=app,
app=app, created_models=created_models,
verbosity=verbosity, interactive=interactive)
# Install initial data for the app (but only if this is a model we've # Install custom SQL for the app (but only if this
# just created) # is a model we've just created)
for app in models.get_apps():
for model in models.get_models(app): for model in models.get_models(app):
if model in created_models: if model in created_models:
initial_sql = get_sql_initial_data_for_model(model) custom_sql = get_custom_sql_for_model(model)
if initial_sql: if custom_sql:
if verbosity >= 1: if verbosity >= 1:
print "Installing initial data for %s.%s model" % (app_name, model._meta.object_name) print "Installing custom SQL for %s.%s model" % (app_name, model._meta.object_name)
try: try:
for sql in initial_sql: for sql in custom_sql:
cursor.execute(sql) cursor.execute(sql)
except Exception, e: except Exception, e:
sys.stderr.write("Failed to install initial SQL data for %s.%s model: %s" % \ sys.stderr.write("Failed to install custom SQL for %s.%s model: %s" % \
(app_name, model._meta.object_name, e)) (app_name, model._meta.object_name, e))
transaction.rollback_unless_managed() transaction.rollback_unless_managed()
else: else:
@ -571,7 +613,10 @@ def syncdb(verbosity=1, interactive=True):
else: else:
transaction.commit_unless_managed() transaction.commit_unless_managed()
syncdb.args = '' # Install the 'initialdata' fixture, using format discovery
load_data(['initial_data'], verbosity=verbosity)
syncdb.help_doc = "Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
syncdb.args = '[--verbosity] [--interactive]'
def get_admin_index(app): def get_admin_index(app):
"Returns admin-index template snippet (in list form) for the given app." "Returns admin-index template snippet (in list form) for the given app."
@ -624,36 +669,6 @@ def diffsettings():
print '\n'.join(output) print '\n'.join(output)
diffsettings.args = "" diffsettings.args = ""
def install(app):
"Executes the equivalent of 'get_sql_all' in the current database."
from django.db import connection, transaction
app_name = app.__name__.split('.')[-2]
disable_termcolors()
# First, try validating the models.
_check_for_validation_errors(app)
sql_list = get_sql_all(app)
try:
cursor = connection.cursor()
for sql in sql_list:
cursor.execute(sql)
except Exception, e:
sys.stderr.write(style.ERROR("""Error: %s couldn't be installed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the database tables already exists.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlall %s'. That's the SQL this command wasn't able to run.
The full error: """ % (app_name, app_name)) + style.ERROR_OUTPUT(str(e)) + '\n')
transaction.rollback_unless_managed()
sys.exit(1)
transaction.commit_unless_managed()
install.help_doc = "Executes ``sqlall`` for the given app(s) in the current database."
install.args = APP_ARGS
def reset(app, interactive=True): def reset(app, interactive=True):
"Executes the equivalent of 'get_sql_reset' in the current database." "Executes the equivalent of 'get_sql_reset' in the current database."
from django.db import connection, transaction from django.db import connection, transaction
@ -695,7 +710,68 @@ The full error: """ % (app_name, app_name)) + style.ERROR_OUTPUT(str(e)) + '\n')
else: else:
print "Reset cancelled." print "Reset cancelled."
reset.help_doc = "Executes ``sqlreset`` for the given app(s) in the current database." reset.help_doc = "Executes ``sqlreset`` for the given app(s) in the current database."
reset.args = APP_ARGS reset.args = '[--interactive]' + APP_ARGS
def flush(verbosity=1, interactive=True):
"Returns all tables in the database to the same state they were in immediately after syncdb."
from django.conf import settings
from django.db import connection, transaction, models
from django.dispatch import dispatcher
disable_termcolors()
# First, try validating the models.
_check_for_validation_errors()
# Import the 'management' module within each installed app, to register
# dispatcher events.
for app_name in settings.INSTALLED_APPS:
try:
__import__(app_name + '.management', {}, {}, [''])
except ImportError:
pass
sql_list = get_sql_flush()
if interactive:
confirm = raw_input("""
You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the database,
and return each table to the state it was in after syncdb.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: """)
else:
confirm = 'yes'
if confirm == 'yes':
try:
cursor = connection.cursor()
for sql in sql_list:
cursor.execute(sql)
except Exception, e:
sys.stderr.write(style.ERROR("""Error: Database %s couldn't be flushed. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlflush'. That's the SQL this command wasn't able to run.
The full error: """ % settings.DATABASE_NAME + style.ERROR_OUTPUT(str(e)) + '\n'))
transaction.rollback_unless_managed()
sys.exit(1)
transaction.commit_unless_managed()
# Emit the post sync signal. This allows individual
# applications to respond as if the database had been
# sync'd from scratch.
_emit_post_sync_signal(models.get_models(), verbosity, interactive)
# Reinstall the initial_data fixture
load_data(['initial_data'], verbosity=verbosity)
else:
print "Flush cancelled."
flush.help_doc = "Executes ``sqlflush`` on the current database."
flush.args = '[--verbosity] [--interactive]'
def _start_helper(app_or_project, name, directory, other_name=''): def _start_helper(app_or_project, name, directory, other_name=''):
other = {'project': 'app', 'app': 'project'}[app_or_project] other = {'project': 'app', 'app': 'project'}[app_or_project]
@ -778,7 +854,7 @@ def inspectdb():
yield "# * Make sure each model has one field with primary_key=True" yield "# * Make sure each model has one field with primary_key=True"
yield "# Feel free to rename the models, but don't rename db_table values or field names." yield "# Feel free to rename the models, but don't rename db_table values or field names."
yield "#" yield "#"
yield "# Also note: You'll have to insert the output of 'django-admin.py sqlinitialdata [appname]'" yield "# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'"
yield "# into your database." yield "# into your database."
yield '' yield ''
yield 'from django.db import models' yield 'from django.db import models'
@ -1201,6 +1277,11 @@ createcachetable.args = "[tablename]"
def run_shell(use_plain=False): def run_shell(use_plain=False):
"Runs a Python interactive interpreter. Tries to use IPython, if it's available." "Runs a Python interactive interpreter. Tries to use IPython, if it's available."
# XXX: (Temporary) workaround for ticket #1796: force early loading of all
# models from installed apps.
from django.db.models.loading import get_models
loaded_models = get_models()
try: try:
if use_plain: if use_plain:
# Don't bother loading IPython, because the user wants plain Python. # Don't bother loading IPython, because the user wants plain Python.
@ -1262,10 +1343,132 @@ def test(app_labels, verbosity=1):
test_module = __import__(test_module_name, {}, {}, test_path[-1]) test_module = __import__(test_module_name, {}, {}, test_path[-1])
test_runner = getattr(test_module, test_path[-1]) test_runner = getattr(test_module, test_path[-1])
test_runner(app_list, verbosity) failures = test_runner(app_list, verbosity)
if failures:
sys.exit(failures)
test.help_doc = 'Runs the test suite for the specified applications, or the entire site if no apps are specified' test.help_doc = 'Runs the test suite for the specified applications, or the entire site if no apps are specified'
test.args = '[--verbosity] ' + APP_ARGS test.args = '[--verbosity] ' + APP_ARGS
def load_data(fixture_labels, verbosity=1):
"Installs the provided fixture file(s) as data in the database."
from django.db.models import get_apps
from django.core import serializers
from django.db import connection, transaction
from django.conf import settings
import sys
# Keep a count of the installed objects and fixtures
count = [0,0]
humanize = lambda dirname: dirname and "'%s'" % dirname or 'absolute path'
# Get a cursor (even though we don't need one yet). This has
# the side effect of initializing the test database (if
# it isn't already initialized).
cursor = connection.cursor()
# Start transaction management. All fixtures are installed in a
# single transaction to ensure that all references are resolved.
transaction.commit_unless_managed()
transaction.enter_transaction_management()
transaction.managed(True)
app_fixtures = [os.path.join(os.path.dirname(app.__file__),'fixtures') for app in get_apps()]
for fixture_label in fixture_labels:
if verbosity > 0:
print "Loading '%s' fixtures..." % fixture_label
for fixture_dir in app_fixtures + list(settings.FIXTURE_DIRS) + ['']:
if verbosity > 1:
print "Checking %s for fixtures..." % humanize(fixture_dir)
parts = fixture_label.split('.')
if len(parts) == 1:
fixture_name = fixture_label
formats = serializers.get_serializer_formats()
else:
fixture_name, format = '.'.join(parts[:-1]), parts[-1]
formats = [format]
label_found = False
for format in formats:
serializer = serializers.get_serializer(format)
if verbosity > 1:
print "Trying %s for %s fixture '%s'..." % \
(humanize(fixture_dir), format, fixture_name)
try:
full_path = os.path.join(fixture_dir, '.'.join([fixture_name, format]))
fixture = open(full_path, 'r')
if label_found:
fixture.close()
print style.ERROR("Multiple fixtures named '%s' in %s. Aborting." %
(fixture_name, humanize(fixture_dir)))
transaction.rollback()
transaction.leave_transaction_management()
return
else:
count[1] += 1
if verbosity > 0:
print "Installing %s fixture '%s' from %s." % \
(format, fixture_name, humanize(fixture_dir))
try:
objects = serializers.deserialize(format, fixture)
for obj in objects:
count[0] += 1
obj.save()
label_found = True
except Exception, e:
fixture.close()
sys.stderr.write(
style.ERROR("Problem installing fixture '%s': %s\n" %
(full_path, str(e))))
transaction.rollback()
transaction.leave_transaction_management()
return
fixture.close()
except:
if verbosity > 1:
print "No %s fixture '%s' in %s." % \
(format, fixture_name, humanize(fixture_dir))
if count[0] == 0:
if verbosity > 0:
print "No fixtures found."
else:
if verbosity > 0:
print "Installed %d object(s) from %d fixture(s)" % tuple(count)
transaction.commit()
transaction.leave_transaction_management()
load_data.help_doc = 'Installs the named fixture(s) in the database'
load_data.args = "[--verbosity] fixture, fixture, ..."
def dump_data(app_labels, format='json', indent=None):
"Output the current contents of the database as a fixture of the given format"
from django.db.models import get_app, get_apps, get_models
from django.core import serializers
if len(app_labels) == 0:
app_list = get_apps()
else:
app_list = [get_app(app_label) for app_label in app_labels]
# Check that the serialization format exists; this is a shortcut to
# avoid collating all the objects and _then_ failing.
try:
serializers.get_serializer(format)
except KeyError:
sys.stderr.write(style.ERROR("Unknown serialization format: %s\n" % format))
objects = []
for app in app_list:
for model in get_models(app):
objects.extend(model.objects.all())
try:
print serializers.serialize(format, objects, indent=indent)
except Exception, e:
sys.stderr.write(style.ERROR("Unable to serialize database: %s\n" % e))
dump_data.help_doc = 'Output the contents of the database as a fixture of the given format'
dump_data.args = '[--format]' + APP_ARGS
# Utilities for command-line script # Utilities for command-line script
DEFAULT_ACTION_MAPPING = { DEFAULT_ACTION_MAPPING = {
@ -1273,8 +1476,10 @@ DEFAULT_ACTION_MAPPING = {
'createcachetable' : createcachetable, 'createcachetable' : createcachetable,
'dbshell': dbshell, 'dbshell': dbshell,
'diffsettings': diffsettings, 'diffsettings': diffsettings,
'dumpdata': dump_data,
'flush': flush,
'inspectdb': inspectdb, 'inspectdb': inspectdb,
'install': install, 'loaddata': load_data,
'reset': reset, 'reset': reset,
'runfcgi': runfcgi, 'runfcgi': runfcgi,
'runserver': runserver, 'runserver': runserver,
@ -1282,6 +1487,8 @@ DEFAULT_ACTION_MAPPING = {
'sql': get_sql_create, 'sql': get_sql_create,
'sqlall': get_sql_all, 'sqlall': get_sql_all,
'sqlclear': get_sql_delete, 'sqlclear': get_sql_delete,
'sqlcustom': get_custom_sql,
'sqlflush': get_sql_flush,
'sqlindexes': get_sql_indexes, 'sqlindexes': get_sql_indexes,
'sqlinitialdata': get_sql_initial_data, 'sqlinitialdata': get_sql_initial_data,
'sqlreset': get_sql_reset, 'sqlreset': get_sql_reset,
@ -1298,7 +1505,6 @@ NO_SQL_TRANSACTION = (
'createcachetable', 'createcachetable',
'dbshell', 'dbshell',
'diffsettings', 'diffsettings',
'install',
'reset', 'reset',
'sqlindexes', 'sqlindexes',
'syncdb', 'syncdb',
@ -1345,6 +1551,10 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
help='Tells Django to NOT prompt the user for input of any kind.') help='Tells Django to NOT prompt the user for input of any kind.')
parser.add_option('--noreload', action='store_false', dest='use_reloader', default=True, parser.add_option('--noreload', action='store_false', dest='use_reloader', default=True,
help='Tells Django to NOT use the auto-reloader when running the development server.') help='Tells Django to NOT use the auto-reloader when running the development server.')
parser.add_option('--format', default='json', dest='format',
help='Specifies the output serialization format for fixtures')
parser.add_option('--indent', default=None, dest='indent',
type='int', help='Specifies the indent level to use when pretty-printing output')
parser.add_option('--verbosity', action='store', dest='verbosity', default='1', parser.add_option('--verbosity', action='store', dest='verbosity', default='1',
type='choice', choices=['0', '1', '2'], type='choice', choices=['0', '1', '2'],
help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'), help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
@ -1378,7 +1588,7 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
action_mapping[action](options.plain is True) action_mapping[action](options.plain is True)
elif action in ('validate', 'diffsettings', 'dbshell'): elif action in ('validate', 'diffsettings', 'dbshell'):
action_mapping[action]() action_mapping[action]()
elif action == 'syncdb': elif action in ('flush', 'syncdb'):
action_mapping[action](int(options.verbosity), options.interactive) action_mapping[action](int(options.verbosity), options.interactive)
elif action == 'inspectdb': elif action == 'inspectdb':
try: try:
@ -1392,11 +1602,16 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
action_mapping[action](args[1]) action_mapping[action](args[1])
except IndexError: except IndexError:
parser.print_usage_and_exit() parser.print_usage_and_exit()
elif action == 'test': elif action in ('test', 'loaddata'):
try: try:
action_mapping[action](args[1:], int(options.verbosity)) action_mapping[action](args[1:], int(options.verbosity))
except IndexError: except IndexError:
parser.print_usage_and_exit() parser.print_usage_and_exit()
elif action == 'dumpdata':
try:
action_mapping[action](args[1:], options.format, options.indent)
except IndexError:
parser.print_usage_and_exit()
elif action in ('startapp', 'startproject'): elif action in ('startapp', 'startproject'):
try: try:
name = args[1] name = args[1]
@ -1415,6 +1630,10 @@ def execute_from_command_line(action_mapping=DEFAULT_ACTION_MAPPING, argv=None):
action_mapping[action](addr, port, options.use_reloader, options.admin_media_path) action_mapping[action](addr, port, options.use_reloader, options.admin_media_path)
elif action == 'runfcgi': elif action == 'runfcgi':
action_mapping[action](args[1:]) action_mapping[action](args[1:])
elif action == 'sqlinitialdata':
print action_mapping[action](args[1:])
elif action == 'sqlflush':
print '\n'.join(action_mapping[action]())
else: else:
from django.db import models from django.db import models
validate(silent_success=True) validate(silent_success=True)

View File

@ -40,6 +40,11 @@ def get_serializer(format):
if not _serializers: if not _serializers:
_load_serializers() _load_serializers()
return _serializers[format].Serializer return _serializers[format].Serializer
def get_serializer_formats():
if not _serializers:
_load_serializers()
return _serializers.keys()
def get_deserializer(format): def get_deserializer(format):
if not _serializers: if not _serializers:

View File

@ -141,7 +141,7 @@ class Deserializer(object):
class DeserializedObject(object): class DeserializedObject(object):
""" """
A deserialzed model. A deserialized model.
Basically a container for holding the pre-saved deserialized data along Basically a container for holding the pre-saved deserialized data along
with the many-to-many data saved with the object. with the many-to-many data saved with the object.

View File

@ -67,20 +67,19 @@ def Deserializer(object_list, **options):
field = Model._meta.get_field(field_name) field = Model._meta.get_field(field_name)
# Handle M2M relations (with in_bulk() for performance) # Handle M2M relations
if field.rel and isinstance(field.rel, models.ManyToManyRel): if field.rel and isinstance(field.rel, models.ManyToManyRel):
pks = [] pks = []
for pk in field_value: for pk in field_value:
if isinstance(pk, unicode): if isinstance(pk, unicode):
pk = pk.encode(options.get("encoding", settings.DEFAULT_CHARSET)) pks.append(pk.encode(options.get("encoding", settings.DEFAULT_CHARSET)))
m2m_data[field.name] = field.rel.to._default_manager.in_bulk(field_value).values() else:
pks.append(pk)
m2m_data[field.name] = pks
# Handle FK fields # Handle FK fields
elif field.rel and isinstance(field.rel, models.ManyToOneRel) and field_value is not None: elif field.rel and isinstance(field.rel, models.ManyToOneRel):
try: data[field.attname] = field_value
data[field.name] = field.rel.to._default_manager.get(pk=field_value)
except field.rel.to.DoesNotExist:
data[field.name] = None
# Handle all other fields # Handle all other fields
else: else:

View File

@ -150,7 +150,7 @@ class Deserializer(base.Deserializer):
if field.rel and isinstance(field.rel, models.ManyToManyRel): if field.rel and isinstance(field.rel, models.ManyToManyRel):
m2m_data[field.name] = self._handle_m2m_field_node(field_node) m2m_data[field.name] = self._handle_m2m_field_node(field_node)
elif field.rel and isinstance(field.rel, models.ManyToOneRel): elif field.rel and isinstance(field.rel, models.ManyToOneRel):
data[field.name] = self._handle_fk_field_node(field_node) data[field.attname] = self._handle_fk_field_node(field_node)
else: else:
value = field.to_python(getInnerText(field_node).strip().encode(self.encoding)) value = field.to_python(getInnerText(field_node).strip().encode(self.encoding))
data[field.name] = value data[field.name] = value
@ -162,27 +162,17 @@ class Deserializer(base.Deserializer):
""" """
Handle a <field> node for a ForeignKey Handle a <field> node for a ForeignKey
""" """
# Try to set the foreign key by looking up the foreign related object.
# If it doesn't exist, set the field to None (which might trigger
# validation error, but that's expected).
RelatedModel = self._get_model_from_node(node, "to")
# Check if there is a child node named 'None', returning None if so. # Check if there is a child node named 'None', returning None if so.
if len(node.childNodes) == 1 and node.childNodes[0].nodeName == 'None': if len(node.childNodes) == 1 and node.childNodes[0].nodeName == 'None':
return None return None
else: else:
return RelatedModel.objects.get(pk=getInnerText(node).strip().encode(self.encoding)) return getInnerText(node).strip().encode(self.encoding)
def _handle_m2m_field_node(self, node): def _handle_m2m_field_node(self, node):
""" """
Handle a <field> node for a ManyToManyField Handle a <field> node for a ManyToManyField
""" """
# Load the related model return [c.getAttribute("pk").encode(self.encoding) for c in node.getElementsByTagName("object")]
RelatedModel = self._get_model_from_node(node, "to")
# Look up all the related objects. Using the in_bulk() lookup ensures
# that missing related objects don't cause an exception
related_ids = [c.getAttribute("pk").encode(self.encoding) for c in node.getElementsByTagName("object")]
return RelatedModel._default_manager.in_bulk(related_ids).values()
def _get_model_from_node(self, node, attr): def _get_model_from_node(self, node, attr):
""" """

View File

@ -16,7 +16,7 @@ class Resolver404(Http404):
class NoReverseMatch(Exception): class NoReverseMatch(Exception):
# Don't make this raise an error when used in a template. # Don't make this raise an error when used in a template.
silent_variable_failure = True silent_variable_failure = True
def get_mod_func(callback): def get_mod_func(callback):
# Converts 'django.views.news.stories.story_detail' to # Converts 'django.views.news.stories.story_detail' to
@ -110,7 +110,7 @@ class RegexURLPattern(object):
kwargs = match.groupdict() kwargs = match.groupdict()
if kwargs: if kwargs:
args = () args = ()
if not kwargs: else:
args = match.groups() args = match.groups()
# In both cases, pass any extra_kwargs as **kwargs. # In both cases, pass any extra_kwargs as **kwargs.
kwargs.update(self.default_args) kwargs.update(self.default_args)

View File

@ -312,11 +312,12 @@ class RequiredIfOtherFieldGiven(RequiredIfOtherFieldsGiven):
RequiredIfOtherFieldsGiven.__init__(self, [other_field_name], error_message) RequiredIfOtherFieldsGiven.__init__(self, [other_field_name], error_message)
class RequiredIfOtherFieldEquals(object): class RequiredIfOtherFieldEquals(object):
def __init__(self, other_field, other_value, error_message=None): def __init__(self, other_field, other_value, error_message=None, other_label=None):
self.other_field = other_field self.other_field = other_field
self.other_value = other_value self.other_value = other_value
other_label = other_label or other_value
self.error_message = error_message or lazy_inter(gettext_lazy("This field must be given if %(field)s is %(value)s"), { self.error_message = error_message or lazy_inter(gettext_lazy("This field must be given if %(field)s is %(value)s"), {
'field': other_field, 'value': other_value}) 'field': other_field, 'value': other_label})
self.always_test = True self.always_test = True
def __call__(self, field_data, all_data): def __call__(self, field_data, all_data):
@ -324,11 +325,12 @@ class RequiredIfOtherFieldEquals(object):
raise ValidationError(self.error_message) raise ValidationError(self.error_message)
class RequiredIfOtherFieldDoesNotEqual(object): class RequiredIfOtherFieldDoesNotEqual(object):
def __init__(self, other_field, other_value, error_message=None): def __init__(self, other_field, other_value, other_label=None, error_message=None):
self.other_field = other_field self.other_field = other_field
self.other_value = other_value self.other_value = other_value
other_label = other_label or other_value
self.error_message = error_message or lazy_inter(gettext_lazy("This field must be given if %(field)s is not %(value)s"), { self.error_message = error_message or lazy_inter(gettext_lazy("This field must be given if %(field)s is not %(value)s"), {
'field': other_field, 'value': other_value}) 'field': other_field, 'value': other_label})
self.always_test = True self.always_test = True
def __call__(self, field_data, all_data): def __call__(self, field_data, all_data):

View File

@ -76,10 +76,11 @@ class DatabaseWrapper(local):
return cursor return cursor
def _commit(self): def _commit(self):
return self.connection.commit() if self.connection is not None:
return self.connection.commit()
def _rollback(self): def _rollback(self):
if self.connection: if self.connection is not None:
return self.connection.rollback() return self.connection.rollback()
def close(self): def close(self):
@ -132,6 +133,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "RAND()" return "RAND()"
def get_deferrable_sql():
return " DEFERRABLE INITIALLY DEFERRED"
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
raise NotImplementedError raise NotImplementedError
@ -147,6 +151,19 @@ def get_max_name_length():
def get_autoinc_sql(table): def get_autoinc_sql(table):
return None return None
def get_sql_flush(sql_styler, full_table_list):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
# Return a list of 'TRUNCATE x;', 'TRUNCATE y;', 'TRUNCATE z;'... style SQL statements
# TODO - SQL not actually tested against ADO MSSQL yet!
# TODO - autoincrement indices reset required? See other get_sql_flush() implementations
sql_list = ['%s %s;' % \
(sql_styler.SQL_KEYWORD('TRUNCATE'),
sql_styler.SQL_FIELD(quote_name(table))
) for table in full_table_list]
OPERATOR_MAPPING = { OPERATOR_MAPPING = {
'exact': '= %s', 'exact': '= %s',
'iexact': 'LIKE %s', 'iexact': 'LIKE %s',

View File

@ -37,6 +37,9 @@ get_date_extract_sql = complain
get_date_trunc_sql = complain get_date_trunc_sql = complain
get_limit_offset_sql = complain get_limit_offset_sql = complain
get_random_function_sql = complain get_random_function_sql = complain
get_deferrable_sql = complain
get_fulltext_search_sql = complain get_fulltext_search_sql = complain
get_drop_foreignkey_sql = complain get_drop_foreignkey_sql = complain
get_sql_flush = complain
OPERATOR_MAPPING = {} OPERATOR_MAPPING = {}

View File

@ -108,10 +108,11 @@ class DatabaseWrapper(local):
return cursor return cursor
def _commit(self): def _commit(self):
self.connection.commit() if self.connection is not None:
self.connection.commit()
def _rollback(self): def _rollback(self):
if self.connection: if self.connection is not None:
try: try:
self.connection.rollback() self.connection.rollback()
except Database.NotSupportedError: except Database.NotSupportedError:
@ -181,6 +182,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "RAND()" return "RAND()"
def get_deferrable_sql():
return ""
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
return 'MATCH (%s) AGAINST (%%s IN BOOLEAN MODE)' % field_name return 'MATCH (%s) AGAINST (%%s IN BOOLEAN MODE)' % field_name
@ -196,6 +200,36 @@ def get_max_name_length():
def get_autoinc_sql(table): def get_autoinc_sql(table):
return None return None
def get_sql_flush(style, tables, sequences):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
# NB: The generated SQL below is specific to MySQL
# 'TRUNCATE x;', 'TRUNCATE y;', 'TRUNCATE z;'... style SQL statements
# to clear all tables of all data
if tables:
sql = ['SET FOREIGN_KEY_CHECKS = 0;'] + \
['%s %s;' % \
(style.SQL_KEYWORD('TRUNCATE'),
style.SQL_FIELD(quote_name(table))
) for table in tables] + \
['SET FOREIGN_KEY_CHECKS = 1;']
# 'ALTER TABLE table AUTO_INCREMENT = 1;'... style SQL statements
# to reset sequence indices
sql.extend(["%s %s %s %s %s;" % \
(style.SQL_KEYWORD('ALTER'),
style.SQL_KEYWORD('TABLE'),
style.SQL_TABLE(quote_name(sequence['table'])),
style.SQL_KEYWORD('AUTO_INCREMENT'),
style.SQL_FIELD('= 1'),
) for sequence in sequences])
return sql
else:
return []
OPERATOR_MAPPING = { OPERATOR_MAPPING = {
'exact': '= %s', 'exact': '= %s',
'iexact': 'LIKE %s', 'iexact': 'LIKE %s',

View File

@ -49,10 +49,15 @@ class DatabaseWrapper(local):
return cursor return cursor
def _commit(self): def _commit(self):
self.connection.commit() if self.connection is not None:
self.connection.commit()
def _rollback(self): def _rollback(self):
self.connection.rollback() if self.connection is not None:
try:
self.connection.rollback()
except Database.NotSupportedError:
pass
def close(self): def close(self):
if self.connection is not None: if self.connection is not None:
@ -140,6 +145,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "DBMS_RANDOM.RANDOM" return "DBMS_RANDOM.RANDOM"
def get_deferrable_sql():
return " DEFERRABLE INITIALLY DEFERRED"
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
raise NotImplementedError raise NotImplementedError
@ -168,6 +176,19 @@ def get_autoinc_sql(table):
END;\n""" % (tr_name, quote_name(table), sq_name) END;\n""" % (tr_name, quote_name(table), sq_name)
return sequence_sql, trigger_sql return sequence_sql, trigger_sql
def get_sql_flush(style, tables, sequences):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
# Return a list of 'TRUNCATE x;', 'TRUNCATE y;', 'TRUNCATE z;'... style SQL statements
# TODO - SQL not actually tested against Oracle yet!
# TODO - autoincrement indices reset required? See other get_sql_flush() implementations
sql = ['%s %s;' % \
(style.SQL_KEYWORD('TRUNCATE'),
style.SQL_FIELD(quote_name(table))
) for table in tables]
OPERATOR_MAPPING = { OPERATOR_MAPPING = {
'exact': '= %s', 'exact': '= %s',
'iexact': "LIKE %s ESCAPE '\\'", 'iexact': "LIKE %s ESCAPE '\\'",

View File

@ -52,6 +52,8 @@ class UnicodeCursorWrapper(object):
else: else:
return getattr(self.cursor, attr) return getattr(self.cursor, attr)
postgres_version = None
class DatabaseWrapper(local): class DatabaseWrapper(local):
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.connection = None self.connection = None
@ -60,7 +62,9 @@ class DatabaseWrapper(local):
def cursor(self): def cursor(self):
from django.conf import settings from django.conf import settings
set_tz = False
if self.connection is None: if self.connection is None:
set_tz = True
if settings.DATABASE_NAME == '': if settings.DATABASE_NAME == '':
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "You need to specify DATABASE_NAME in your Django settings file." raise ImproperlyConfigured, "You need to specify DATABASE_NAME in your Django settings file."
@ -76,17 +80,23 @@ class DatabaseWrapper(local):
self.connection = Database.connect(conn_string, **self.options) self.connection = Database.connect(conn_string, **self.options)
self.connection.set_isolation_level(1) # make transactions transparent to all cursors self.connection.set_isolation_level(1) # make transactions transparent to all cursors
cursor = self.connection.cursor() cursor = self.connection.cursor()
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) if set_tz:
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET) cursor = UnicodeCursorWrapper(cursor, settings.DEFAULT_CHARSET)
global postgres_version
if not postgres_version:
cursor.execute("SELECT version()")
postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
if settings.DEBUG: if settings.DEBUG:
return util.CursorDebugWrapper(cursor, self) return util.CursorDebugWrapper(cursor, self)
return cursor return cursor
def _commit(self): def _commit(self):
return self.connection.commit() if self.connection is not None:
return self.connection.commit()
def _rollback(self): def _rollback(self):
if self.connection: if self.connection is not None:
return self.connection.rollback() return self.connection.rollback()
def close(self): def close(self):
@ -143,6 +153,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "RANDOM()" return "RANDOM()"
def get_deferrable_sql():
return " DEFERRABLE INITIALLY DEFERRED"
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
raise NotImplementedError raise NotImplementedError
@ -158,6 +171,61 @@ def get_max_name_length():
def get_autoinc_sql(table): def get_autoinc_sql(table):
return None return None
def get_sql_flush(style, tables, sequences):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
if tables:
if postgres_version[0] >= 8 and postgres_version[1] >= 1:
# Postgres 8.1+ can do 'TRUNCATE x, y, z...;'. In fact, it *has to* in order to be able to
# truncate tables referenced by a foreign key in any other table. The result is a
# single SQL TRUNCATE statement.
sql = ['%s %s;' % \
(style.SQL_KEYWORD('TRUNCATE'),
style.SQL_FIELD(', '.join([quote_name(table) for table in tables]))
)]
else:
# Older versions of Postgres can't do TRUNCATE in a single call, so they must use
# a simple delete.
sql = ['%s %s %s;' % \
(style.SQL_KEYWORD('DELETE'),
style.SQL_KEYWORD('FROM'),
style.SQL_FIELD(quote_name(table))
) for table in tables]
# 'ALTER SEQUENCE sequence_name RESTART WITH 1;'... style SQL statements
# to reset sequence indices
for sequence_info in sequences:
table_name = sequence_info['table']
column_name = sequence_info['column']
if column_name and len(column_name)>0:
# sequence name in this case will be <table>_<column>_seq
sql.append("%s %s %s %s %s %s;" % \
(style.SQL_KEYWORD('ALTER'),
style.SQL_KEYWORD('SEQUENCE'),
style.SQL_FIELD('%s_%s_seq' % (table_name, column_name)),
style.SQL_KEYWORD('RESTART'),
style.SQL_KEYWORD('WITH'),
style.SQL_FIELD('1')
)
)
else:
# sequence name in this case will be <table>_id_seq
sql.append("%s %s %s %s %s %s;" % \
(style.SQL_KEYWORD('ALTER'),
style.SQL_KEYWORD('SEQUENCE'),
style.SQL_FIELD('%s_id_seq' % table_name),
style.SQL_KEYWORD('RESTART'),
style.SQL_KEYWORD('WITH'),
style.SQL_FIELD('1')
)
)
return sql
else:
return []
# Register these custom typecasts, because Django expects dates/times to be # Register these custom typecasts, because Django expects dates/times to be
# in Python's native (standard-library) datetime/time format, whereas psycopg # in Python's native (standard-library) datetime/time format, whereas psycopg
# use mx.DateTime by default. # use mx.DateTime by default.

View File

@ -20,6 +20,8 @@ except ImportError:
# Import copy of _thread_local.py from Python 2.4 # Import copy of _thread_local.py from Python 2.4
from django.utils._threading_local import local from django.utils._threading_local import local
postgres_version = None
class DatabaseWrapper(local): class DatabaseWrapper(local):
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.connection = None self.connection = None
@ -28,7 +30,9 @@ class DatabaseWrapper(local):
def cursor(self): def cursor(self):
from django.conf import settings from django.conf import settings
set_tz = False
if self.connection is None: if self.connection is None:
set_tz = True
if settings.DATABASE_NAME == '': if settings.DATABASE_NAME == '':
from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured, "You need to specify DATABASE_NAME in your Django settings file." raise ImproperlyConfigured, "You need to specify DATABASE_NAME in your Django settings file."
@ -45,16 +49,22 @@ class DatabaseWrapper(local):
self.connection.set_isolation_level(1) # make transactions transparent to all cursors self.connection.set_isolation_level(1) # make transactions transparent to all cursors
cursor = self.connection.cursor() cursor = self.connection.cursor()
cursor.tzinfo_factory = None cursor.tzinfo_factory = None
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE]) if set_tz:
cursor.execute("SET TIME ZONE %s", [settings.TIME_ZONE])
global postgres_version
if not postgres_version:
cursor.execute("SELECT version()")
postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')]
if settings.DEBUG: if settings.DEBUG:
return util.CursorDebugWrapper(cursor, self) return util.CursorDebugWrapper(cursor, self)
return cursor return cursor
def _commit(self): def _commit(self):
return self.connection.commit() if self.connection is not None:
return self.connection.commit()
def _rollback(self): def _rollback(self):
if self.connection: if self.connection is not None:
return self.connection.rollback() return self.connection.rollback()
def close(self): def close(self):
@ -103,6 +113,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "RANDOM()" return "RANDOM()"
def get_deferrable_sql():
return " DEFERRABLE INITIALLY DEFERRED"
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
raise NotImplementedError raise NotImplementedError
@ -118,6 +131,58 @@ def get_max_name_length():
def get_autoinc_sql(table): def get_autoinc_sql(table):
return None return None
def get_sql_flush(style, tables, sequences):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
if tables:
if postgres_version[0] >= 8 and postgres_version[1] >= 1:
# Postgres 8.1+ can do 'TRUNCATE x, y, z...;'. In fact, it *has to* in order to be able to
# truncate tables referenced by a foreign key in any other table. The result is a
# single SQL TRUNCATE statement
sql = ['%s %s;' % \
(style.SQL_KEYWORD('TRUNCATE'),
style.SQL_FIELD(', '.join([quote_name(table) for table in tables]))
)]
else:
sql = ['%s %s %s;' % \
(style.SQL_KEYWORD('DELETE'),
style.SQL_KEYWORD('FROM'),
style.SQL_FIELD(quote_name(table))
) for table in tables]
# 'ALTER SEQUENCE sequence_name RESTART WITH 1;'... style SQL statements
# to reset sequence indices
for sequence in sequences:
table_name = sequence['table']
column_name = sequence['column']
if column_name and len(column_name) > 0:
# sequence name in this case will be <table>_<column>_seq
sql.append("%s %s %s %s %s %s;" % \
(style.SQL_KEYWORD('ALTER'),
style.SQL_KEYWORD('SEQUENCE'),
style.SQL_FIELD('%s_%s_seq' % (table_name, column_name)),
style.SQL_KEYWORD('RESTART'),
style.SQL_KEYWORD('WITH'),
style.SQL_FIELD('1')
)
)
else:
# sequence name in this case will be <table>_id_seq
sql.append("%s %s %s %s %s %s;" % \
(style.SQL_KEYWORD('ALTER'),
style.SQL_KEYWORD('SEQUENCE'),
style.SQL_FIELD('%s_id_seq' % table_name),
style.SQL_KEYWORD('RESTART'),
style.SQL_KEYWORD('WITH'),
style.SQL_FIELD('1')
)
)
return sql
else:
return []
OPERATOR_MAPPING = { OPERATOR_MAPPING = {
'exact': '= %s', 'exact': '= %s',
'iexact': 'ILIKE %s', 'iexact': 'ILIKE %s',

View File

@ -67,10 +67,11 @@ class DatabaseWrapper(local):
return cursor return cursor
def _commit(self): def _commit(self):
self.connection.commit() if self.connection is not None:
self.connection.commit()
def _rollback(self): def _rollback(self):
if self.connection: if self.connection is not None:
self.connection.rollback() self.connection.rollback()
def close(self): def close(self):
@ -146,6 +147,9 @@ def get_limit_offset_sql(limit, offset=None):
def get_random_function_sql(): def get_random_function_sql():
return "RANDOM()" return "RANDOM()"
def get_deferrable_sql():
return ""
def get_fulltext_search_sql(field_name): def get_fulltext_search_sql(field_name):
raise NotImplementedError raise NotImplementedError
@ -161,6 +165,24 @@ def get_max_name_length():
def get_autoinc_sql(table): def get_autoinc_sql(table):
return None return None
def get_sql_flush(style, tables, sequences):
"""Return a list of SQL statements required to remove all data from
all tables in the database (without actually removing the tables
themselves) and put the database in an empty 'initial' state
"""
# NB: The generated SQL below is specific to SQLite
# Note: The DELETE FROM... SQL generated below works for SQLite databases
# because constraints don't exist
sql = ['%s %s %s;' % \
(style.SQL_KEYWORD('DELETE'),
style.SQL_KEYWORD('FROM'),
style.SQL_FIELD(quote_name(table))
) for table in tables]
# Note: No requirement for reset of auto-incremented indices (cf. other
# get_sql_flush() implementations). Just return SQL at this point
return sql
def _sqlite_date_trunc(lookup_type, dt): def _sqlite_date_trunc(lookup_type, dt):
try: try:
dt = util.typecast_timestamp(dt) dt = util.typecast_timestamp(dt)

View File

@ -50,4 +50,9 @@ class LazyDate(object):
return (datetime.datetime.now() + self.delta).date() return (datetime.datetime.now() + self.delta).date()
def __getattr__(self, attr): def __getattr__(self, attr):
if attr == 'delta':
# To fix ticket #3377. Note that normal accesses to LazyDate.delta
# (after construction) will still work, because they don't go
# through __getattr__). This is mainly needed for unpickling.
raise AttributeError
return getattr(self.__get_value__(), attr) return getattr(self.__get_value__(), attr)

View File

@ -13,6 +13,7 @@ from django.dispatch import dispatcher
from django.utils.datastructures import SortedDict from django.utils.datastructures import SortedDict
from django.utils.functional import curry from django.utils.functional import curry
from django.conf import settings from django.conf import settings
from itertools import izip
import types import types
import sys import sys
import os import os
@ -21,8 +22,8 @@ class ModelBase(type):
"Metaclass for all models" "Metaclass for all models"
def __new__(cls, name, bases, attrs): def __new__(cls, name, bases, attrs):
# If this isn't a subclass of Model, don't do anything special. # If this isn't a subclass of Model, don't do anything special.
if not bases or bases == (object,): if name == 'Model' or not filter(lambda b: issubclass(b, Model), bases):
return type.__new__(cls, name, bases, attrs) return super(ModelBase, cls).__new__(cls, name, bases, attrs)
# Create the class. # Create the class.
new_class = type.__new__(cls, name, bases, {'__module__': attrs.pop('__module__')}) new_class = type.__new__(cls, name, bases, {'__module__': attrs.pop('__module__')})
@ -90,41 +91,74 @@ class Model(object):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
dispatcher.send(signal=signals.pre_init, sender=self.__class__, args=args, kwargs=kwargs) dispatcher.send(signal=signals.pre_init, sender=self.__class__, args=args, kwargs=kwargs)
for f in self._meta.fields:
if isinstance(f.rel, ManyToOneRel): # There is a rather weird disparity here; if kwargs, it's set, then args
try: # overrides it. It should be one or the other; don't duplicate the work
# Assume object instance was passed in. # The reason for the kwargs check is that standard iterator passes in by
rel_obj = kwargs.pop(f.name) # args, and nstantiation for iteration is 33% faster.
except KeyError: args_len = len(args)
if args_len > len(self._meta.fields):
# Daft, but matches old exception sans the err msg.
raise IndexError("Number of args exceeds number of fields")
fields_iter = iter(self._meta.fields)
if not kwargs:
# The ordering of the izip calls matter - izip throws StopIteration
# when an iter throws it. So if the first iter throws it, the second
# is *not* consumed. We rely on this, so don't change the order
# without changing the logic.
for val, field in izip(args, fields_iter):
setattr(self, field.attname, val)
else:
# Slower, kwargs-ready version.
for val, field in izip(args, fields_iter):
setattr(self, field.attname, val)
kwargs.pop(field.name, None)
# Maintain compatibility with existing calls.
if isinstance(field.rel, ManyToOneRel):
kwargs.pop(field.attname, None)
# Now we're left with the unprocessed fields that *must* come from
# keywords, or default.
for field in fields_iter:
if kwargs:
if isinstance(field.rel, ManyToOneRel):
try: try:
# Object instance wasn't passed in -- must be an ID. # Assume object instance was passed in.
val = kwargs.pop(f.attname) rel_obj = kwargs.pop(field.name)
except KeyError: except KeyError:
val = f.get_default()
else:
# Object instance was passed in.
# Special case: You can pass in "None" for related objects if it's allowed.
if rel_obj is None and f.null:
val = None
else:
try: try:
val = getattr(rel_obj, f.rel.get_related_field().attname) # Object instance wasn't passed in -- must be an ID.
except AttributeError: val = kwargs.pop(field.attname)
raise TypeError, "Invalid value: %r should be a %s instance, not a %s" % (f.name, f.rel.to, type(rel_obj)) except KeyError:
setattr(self, f.attname, val) val = field.get_default()
else:
# Object instance was passed in. Special case: You can
# pass in "None" for related objects if it's allowed.
if rel_obj is None and field.null:
val = None
else:
try:
val = getattr(rel_obj, field.rel.get_related_field().attname)
except AttributeError:
raise TypeError("Invalid value: %r should be a %s instance, not a %s" %
(field.name, field.rel.to, type(rel_obj)))
else:
val = kwargs.pop(field.attname, field.get_default())
else: else:
val = kwargs.pop(f.attname, f.get_default()) val = field.get_default()
setattr(self, f.attname, val) setattr(self, field.attname, val)
for prop in kwargs.keys():
try:
if isinstance(getattr(self.__class__, prop), property):
setattr(self, prop, kwargs.pop(prop))
except AttributeError:
pass
if kwargs: if kwargs:
raise TypeError, "'%s' is an invalid keyword argument for this function" % kwargs.keys()[0] for prop in kwargs.keys():
for i, arg in enumerate(args): try:
setattr(self, self._meta.fields[i].attname, arg) if isinstance(getattr(self.__class__, prop), property):
setattr(self, prop, kwargs.pop(prop))
except AttributeError:
pass
if kwargs:
raise TypeError, "'%s' is an invalid keyword argument for this function" % kwargs.keys()[0]
dispatcher.send(signal=signals.post_init, sender=self.__class__, instance=self) dispatcher.send(signal=signals.post_init, sender=self.__class__, instance=self)
def add_to_class(cls, name, value): def add_to_class(cls, name, value):
@ -322,7 +356,7 @@ class Model(object):
def _get_FIELD_size(self, field): def _get_FIELD_size(self, field):
return os.path.getsize(self._get_FIELD_filename(field)) return os.path.getsize(self._get_FIELD_filename(field))
def _save_FIELD_file(self, field, filename, raw_contents): def _save_FIELD_file(self, field, filename, raw_contents, save=True):
directory = field.get_directory_name() directory = field.get_directory_name()
try: # Create the date-based directory if it doesn't exist. try: # Create the date-based directory if it doesn't exist.
os.makedirs(os.path.join(settings.MEDIA_ROOT, directory)) os.makedirs(os.path.join(settings.MEDIA_ROOT, directory))
@ -357,8 +391,9 @@ class Model(object):
if field.height_field: if field.height_field:
setattr(self, field.height_field, height) setattr(self, field.height_field, height)
# Save the object, because it has changed. # Save the object because it has changed unless save is False
self.save() if save:
self.save()
_save_FIELD_file.alters_data = True _save_FIELD_file.alters_data = True

View File

@ -167,7 +167,7 @@ class Field(object):
def get_db_prep_lookup(self, lookup_type, value): def get_db_prep_lookup(self, lookup_type, value):
"Returns field's value prepared for database lookup." "Returns field's value prepared for database lookup."
if lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'year', 'month', 'day', 'search'): if lookup_type in ('exact', 'gt', 'gte', 'lt', 'lte', 'month', 'day', 'search'):
return [value] return [value]
elif lookup_type in ('range', 'in'): elif lookup_type in ('range', 'in'):
return value return value
@ -181,7 +181,13 @@ class Field(object):
return ["%%%s" % prep_for_like_query(value)] return ["%%%s" % prep_for_like_query(value)]
elif lookup_type == 'isnull': elif lookup_type == 'isnull':
return [] return []
raise TypeError, "Field has invalid lookup: %s" % lookup_type elif lookup_type == 'year':
try:
value = int(value)
except ValueError:
raise ValueError("The __year lookup type requires an integer argument")
return ['%s-01-01 00:00:00' % value, '%s-12-31 23:59:59.999999' % value]
raise TypeError("Field has invalid lookup: %s" % lookup_type)
def has_default(self): def has_default(self):
"Returns a boolean of whether this field has a default value." "Returns a boolean of whether this field has a default value."
@ -440,6 +446,8 @@ class DateField(Field):
Field.__init__(self, verbose_name, name, **kwargs) Field.__init__(self, verbose_name, name, **kwargs)
def to_python(self, value): def to_python(self, value):
if value is None:
return value
if isinstance(value, datetime.datetime): if isinstance(value, datetime.datetime):
return value.date() return value.date()
if isinstance(value, datetime.date): if isinstance(value, datetime.date):
@ -508,6 +516,8 @@ class DateField(Field):
class DateTimeField(DateField): class DateTimeField(DateField):
def to_python(self, value): def to_python(self, value):
if value is None:
return value
if isinstance(value, datetime.datetime): if isinstance(value, datetime.datetime):
return value return value
if isinstance(value, datetime.date): if isinstance(value, datetime.date):
@ -645,7 +655,7 @@ class FileField(Field):
setattr(cls, 'get_%s_filename' % self.name, curry(cls._get_FIELD_filename, field=self)) setattr(cls, 'get_%s_filename' % self.name, curry(cls._get_FIELD_filename, field=self))
setattr(cls, 'get_%s_url' % self.name, curry(cls._get_FIELD_url, field=self)) setattr(cls, 'get_%s_url' % self.name, curry(cls._get_FIELD_url, field=self))
setattr(cls, 'get_%s_size' % self.name, curry(cls._get_FIELD_size, field=self)) setattr(cls, 'get_%s_size' % self.name, curry(cls._get_FIELD_size, field=self))
setattr(cls, 'save_%s_file' % self.name, lambda instance, filename, raw_contents: instance._save_FIELD_file(self, filename, raw_contents)) setattr(cls, 'save_%s_file' % self.name, lambda instance, filename, raw_contents, save=True: instance._save_FIELD_file(self, filename, raw_contents, save))
dispatcher.connect(self.delete_file, signal=signals.post_delete, sender=cls) dispatcher.connect(self.delete_file, signal=signals.post_delete, sender=cls)
def delete_file(self, instance): def delete_file(self, instance):
@ -663,14 +673,14 @@ class FileField(Field):
def get_manipulator_field_names(self, name_prefix): def get_manipulator_field_names(self, name_prefix):
return [name_prefix + self.name + '_file', name_prefix + self.name] return [name_prefix + self.name + '_file', name_prefix + self.name]
def save_file(self, new_data, new_object, original_object, change, rel): def save_file(self, new_data, new_object, original_object, change, rel, save=True):
upload_field_name = self.get_manipulator_field_names('')[0] upload_field_name = self.get_manipulator_field_names('')[0]
if new_data.get(upload_field_name, False): if new_data.get(upload_field_name, False):
func = getattr(new_object, 'save_%s_file' % self.name) func = getattr(new_object, 'save_%s_file' % self.name)
if rel: if rel:
func(new_data[upload_field_name][0]["filename"], new_data[upload_field_name][0]["content"]) func(new_data[upload_field_name][0]["filename"], new_data[upload_field_name][0]["content"], save)
else: else:
func(new_data[upload_field_name]["filename"], new_data[upload_field_name]["content"]) func(new_data[upload_field_name]["filename"], new_data[upload_field_name]["content"], save)
def get_directory_name(self): def get_directory_name(self):
return os.path.normpath(datetime.datetime.now().strftime(self.upload_to)) return os.path.normpath(datetime.datetime.now().strftime(self.upload_to))
@ -714,12 +724,12 @@ class ImageField(FileField):
if not self.height_field: if not self.height_field:
setattr(cls, 'get_%s_height' % self.name, curry(cls._get_FIELD_height, field=self)) setattr(cls, 'get_%s_height' % self.name, curry(cls._get_FIELD_height, field=self))
def save_file(self, new_data, new_object, original_object, change, rel): def save_file(self, new_data, new_object, original_object, change, rel, save=True):
FileField.save_file(self, new_data, new_object, original_object, change, rel) FileField.save_file(self, new_data, new_object, original_object, change, rel, save)
# If the image has height and/or width field(s) and they haven't # If the image has height and/or width field(s) and they haven't
# changed, set the width and/or height field(s) back to their original # changed, set the width and/or height field(s) back to their original
# values. # values.
if change and (self.width_field or self.height_field): if change and (self.width_field or self.height_field) and save:
if self.width_field: if self.width_field:
setattr(new_object, self.width_field, getattr(original_object, self.width_field)) setattr(new_object, self.width_field, getattr(original_object, self.width_field))
if self.height_field: if self.height_field:
@ -762,6 +772,12 @@ class PhoneNumberField(IntegerField):
def validate(self, field_data, all_data): def validate(self, field_data, all_data):
validators.isValidPhone(field_data, all_data) validators.isValidPhone(field_data, all_data)
def formfield(self, **kwargs):
from django.contrib.localflavor.usa.forms import USPhoneNumberField
defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs)
return USPhoneNumberField(**defaults)
class PositiveIntegerField(IntegerField): class PositiveIntegerField(IntegerField):
def get_manipulator_field_objs(self): def get_manipulator_field_objs(self):
return [oldforms.PositiveIntegerField] return [oldforms.PositiveIntegerField]

View File

@ -553,9 +553,9 @@ class ForeignKey(RelatedField, Field):
setattr(cls, related.get_accessor_name(), ForeignRelatedObjectsDescriptor(related)) setattr(cls, related.get_accessor_name(), ForeignRelatedObjectsDescriptor(related))
def formfield(self, **kwargs): def formfield(self, **kwargs):
defaults = {'choices': self.get_choices_default(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs) defaults.update(kwargs)
return forms.ChoiceField(**defaults) return forms.ModelChoiceField(**defaults)
class OneToOneField(RelatedField, IntegerField): class OneToOneField(RelatedField, IntegerField):
def __init__(self, to, to_field=None, **kwargs): def __init__(self, to, to_field=None, **kwargs):
@ -619,9 +619,9 @@ class OneToOneField(RelatedField, IntegerField):
cls._meta.one_to_one_field = self cls._meta.one_to_one_field = self
def formfield(self, **kwargs): def formfield(self, **kwargs):
defaults = {'choices': self.get_choices_default(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs) defaults.update(kwargs)
return forms.ChoiceField(**kwargs) return forms.ModelChoiceField(**defaults)
class ManyToManyField(RelatedField, Field): class ManyToManyField(RelatedField, Field):
def __init__(self, to, **kwargs): def __init__(self, to, **kwargs):
@ -742,9 +742,9 @@ class ManyToManyField(RelatedField, Field):
# MultipleChoiceField takes a list of IDs. # MultipleChoiceField takes a list of IDs.
if kwargs.get('initial') is not None: if kwargs.get('initial') is not None:
kwargs['initial'] = [i._get_pk_val() for i in kwargs['initial']] kwargs['initial'] = [i._get_pk_val() for i in kwargs['initial']]
defaults = {'choices': self.get_choices_default(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} defaults = {'queryset' : self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
defaults.update(kwargs) defaults.update(kwargs)
return forms.MultipleChoiceField(**defaults) return forms.ModelMultipleChoiceField(**defaults)
class ManyToOneRel(object): class ManyToOneRel(object):
def __init__(self, to, field_name, num_in_admin=3, min_num_in_admin=None, def __init__(self, to, field_name, num_in_admin=3, min_num_in_admin=None,

View File

@ -96,14 +96,16 @@ class AutomaticManipulator(oldforms.Manipulator):
if self.change: if self.change:
params[self.opts.pk.attname] = self.obj_key params[self.opts.pk.attname] = self.obj_key
# First, save the basic object itself. # First, create the basic object itself.
new_object = self.model(**params) new_object = self.model(**params)
new_object.save()
# Now that the object's been saved, save any uploaded files. # Now that the object's been created, save any uploaded files.
for f in self.opts.fields: for f in self.opts.fields:
if isinstance(f, FileField): if isinstance(f, FileField):
f.save_file(new_data, new_object, self.change and self.original_object or None, self.change, rel=False) f.save_file(new_data, new_object, self.change and self.original_object or None, self.change, rel=False, save=False)
# Now save the object
new_object.save()
# Calculate which primary fields have changed. # Calculate which primary fields have changed.
if self.change: if self.change:

View File

@ -84,6 +84,7 @@ class _QuerySet(object):
self._filters = Q() self._filters = Q()
self._order_by = None # Ordering, e.g. ('date', '-name'). If None, use model's ordering. self._order_by = None # Ordering, e.g. ('date', '-name'). If None, use model's ordering.
self._select_related = False # Whether to fill cache for related objects. self._select_related = False # Whether to fill cache for related objects.
self._max_related_depth = 0 # Maximum "depth" for select_related
self._distinct = False # Whether the query should use SELECT DISTINCT. self._distinct = False # Whether the query should use SELECT DISTINCT.
self._select = {} # Dictionary of attname -> SQL. self._select = {} # Dictionary of attname -> SQL.
self._where = [] # List of extra WHERE clauses to use. self._where = [] # List of extra WHERE clauses to use.
@ -167,17 +168,16 @@ class _QuerySet(object):
def iterator(self): def iterator(self):
"Performs the SELECT database lookup of this QuerySet." "Performs the SELECT database lookup of this QuerySet."
# self._select is a dictionary, and dictionaries' key order is
# undefined, so we convert it to a list of tuples.
extra_select = self._select.items()
cursor = connection.cursor()
try: try:
select, sql, params, full_query = self._get_sql_clause() select, sql, params, full_query = self._get_sql_clause()
except EmptyResultSet: except EmptyResultSet:
raise StopIteration raise StopIteration
# self._select is a dictionary, and dictionaries' key order is
# undefined, so we convert it to a list of tuples.
extra_select = self._select.items()
cursor = connection.cursor()
cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
fill_cache = self._select_related fill_cache = self._select_related
@ -188,7 +188,8 @@ class _QuerySet(object):
raise StopIteration raise StopIteration
for row in rows: for row in rows:
if fill_cache: if fill_cache:
obj, index_end = get_cached_row(self.model, row, 0) obj, index_end = get_cached_row(klass=self.model, row=row,
index_start=0, max_depth=self._max_related_depth)
else: else:
obj = self.model(*row[:index_end]) obj = self.model(*row[:index_end])
for i, k in enumerate(extra_select): for i, k in enumerate(extra_select):
@ -196,12 +197,25 @@ class _QuerySet(object):
yield obj yield obj
def count(self): def count(self):
"Performs a SELECT COUNT() and returns the number of records as an integer." """
Performs a SELECT COUNT() and returns the number of records as an
integer.
If the queryset is already cached (i.e. self._result_cache is set) this
simply returns the length of the cached results set to avoid multiple
SELECT COUNT(*) calls.
"""
if self._result_cache is not None:
return len(self._result_cache)
counter = self._clone() counter = self._clone()
counter._order_by = () counter._order_by = ()
counter._select_related = False
offset = counter._offset
limit = counter._limit
counter._offset = None counter._offset = None
counter._limit = None counter._limit = None
counter._select_related = False
try: try:
select, sql, params, full_query = counter._get_sql_clause() select, sql, params, full_query = counter._get_sql_clause()
@ -215,7 +229,16 @@ class _QuerySet(object):
cursor.execute("SELECT COUNT(DISTINCT(%s))" % id_col + sql, params) cursor.execute("SELECT COUNT(DISTINCT(%s))" % id_col + sql, params)
else: else:
cursor.execute("SELECT COUNT(*)" + sql, params) cursor.execute("SELECT COUNT(*)" + sql, params)
return cursor.fetchone()[0] count = cursor.fetchone()[0]
# Apply any offset and limit constraints manually, since using LIMIT or
# OFFSET in SQL doesn't change the output of COUNT.
if offset:
count = max(0, count - offset)
if limit:
count = min(limit, count)
return count
def get(self, *args, **kwargs): def get(self, *args, **kwargs):
"Performs the SELECT and returns a single object matching the given keyword arguments." "Performs the SELECT and returns a single object matching the given keyword arguments."
@ -374,9 +397,9 @@ class _QuerySet(object):
else: else:
return self._filter_or_exclude(None, **filter_obj) return self._filter_or_exclude(None, **filter_obj)
def select_related(self, true_or_false=True): def select_related(self, true_or_false=True, depth=0):
"Returns a new QuerySet instance with '_select_related' modified." "Returns a new QuerySet instance with '_select_related' modified."
return self._clone(_select_related=true_or_false) return self._clone(_select_related=true_or_false, _max_related_depth=depth)
def order_by(self, *field_names): def order_by(self, *field_names):
"Returns a new QuerySet instance with the ordering changed." "Returns a new QuerySet instance with the ordering changed."
@ -410,6 +433,7 @@ class _QuerySet(object):
c._filters = self._filters c._filters = self._filters
c._order_by = self._order_by c._order_by = self._order_by
c._select_related = self._select_related c._select_related = self._select_related
c._max_related_depth = self._max_related_depth
c._distinct = self._distinct c._distinct = self._distinct
c._select = self._select.copy() c._select = self._select.copy()
c._where = self._where[:] c._where = self._where[:]
@ -463,7 +487,10 @@ class _QuerySet(object):
# Add additional tables and WHERE clauses based on select_related. # Add additional tables and WHERE clauses based on select_related.
if self._select_related: if self._select_related:
fill_table_cache(opts, select, tables, where, opts.db_table, [opts.db_table]) fill_table_cache(opts, select, tables, where,
old_prefix=opts.db_table,
cache_tables_seen=[opts.db_table],
max_depth=self._max_related_depth)
# Add any additional SELECTs. # Add any additional SELECTs.
if self._select: if self._select:
@ -531,11 +558,18 @@ else:
QuerySet = _QuerySet QuerySet = _QuerySet
class ValuesQuerySet(QuerySet): class ValuesQuerySet(QuerySet):
def iterator(self): def __init__(self, *args, **kwargs):
super(ValuesQuerySet, self).__init__(*args, **kwargs)
# select_related and select aren't supported in values(). # select_related and select aren't supported in values().
self._select_related = False self._select_related = False
self._select = {} self._select = {}
def iterator(self):
try:
select, sql, params, full_query = self._get_sql_clause()
except EmptyResultSet:
raise StopIteration
# self._fields is a list of field names to fetch. # self._fields is a list of field names to fetch.
if self._fields: if self._fields:
columns = [self.model._meta.get_field(f, many_to_many=False).column for f in self._fields] columns = [self.model._meta.get_field(f, many_to_many=False).column for f in self._fields]
@ -544,14 +578,8 @@ class ValuesQuerySet(QuerySet):
columns = [f.column for f in self.model._meta.fields] columns = [f.column for f in self.model._meta.fields]
field_names = [f.attname for f in self.model._meta.fields] field_names = [f.attname for f in self.model._meta.fields]
cursor = connection.cursor()
try:
select, sql, params, full_query = self._get_sql_clause()
except EmptyResultSet:
raise StopIteration
select = ['%s.%s' % (backend.quote_name(self.model._meta.db_table), backend.quote_name(c)) for c in columns] select = ['%s.%s' % (backend.quote_name(self.model._meta.db_table), backend.quote_name(c)) for c in columns]
cursor = connection.cursor()
cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params)
while 1: while 1:
rows = cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE) rows = cursor.fetchmany(GET_ITERATOR_CHUNK_SIZE)
@ -608,9 +636,6 @@ class EmptyQuerySet(QuerySet):
super(EmptyQuerySet, self).__init__(model) super(EmptyQuerySet, self).__init__(model)
self._result_cache = [] self._result_cache = []
def iterator(self):
raise StopIteration
def count(self): def count(self):
return 0 return 0
@ -622,6 +647,9 @@ class EmptyQuerySet(QuerySet):
c._result_cache = [] c._result_cache = []
return c return c
def _get_sql_clause(self):
raise EmptyResultSet
class QOperator(object): class QOperator(object):
"Base class for QAnd and QOr" "Base class for QAnd and QOr"
def __init__(self, *args): def __init__(self, *args):
@ -717,9 +745,9 @@ def get_where_clause(lookup_type, table_prefix, field_name, value):
return '%s%s IN (%s)' % (table_prefix, field_name, in_string) return '%s%s IN (%s)' % (table_prefix, field_name, in_string)
else: else:
raise EmptyResultSet raise EmptyResultSet
elif lookup_type == 'range': elif lookup_type in ('range', 'year'):
return '%s%s BETWEEN %%s AND %%s' % (table_prefix, field_name) return '%s%s BETWEEN %%s AND %%s' % (table_prefix, field_name)
elif lookup_type in ('year', 'month', 'day'): elif lookup_type in ('month', 'day'):
return "%s = %%s" % backend.get_date_extract_sql(lookup_type, table_prefix + field_name) return "%s = %%s" % backend.get_date_extract_sql(lookup_type, table_prefix + field_name)
elif lookup_type == 'isnull': elif lookup_type == 'isnull':
return "%s%s IS %sNULL" % (table_prefix, field_name, (not value and 'NOT ' or '')) return "%s%s IS %sNULL" % (table_prefix, field_name, (not value and 'NOT ' or ''))
@ -727,22 +755,33 @@ def get_where_clause(lookup_type, table_prefix, field_name, value):
return backend.get_fulltext_search_sql(table_prefix + field_name) return backend.get_fulltext_search_sql(table_prefix + field_name)
raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type) raise TypeError, "Got invalid lookup_type: %s" % repr(lookup_type)
def get_cached_row(klass, row, index_start): def get_cached_row(klass, row, index_start, max_depth=0, cur_depth=0):
"Helper function that recursively returns an object with cache filled" """Helper function that recursively returns an object with cache filled"""
# If we've got a max_depth set and we've exceeded that depth, bail now.
if max_depth and cur_depth > max_depth:
return None
index_end = index_start + len(klass._meta.fields) index_end = index_start + len(klass._meta.fields)
obj = klass(*row[index_start:index_end]) obj = klass(*row[index_start:index_end])
for f in klass._meta.fields: for f in klass._meta.fields:
if f.rel and not f.null: if f.rel and not f.null:
rel_obj, index_end = get_cached_row(f.rel.to, row, index_end) cached_row = get_cached_row(f.rel.to, row, index_end, max_depth, cur_depth+1)
setattr(obj, f.get_cache_name(), rel_obj) if cached_row:
rel_obj, index_end = cached_row
setattr(obj, f.get_cache_name(), rel_obj)
return obj, index_end return obj, index_end
def fill_table_cache(opts, select, tables, where, old_prefix, cache_tables_seen): def fill_table_cache(opts, select, tables, where, old_prefix, cache_tables_seen, max_depth=0, cur_depth=0):
""" """
Helper function that recursively populates the select, tables and where (in Helper function that recursively populates the select, tables and where (in
place) for select_related queries. place) for select_related queries.
""" """
from django.db.models.fields import AutoField
# If we've got a max_depth set and we've exceeded that depth, bail now.
if max_depth and cur_depth > max_depth:
return None
qn = backend.quote_name qn = backend.quote_name
for f in opts.fields: for f in opts.fields:
if f.rel and not f.null: if f.rel and not f.null:
@ -757,7 +796,7 @@ def fill_table_cache(opts, select, tables, where, old_prefix, cache_tables_seen)
where.append('%s.%s = %s.%s' % \ where.append('%s.%s = %s.%s' % \
(qn(old_prefix), qn(f.column), qn(db_table), qn(f.rel.get_related_field().column))) (qn(old_prefix), qn(f.column), qn(db_table), qn(f.rel.get_related_field().column)))
select.extend(['%s.%s' % (backend.quote_name(db_table), backend.quote_name(f2.column)) for f2 in f.rel.to._meta.fields]) select.extend(['%s.%s' % (backend.quote_name(db_table), backend.quote_name(f2.column)) for f2 in f.rel.to._meta.fields])
fill_table_cache(f.rel.to._meta, select, tables, where, db_table, cache_tables_seen) fill_table_cache(f.rel.to._meta, select, tables, where, db_table, cache_tables_seen, max_depth, cur_depth+1)
def parse_lookup(kwarg_items, opts): def parse_lookup(kwarg_items, opts):
# Helper function that handles converting API kwargs # Helper function that handles converting API kwargs
@ -903,8 +942,14 @@ def lookup_inner(path, lookup_type, value, opts, table, column):
new_opts = field.rel.to._meta new_opts = field.rel.to._meta
new_column = new_opts.pk.column new_column = new_opts.pk.column
join_column = field.column join_column = field.column
raise FieldFound
raise FieldFound elif path:
# For regular fields, if there are still items on the path,
# an error has been made. We munge "name" so that the error
# properly identifies the cause of the problem.
name += LOOKUP_SEPARATOR + path[0]
else:
raise FieldFound
except FieldFound: # Match found, loop has been shortcut. except FieldFound: # Match found, loop has been shortcut.
pass pass

View File

@ -1,7 +1,7 @@
class BoundRelatedObject(object): class BoundRelatedObject(object):
def __init__(self, related_object, field_mapping, original): def __init__(self, related_object, field_mapping, original):
self.relation = related_object self.relation = related_object
self.field_mappings = field_mapping[related_object.opts.module_name] self.field_mappings = field_mapping[related_object.name]
def template_name(self): def template_name(self):
raise NotImplementedError raise NotImplementedError
@ -16,7 +16,7 @@ class RelatedObject(object):
self.opts = model._meta self.opts = model._meta
self.field = field self.field = field
self.edit_inline = field.rel.edit_inline self.edit_inline = field.rel.edit_inline
self.name = self.opts.module_name self.name = '%s_%s' % (self.opts.app_label, self.opts.module_name)
self.var_name = self.opts.object_name.lower() self.var_name = self.opts.object_name.lower()
def flatten_data(self, follow, obj=None): def flatten_data(self, follow, obj=None):
@ -68,7 +68,10 @@ class RelatedObject(object):
# object # object
return [attr] return [attr]
else: else:
return [None] * self.field.rel.num_in_admin if self.field.rel.min_num_in_admin:
return [None] * max(self.field.rel.num_in_admin, self.field.rel.min_num_in_admin)
else:
return [None] * self.field.rel.num_in_admin
def get_db_prep_lookup(self, lookup_type, value): def get_db_prep_lookup(self, lookup_type, value):
# Defer to the actual field definition for db prep # Defer to the actual field definition for db prep
@ -101,12 +104,12 @@ class RelatedObject(object):
attr = getattr(manipulator.original_object, self.get_accessor_name()) attr = getattr(manipulator.original_object, self.get_accessor_name())
count = attr.count() count = attr.count()
count += self.field.rel.num_extra_on_change count += self.field.rel.num_extra_on_change
if self.field.rel.min_num_in_admin:
count = max(count, self.field.rel.min_num_in_admin)
if self.field.rel.max_num_in_admin:
count = min(count, self.field.rel.max_num_in_admin)
else: else:
count = self.field.rel.num_in_admin count = self.field.rel.num_in_admin
if self.field.rel.min_num_in_admin:
count = max(count, self.field.rel.min_num_in_admin)
if self.field.rel.max_num_in_admin:
count = min(count, self.field.rel.max_num_in_admin)
else: else:
count = 1 count = 1

View File

@ -25,7 +25,6 @@ Internal attributes:
deletion, (considerably speeds up the cleanup process deletion, (considerably speeds up the cleanup process
vs. the original code.) vs. the original code.)
""" """
from __future__ import generators
import types, weakref import types, weakref
from django.dispatch import saferef, robustapply, errors from django.dispatch import saferef, robustapply, errors
@ -33,11 +32,6 @@ __author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = "$Id: dispatcher.py,v 1.9 2005/09/17 04:55:57 mcfletch Exp $" __cvsid__ = "$Id: dispatcher.py,v 1.9 2005/09/17 04:55:57 mcfletch Exp $"
__version__ = "$Revision: 1.9 $"[11:-2] __version__ = "$Revision: 1.9 $"[11:-2]
try:
True
except NameError:
True = 1==1
False = 1==0
class _Parameter: class _Parameter:
"""Used to represent default parameter values.""" """Used to represent default parameter values."""
@ -140,10 +134,9 @@ def connect(receiver, signal=Any, sender=Any, weak=True):
if weak: if weak:
receiver = saferef.safeRef(receiver, onDelete=_removeReceiver) receiver = saferef.safeRef(receiver, onDelete=_removeReceiver)
senderkey = id(sender) senderkey = id(sender)
if connections.has_key(senderkey):
signals = connections[senderkey] signals = connections.setdefault(senderkey, {})
else:
connections[senderkey] = signals = {}
# Keep track of senders for cleanup. # Keep track of senders for cleanup.
# Is Anonymous something we want to clean up? # Is Anonymous something we want to clean up?
if sender not in (None, Anonymous, Any): if sender not in (None, Anonymous, Any):
@ -251,10 +244,10 @@ def getReceivers( sender = Any, signal = Any ):
to retrieve the actual receiver objects as an iterable to retrieve the actual receiver objects as an iterable
object. object.
""" """
try: existing = connections.get(id(sender))
return connections[id(sender)][signal] if existing is not None:
except KeyError: return existing.get(signal, [])
return [] return []
def liveReceivers(receivers): def liveReceivers(receivers):
"""Filter sequence of receivers to get resolved, live receivers """Filter sequence of receivers to get resolved, live receivers
@ -278,30 +271,48 @@ def liveReceivers(receivers):
def getAllReceivers( sender = Any, signal = Any ): def getAllReceivers( sender = Any, signal = Any ):
"""Get list of all receivers from global tables """Get list of all receivers from global tables
This gets all receivers which should receive This gets all dereferenced receivers which should receive
the given signal from sender, each receiver should the given signal from sender, each receiver should
be produced only once by the resulting generator be produced only once by the resulting generator
""" """
receivers = {} receivers = {}
for set in ( # Get receivers that receive *this* signal from *this* sender.
# Get receivers that receive *this* signal from *this* sender. # Add receivers that receive *any* signal from *this* sender.
getReceivers( sender, signal ), # Add receivers that receive *this* signal from *any* sender.
# Add receivers that receive *any* signal from *this* sender. # Add receivers that receive *any* signal from *any* sender.
getReceivers( sender, Any ), l = []
# Add receivers that receive *this* signal from *any* sender. i = id(sender)
getReceivers( Any, signal ), if i in connections:
# Add receivers that receive *any* signal from *any* sender. sender_receivers = connections[i]
getReceivers( Any, Any ), if signal in sender_receivers:
): l.extend(sender_receivers[signal])
for receiver in set: if signal is not Any and Any in sender_receivers:
if receiver: # filter out dead instance-method weakrefs l.extend(sender_receivers[Any])
try:
if not receivers.has_key( receiver ): if sender is not Any:
receivers[receiver] = 1 i = id(Any)
yield receiver if i in connections:
except TypeError: sender_receivers = connections[i]
# dead weakrefs raise TypeError on hash... if sender_receivers is not None:
pass if signal in sender_receivers:
l.extend(sender_receivers[signal])
if signal is not Any and Any in sender_receivers:
l.extend(sender_receivers[Any])
for receiver in l:
try:
if not receiver in receivers:
if isinstance(receiver, WEAKREF_TYPES):
receiver = receiver()
# this should only (rough guess) be possible if somehow, deref'ing
# triggered a wipe.
if receiver is None:
continue
receivers[receiver] = 1
yield receiver
except TypeError:
# dead weakrefs raise TypeError on hash...
pass
def send(signal=Any, sender=Anonymous, *arguments, **named): def send(signal=Any, sender=Anonymous, *arguments, **named):
"""Send signal from sender to all connected receivers. """Send signal from sender to all connected receivers.
@ -340,7 +351,7 @@ def send(signal=Any, sender=Anonymous, *arguments, **named):
# Call each receiver with whatever arguments it can accept. # Call each receiver with whatever arguments it can accept.
# Return a list of tuple pairs [(receiver, response), ... ]. # Return a list of tuple pairs [(receiver, response), ... ].
responses = [] responses = []
for receiver in liveReceivers(getAllReceivers(sender, signal)): for receiver in getAllReceivers(sender, signal):
response = robustapply.robustApply( response = robustapply.robustApply(
receiver, receiver,
signal=signal, signal=signal,
@ -350,6 +361,8 @@ def send(signal=Any, sender=Anonymous, *arguments, **named):
) )
responses.append((receiver, response)) responses.append((receiver, response))
return responses return responses
def sendExact( signal=Any, sender=Anonymous, *arguments, **named ): def sendExact( signal=Any, sender=Anonymous, *arguments, **named ):
"""Send signal only to those receivers registered for exact message """Send signal only to those receivers registered for exact message
@ -421,33 +434,18 @@ def _cleanupConnections(senderkey, signal):
def _removeSender(senderkey): def _removeSender(senderkey):
"""Remove senderkey from connections.""" """Remove senderkey from connections."""
_removeBackrefs(senderkey) _removeBackrefs(senderkey)
try:
del connections[senderkey] connections.pop(senderkey, None)
except KeyError: senders.pop(senderkey, None)
pass
# Senderkey will only be in senders dictionary if sender
# could be weakly referenced.
try:
del senders[senderkey]
except:
pass
def _removeBackrefs( senderkey): def _removeBackrefs( senderkey):
"""Remove all back-references to this senderkey""" """Remove all back-references to this senderkey"""
try: for receiver_list in connections.pop(senderkey, {}).values():
signals = connections[senderkey] for receiver in receiver_list:
except KeyError:
signals = None
else:
items = signals.items()
def allReceivers( ):
for signal,set in items:
for item in set:
yield item
for receiver in allReceivers():
_killBackref( receiver, senderkey ) _killBackref( receiver, senderkey )
def _removeOldBackRefs(senderkey, signal, receiver, receivers): def _removeOldBackRefs(senderkey, signal, receiver, receivers):
"""Kill old sendersBack references from receiver """Kill old sendersBack references from receiver
@ -483,13 +481,13 @@ def _removeOldBackRefs(senderkey, signal, receiver, receivers):
def _killBackref( receiver, senderkey ): def _killBackref( receiver, senderkey ):
"""Do the actual removal of back reference from receiver to senderkey""" """Do the actual removal of back reference from receiver to senderkey"""
receiverkey = id(receiver) receiverkey = id(receiver)
set = sendersBack.get( receiverkey, () ) receivers_list = sendersBack.get( receiverkey, () )
while senderkey in set: while senderkey in receivers_list:
try: try:
set.remove( senderkey ) receivers_list.remove( senderkey )
except: except:
break break
if not set: if not receivers_list:
try: try:
del sendersBack[ receiverkey ] del sendersBack[ receiverkey ]
except KeyError: except KeyError:

View File

@ -52,7 +52,7 @@ def parse_file_upload(header_dict, post_data):
POST = MultiValueDict() POST = MultiValueDict()
FILES = MultiValueDict() FILES = MultiValueDict()
for submessage in msg.get_payload(): for submessage in msg.get_payload():
if isinstance(submessage, email.Message.Message): if submessage and isinstance(submessage, email.Message.Message):
name_dict = parse_header(submessage['Content-Disposition'])[1] name_dict = parse_header(submessage['Content-Disposition'])[1]
# name_dict is something like {'name': 'file', 'filename': 'test.txt'} for file uploads # name_dict is something like {'name': 'file', 'filename': 'test.txt'} for file uploads
# or {'name': 'blah'} for POST fields # or {'name': 'blah'} for POST fields
@ -160,7 +160,7 @@ class HttpResponse(object):
self._charset = settings.DEFAULT_CHARSET self._charset = settings.DEFAULT_CHARSET
if not mimetype: if not mimetype:
mimetype = "%s; charset=%s" % (settings.DEFAULT_CONTENT_TYPE, settings.DEFAULT_CHARSET) mimetype = "%s; charset=%s" % (settings.DEFAULT_CONTENT_TYPE, settings.DEFAULT_CHARSET)
if hasattr(content, '__iter__'): if not isinstance(content, basestring) and hasattr(content, '__iter__'):
self._container = content self._container = content
self._is_string = False self._is_string = False
else: else:

View File

@ -51,7 +51,7 @@ class Field(object):
if label is not None: if label is not None:
label = smart_unicode(label) label = smart_unicode(label)
self.required, self.label, self.initial = required, label, initial self.required, self.label, self.initial = required, label, initial
self.help_text = help_text self.help_text = smart_unicode(help_text or '')
widget = widget or self.widget widget = widget or self.widget
if isinstance(widget, type): if isinstance(widget, type):
widget = widget() widget = widget()
@ -339,8 +339,9 @@ class ChoiceField(Field):
def _set_choices(self, value): def _set_choices(self, value):
# Setting choices also sets the choices on the widget. # Setting choices also sets the choices on the widget.
self._choices = value # choices can be any iterable, but we call list() on it because
self.widget.choices = value # it will be consumed more than once.
self._choices = self.widget.choices = list(value)
choices = property(_get_choices, _set_choices) choices = property(_get_choices, _set_choices)
@ -356,7 +357,7 @@ class ChoiceField(Field):
return value return value
valid_values = set([str(k) for k, v in self.choices]) valid_values = set([str(k) for k, v in self.choices])
if value not in valid_values: if value not in valid_values:
raise ValidationError(gettext(u'Select a valid choice. %s is not one of the available choices.') % value) raise ValidationError(gettext(u'Select a valid choice. That choice is not one of the available choices.'))
return value return value
class MultipleChoiceField(ChoiceField): class MultipleChoiceField(ChoiceField):

View File

@ -7,6 +7,7 @@ from django.utils.html import escape
from fields import Field from fields import Field
from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput
from util import flatatt, StrAndUnicode, ErrorDict, ErrorList, ValidationError from util import flatatt, StrAndUnicode, ErrorDict, ErrorList, ValidationError
import copy
__all__ = ('BaseForm', 'Form') __all__ = ('BaseForm', 'Form')
@ -27,13 +28,24 @@ class SortedDictFromList(SortedDict):
dict.__init__(self, dict(data)) dict.__init__(self, dict(data))
def copy(self): def copy(self):
return SortedDictFromList(self.items()) return SortedDictFromList([(k, copy.copy(v)) for k, v in self.items()])
class DeclarativeFieldsMetaclass(type): class DeclarativeFieldsMetaclass(type):
"Metaclass that converts Field attributes to a dictionary called 'base_fields'." """
Metaclass that converts Field attributes to a dictionary called
'base_fields', taking into account parent class 'base_fields' as well.
"""
def __new__(cls, name, bases, attrs): def __new__(cls, name, bases, attrs):
fields = [(field_name, attrs.pop(field_name)) for field_name, obj in attrs.items() if isinstance(obj, Field)] fields = [(field_name, attrs.pop(field_name)) for field_name, obj in attrs.items() if isinstance(obj, Field)]
fields.sort(lambda x, y: cmp(x[1].creation_counter, y[1].creation_counter)) fields.sort(lambda x, y: cmp(x[1].creation_counter, y[1].creation_counter))
# If this class is subclassing another Form, add that Form's fields.
# Note that we loop over the bases in *reverse*. This is necessary in
# order to preserve the correct order of fields.
for base in bases[::-1]:
if hasattr(base, 'base_fields'):
fields = base.base_fields.items() + fields
attrs['base_fields'] = SortedDictFromList(fields) attrs['base_fields'] = SortedDictFromList(fields)
return type.__new__(cls, name, bases, attrs) return type.__new__(cls, name, bases, attrs)
@ -49,6 +61,7 @@ class BaseForm(StrAndUnicode):
self.prefix = prefix self.prefix = prefix
self.initial = initial or {} self.initial = initial or {}
self.__errors = None # Stores the errors after clean() has been called. self.__errors = None # Stores the errors after clean() has been called.
# The base_fields class attribute is the *class-wide* definition of # The base_fields class attribute is the *class-wide* definition of
# fields. Because a particular *instance* of the class might want to # fields. Because a particular *instance* of the class might want to
# alter self.fields, we create self.fields here by copying base_fields. # alter self.fields, we create self.fields here by copying base_fields.
@ -100,7 +113,7 @@ class BaseForm(StrAndUnicode):
output, hidden_fields = [], [] output, hidden_fields = [], []
for name, field in self.fields.items(): for name, field in self.fields.items():
bf = BoundField(self, field, name) bf = BoundField(self, field, name)
bf_errors = bf.errors # Cache in local variable. bf_errors = ErrorList([escape(error) for error in bf.errors]) # Escape and cache in local variable.
if bf.is_hidden: if bf.is_hidden:
if bf_errors: if bf_errors:
top_errors.extend(['(Hidden field %s) %s' % (name, e) for e in bf_errors]) top_errors.extend(['(Hidden field %s) %s' % (name, e) for e in bf_errors])
@ -205,6 +218,7 @@ class BoundField(StrAndUnicode):
self.label = pretty_name(name) self.label = pretty_name(name)
else: else:
self.label = self.field.label self.label = self.field.label
self.help_text = field.help_text or ''
def __unicode__(self): def __unicode__(self):
"Renders this field as an HTML widget." "Renders this field as an HTML widget."

Some files were not shown because too many files have changed in this diff Show More