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

committing to schema-evolution

merge from HEAD



git-svn-id: http://code.djangoproject.com/svn/django/branches/schema-evolution@3937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Derek Anderson 2006-10-26 19:09:51 +00:00
parent 450889c9a6
commit 42851d90da
314 changed files with 16293 additions and 5764 deletions

48
AUTHORS
View File

@ -16,12 +16,23 @@ before Simon departed and currently oversees things with Adrian.
Wilson Miner <http://www.wilsonminer.com/>, who designed Django's admin Wilson Miner <http://www.wilsonminer.com/>, who designed Django's admin
interface, pretty error pages, official Web site (djangoproject.com) and has interface, pretty error pages, official Web site (djangoproject.com) and has
made many other contributions. made many other contributions. He makes us look good.
Malcolm Tredinnick <http://www.pointy-stick.com/blog/>, who has made
significant contributions to all levels of the framework, from its database
layer to template system and documentation.
Georg "Hugo" Bauer <http://hugo.muensterland.org/>, who added Georg "Hugo" Bauer <http://hugo.muensterland.org/>, who added
internationalization support, manages i18n contributions and has made a ton internationalization support, manages i18n contributions and has made a ton
of excellent tweaks, feature additions and bug fixes. of excellent tweaks, feature additions and bug fixes.
Luke Plant <http://lukeplant.me.uk/>, who has contributed many excellent
improvements, including database-level improvements, the CSRF middleware and
unit tests.
Russell Keith-Magee <freakboy@iinet.net.au>, who has contributed many excellent
improvements, including refactoring of the Django ORM code and unit tests.
Robert Wittams <http://robert.wittams.com/>, who majorly refactored the Django Robert Wittams <http://robert.wittams.com/>, who majorly refactored the Django
admin application to allow for easier reuse and has made a ton of excellent admin application to allow for easier reuse and has made a ton of excellent
tweaks, feature additions and bug fixes. tweaks, feature additions and bug fixes.
@ -31,8 +42,10 @@ And here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --
people who have submitted patches, reported bugs, added translations, helped 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
akaihola akaihola
Andreas Andreas
ant9000@netwise.it
David Ascher <http://ascher.ca/> David Ascher <http://ascher.ca/>
Arthur <avandorp@gmail.com> Arthur <avandorp@gmail.com>
Jiri Barton Jiri Barton
@ -49,18 +62,30 @@ answer newbie questions, and generally made Django that much better:
Amit Chakradeo <http://amit.chakradeo.net/> Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW ChaosKCW
Ian Clelland <clelland@gmail.com> Ian Clelland <clelland@gmail.com>
crankycoder@gmail.com
Matt Croydon <http://www.postneo.com/> Matt Croydon <http://www.postneo.com/>
dackze+django@gmail.com
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/> Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
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>
dummy@habmalnefrage.de
Jeremy Dunck <http://dunck.us/> Jeremy Dunck <http://dunck.us/>
Andy Dustman <farcepest@gmail.com>
Clint Ecker Clint Ecker
Enrico <rico.bl@gmail.com>
favo@exoweb.net
gandalf@owca.info gandalf@owca.info
Baishampayan Ghose Baishampayan Ghose
martin.glueck@gmail.com
Simon Greenhill <dev@simon.net.nz>
Espen Grindhaug <http://grindhaug.org/> Espen Grindhaug <http://grindhaug.org/>
Brant Harris Brant Harris
Hawkeye
heckj@mac.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>
@ -70,34 +95,39 @@ answer newbie questions, and generally made Django that much better:
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
Russell Keith-Magee <freakboy@iinet.net.au>
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/>
Cameron Knight (ckknight) Cameron Knight (ckknight)
Meir Kriheli <http://mksoft.co.il/>
Bruce Kroeze <http://coderseye.com/> Bruce Kroeze <http://coderseye.com/>
Joseph Kocherhans Joseph Kocherhans
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/>
Eugene Lazutkin <http://lazutkin.com/blog/> Eugene Lazutkin <http://lazutkin.com/blog/>
Jeong-Min Lee
Christopher Lenz <http://www.cmlenz.net/> Christopher Lenz <http://www.cmlenz.net/>
lerouxb@gmail.com
limodou limodou
mattmcc
Martin Maney <http://www.chipy.org/Martin_Maney> Martin Maney <http://www.chipy.org/Martin_Maney>
Manuzhai Manuzhai
Petar Marić Petar Marić
mark@junklight.com mark@junklight.com
mattycakes@gmail.com mattycakes@gmail.com
Jason McBrayer <http://www.carcosa.net/jason/> Jason McBrayer <http://www.carcosa.net/jason/>
mccutchen@gmail.com
michael.mcewan@gmail.com michael.mcewan@gmail.com
mir@noris.de
mmarshall mmarshall
Eric Moritz <http://eric.themoritzfamily.com/> Eric Moritz <http://eric.themoritzfamily.com/>
Robin Munn <http://www.geekforgod.com/> Robin Munn <http://www.geekforgod.com/>
Nebojša Dorđević Nebojša Dorđević
Fraser Nevett <mail@nevett.org>
Sam Newman <http://www.magpiebrain.com/> Sam Newman <http://www.magpiebrain.com/>
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>
pgross@thoughtworks.com pgross@thoughtworks.com
phaedo <http://phaedo.cx/> phaedo <http://phaedo.cx/>
phil@produxion.net phil@produxion.net
@ -106,25 +136,35 @@ answer newbie questions, and generally made Django that much better:
plisk plisk
Daniel Poelzleithner <http://poelzi.org/> Daniel Poelzleithner <http://poelzi.org/>
J. Rademaker J. Rademaker
Michael Radziej <mir@noris.de>
ramiro
Brian Ray <http://brianray.chipy.org/> Brian Ray <http://brianray.chipy.org/>
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
serbaut@gmail.com
Pete Shinners <pete@shinners.org>
SmileyChris <smileychris@gmail.com>
sopel sopel
Thomas Steinacher <tom@eggdrop.ch>
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>
Tom Tobin Tom Tobin
Tom Insam Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/> Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
Malcolm Tredinnick Karen Tracey <graybark@bellsouth.net>
Amit Upadhyay Amit Upadhyay
Geert Vanderkelen Geert Vanderkelen
Milton Waddams Milton Waddams
Dan Watson <http://theidioteque.net/>
Rachel Willmer <http://www.willmer.com/kb/> Rachel Willmer <http://www.willmer.com/kb/>
Gary Wilson <gary.wilson@gmail.com>
wojtek wojtek
ye7cakf02@sneakemail.com ye7cakf02@sneakemail.com
ymasuda@ethercube.com
Cheng Zhang Cheng Zhang
A big THANK YOU goes to: A big THANK YOU goes to:

19
INSTALL
View File

@ -1,7 +1,22 @@
Thanks for downloading Django. Thanks for downloading Django.
To install it, make sure you have Python 2.3 or greater installed. Then run this command: To install it, make sure you have Python 2.3 or greater installed. Then run
this command from the command prompt:
python setup.py install python setup.py install
Note this requires a working Internet connection if you don't already have the
Python utility "setuptools" installed.
AS AN ALTERNATIVE, you can just copy the entire "django" directory to Python's
site-packages directory, which is located wherever your Python installation
lives. Some places you might check are:
/usr/lib/python2.4/site-packages (Unix, Python 2.4)
/usr/lib/python2.3/site-packages (Unix, Python 2.3)
C:\\PYTHON\site-packages (Windows)
This second solution does not require a working Internet connection; it
bypasses "setuptools" entirely.
For more detailed instructions, see docs/install.txt. For more detailed instructions, see docs/install.txt.

8
MANIFEST.in Normal file
View File

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

4
README
View File

@ -25,10 +25,10 @@ http://code.djangoproject.com/newticket
To get more help: To get more help:
* Join the #django channel on irc.freenode.net. Lots of helpful people * Join the #django channel on irc.freenode.net. Lots of helpful people
hang out there. Read the archives at http://loglibrary.com/179 . hang out there. Read the archives at http://simon.bofh.ms/logger/django/ .
* Join the django-users mailing list, or read the archives, at * Join the django-users mailing list, or read the archives, at
http://groups-beta.google.com/group/django-users. http://groups.google.com/group/django-users.
To contribute to Django: To contribute to Django:

View File

@ -1 +1 @@
VERSION = (0, 95, 'post-magic-removal') VERSION = (0, 96, 'pre')

View File

@ -2,7 +2,6 @@
import os import os
import sys import sys
import getopt
def compile_messages(): def compile_messages():
basedir = None basedir = None
@ -12,15 +11,25 @@ def compile_messages():
elif os.path.isdir('locale'): elif os.path.isdir('locale'):
basedir = os.path.abspath('locale') basedir = os.path.abspath('locale')
else: else:
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)
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'):
sys.stderr.write('processing file %s in %s\n' % (f, dirpath)) sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
pf = os.path.splitext(os.path.join(dirpath, f))[0] pf = os.path.splitext(os.path.join(dirpath, f))[0]
cmd = 'msgfmt -o "%s.mo" "%s.po"' % (pf, pf) # Store the names of the .mo and .po files in an environment
# variable, rather than doing a string replacement into the
# command, so that we can take advantage of shell quoting, to
# quote any malicious characters/escaping.
# See http://cyberelk.net/tim/articles/cmdline/ar01s02.html
os.environ['djangocompilemo'] = pf + '.mo'
os.environ['djangocompilepo'] = pf + '.po'
if sys.platform == 'win32': # Different shell-variable syntax
cmd = 'msgfmt -o "%djangocompilemo%" "%djangocompilepo%"'
else:
cmd = 'msgfmt -o "$djangocompilemo" "$djangocompilepo"'
os.system(cmd) os.system(cmd)
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1,16 +1,17 @@
"Daily cleanup file" """
Daily cleanup job.
Can be run as a cronjob to clean out old data from the database (only expired
sessions at the moment).
"""
from django.db import backend, connection, transaction from django.db import backend, connection, transaction
DOCUMENTATION_DIRECTORY = '/home/html/documentation/'
def clean_up(): def clean_up():
# Clean up old database records # Clean up old database records
cursor = connection.cursor() cursor = connection.cursor()
cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \ cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \
(backend.quote_name('core_sessions'), backend.quote_name('expire_date'))) (backend.quote_name('django_session'), backend.quote_name('expire_date')))
cursor.execute("DELETE FROM %s WHERE %s < NOW() - INTERVAL '1 week'" % \
(backend.quote_name('registration_challenges'), backend.quote_name('request_date')))
transaction.commit_unless_managed() transaction.commit_unless_managed()
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1,5 +1,9 @@
#!/usr/bin/env python #!/usr/bin/env python
# Need to ensure that the i18n framework is enabled
from django.conf import settings
settings.configure(USE_I18N = True)
from django.utils.translation import templatize from django.utils.translation import templatize
import re import re
import os import os

View File

@ -7,7 +7,6 @@ a list of all possible variables.
""" """
import os import os
import sys
from django.conf import global_settings from django.conf import global_settings
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE" ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"

View File

@ -46,6 +46,7 @@ LANGUAGES = (
('en', gettext_noop('English')), ('en', gettext_noop('English')),
('es', gettext_noop('Spanish')), ('es', gettext_noop('Spanish')),
('es_AR', gettext_noop('Argentinean Spanish')), ('es_AR', gettext_noop('Argentinean Spanish')),
('fi', gettext_noop('Finnish')),
('fr', gettext_noop('French')), ('fr', gettext_noop('French')),
('gl', gettext_noop('Galician')), ('gl', gettext_noop('Galician')),
('hu', gettext_noop('Hungarian')), ('hu', gettext_noop('Hungarian')),
@ -55,6 +56,7 @@ LANGUAGES = (
('ja', gettext_noop('Japanese')), ('ja', gettext_noop('Japanese')),
('nl', gettext_noop('Dutch')), ('nl', gettext_noop('Dutch')),
('no', gettext_noop('Norwegian')), ('no', gettext_noop('Norwegian')),
('pl', gettext_noop('Polish')),
('pt-br', gettext_noop('Brazilian')), ('pt-br', gettext_noop('Brazilian')),
('ro', gettext_noop('Romanian')), ('ro', gettext_noop('Romanian')),
('ru', gettext_noop('Russian')), ('ru', gettext_noop('Russian')),
@ -62,6 +64,8 @@ LANGUAGES = (
('sl', gettext_noop('Slovenian')), ('sl', gettext_noop('Slovenian')),
('sr', gettext_noop('Serbian')), ('sr', gettext_noop('Serbian')),
('sv', gettext_noop('Swedish')), ('sv', gettext_noop('Swedish')),
('ta', gettext_noop('Tamil')),
('tr', gettext_noop('Turkish')),
('uk', gettext_noop('Ukrainian')), ('uk', gettext_noop('Ukrainian')),
('zh-cn', gettext_noop('Simplified Chinese')), ('zh-cn', gettext_noop('Simplified Chinese')),
('zh-tw', gettext_noop('Traditional Chinese')), ('zh-tw', gettext_noop('Traditional Chinese')),
@ -220,10 +224,6 @@ YEAR_MONTH_FORMAT = 'F Y'
# http://www.djangoproject.com/documentation/templates/#now # http://www.djangoproject.com/documentation/templates/#now
MONTH_DAY_FORMAT = 'F j' MONTH_DAY_FORMAT = 'F j'
# Whether to enable Psyco, which optimizes Python code. Requires Psyco.
# http://psyco.sourceforge.net/
ENABLE_PSYCO = False
# Do you want to manage transactions manually? # Do you want to manage transactions manually?
# Hint: you really don't! # Hint: you really don't!
TRANSACTIONS_MANAGED = False TRANSACTIONS_MANAGED = False
@ -251,6 +251,7 @@ MIDDLEWARE_CLASSES = (
SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want. SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want.
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks). SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks).
SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie. SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie.
SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only).
SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request. SESSION_SAVE_EVERY_REQUEST = False # Whether to save the session data on every request.
SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether sessions expire when a user closes his browser. SESSION_EXPIRE_AT_BROWSER_CLOSE = False # Whether sessions expire when a user closes his browser.
@ -269,6 +270,10 @@ CACHE_MIDDLEWARE_KEY_PREFIX = ''
COMMENTS_ALLOW_PROFANITIES = False COMMENTS_ALLOW_PROFANITIES = False
# The profanities that will trigger a validation error in the
# 'hasNoProfanities' validator. All of these should be in lowercase.
PROFANITIES_LIST = ('asshat', 'asshead', 'asshole', 'cunt', 'fuck', 'gook', 'nigger', 'shit')
# The group ID that designates which users are banned. # The group ID that designates which users are banned.
# Set to None if you're not using it. # Set to None if you're not using it.
COMMENTS_BANNED_USERS_GROUP = None COMMENTS_BANNED_USERS_GROUP = None
@ -294,3 +299,14 @@ BANNED_IPS = ()
################## ##################
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',) AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
###########
# TESTING #
###########
# The name of the method to use to invoke the test suite
TEST_RUNNER = 'django.test.simple.run_tests'
# The name of the database to use for testing purposes.
# If None, a name of 'test_' + DATABASE_NAME will be assumed
TEST_DATABASE_NAME = None

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,110 @@
# 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: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2005-12-09 11:51+0100\n"
"PO-Revision-Date: 2006-08-05 15:27+0300\n"
"Last-Translator: Antti Kaihola <akaihola@ambitone.com>\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 "Mahdolliset %s"
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "Valitse kaikki"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "Lisää uusi"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "Poista"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "Valitut %s"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr "Valitse vasemmalta ja napsauta "
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "Tyhjennä kaikki"
#: 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 ""
"Tammikuu Helmikuu Maaliskuu Huhtikuu Toukokuu Kesäkuu Heinäkuu Elokuu "
"Syyskuu Lokakuu Marraskuu Joulukuu"
#: contrib/admin/media/js/dateparse.js:27
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Sunnuntai Maanantai Tiistai Keskiviikko Torstai Perjantai Lauantai"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "S M T K T P L"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now"
msgstr "Nyt"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48
msgid "Clock"
msgstr "Kello"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
msgid "Choose a time"
msgstr "Valitse kellonaika"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Midnight"
msgstr "24"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m."
msgstr "06"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon"
msgstr "12"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
msgid "Cancel"
msgstr "Peruuta"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
msgid "Today"
msgstr "Tänään"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114
msgid "Calendar"
msgstr "Kalenteri"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160
msgid "Yesterday"
msgstr "Eilen"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow"
msgstr "Huomenna"

File diff suppressed because it is too large Load Diff

View File

@ -2,13 +2,13 @@
# 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.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Django 1.0\n" "Project-Id-Version: Django 1.0\n"
"Report-Msgid-Bugs-To: Django-users Japan <django-ja@googlegroups.com>\n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-05-02 23:06+0900\n" "POT-Creation-Date: 2006-10-06 00:30+0900\n"
"PO-Revision-Date: 2006-05-08 13:39+0900\n" "PO-Revision-Date: 2006-05-08 13:39+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"
@ -61,50 +61,58 @@ msgstr "選択してクリック"
msgid "Clear all" msgid "Clear all"
msgstr "全てクリア" msgstr "全てクリア"
#: 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 "表示"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "非表示"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now" msgid "Now"
msgstr "現在" msgstr "現在"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock" msgid "Clock"
msgstr "時計" msgstr "時計"
#: 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 "時間を選択" msgstr "時間を選択"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight" msgid "Midnight"
msgstr "夜中" msgstr "夜中"
#: 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 時" msgstr "午前 6 時"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon" msgid "Noon"
msgstr "正午" msgstr "正午"
#: 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 "キャンセル" msgstr "キャンセル"
#: 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 "今日" msgstr "今日"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar" msgid "Calendar"
msgstr "カレンダー" msgstr "カレンダー"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday" msgid "Yesterday"
msgstr "昨日" msgstr "昨日"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow" msgid "Tomorrow"
msgstr "明日" msgstr "明日"

View File

@ -264,7 +264,7 @@ msgstr "Bare POST er tillatt"
#: contrib/comments/views/comments.py:193 #: contrib/comments/views/comments.py:193
#: contrib/comments/views/comments.py:284 #: contrib/comments/views/comments.py:284
msgid "One or more of the required fields wasn't submitted" msgid "One or more of the required fields wasn't submitted"
msgstr "En eller flere av feltene som er krevd ble ikke sendt." msgstr "En eller flere av feltene som er krevd ble ikke sendt."
#: contrib/comments/views/comments.py:197 #: contrib/comments/views/comments.py:197
#: contrib/comments/views/comments.py:286 #: contrib/comments/views/comments.py:286
@ -371,35 +371,32 @@ msgid "All"
msgstr "Alle" msgstr "Alle"
#: contrib/admin/filterspecs.py:109 #: contrib/admin/filterspecs.py:109
#, fuzzy
msgid "Any date" msgid "Any date"
msgstr "Alle datoer" msgstr "Når som helst"
#: contrib/admin/filterspecs.py:110 #: contrib/admin/filterspecs.py:110
#, fuzzy
msgid "Today" msgid "Today"
msgstr "Mondag" msgstr "I dag"
#: contrib/admin/filterspecs.py:113 #: contrib/admin/filterspecs.py:113
msgid "Past 7 days" msgid "Past 7 days"
msgstr "" msgstr "Siste 7 dager"
#: contrib/admin/filterspecs.py:115 #: contrib/admin/filterspecs.py:115
msgid "This month" msgid "This month"
msgstr "" msgstr "Denne måneden"
#: contrib/admin/filterspecs.py:117 #: contrib/admin/filterspecs.py:117
msgid "This year" msgid "This year"
msgstr "" msgstr "I år"
#: contrib/admin/filterspecs.py:143 #: contrib/admin/filterspecs.py:143
msgid "Yes" msgid "Yes"
msgstr "" msgstr "Ja"
#: contrib/admin/filterspecs.py:143 #: contrib/admin/filterspecs.py:143
#, fuzzy
msgid "No" msgid "No"
msgstr "Nov." msgstr "Nei"
#: contrib/admin/filterspecs.py:150 #: contrib/admin/filterspecs.py:150
msgid "Unknown" msgid "Unknown"
@ -443,11 +440,13 @@ 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."
msgstr "" msgstr ""
"Vær snill å angi korrekt brukernavn og passord. La merke til at små og "
"store bokstaver er betraktet ulik."
#: 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
msgid "Log in" msgid "Log in"
msgstr "Log inn" msgstr "Logg inn"
#: contrib/admin/views/decorators.py:61 #: contrib/admin/views/decorators.py:61
msgid "" msgid ""
@ -473,12 +472,11 @@ msgstr "Brukernavnet kan ikke inneholde '@'"
#: 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 "Epost adressen din er ikke brukernavnet ditt, prøv '%s' i stede." msgstr "E-post adressen din er ikke brukernavnet ditt, prøv '%s' i stede."
#: contrib/admin/views/main.py:226 #: contrib/admin/views/main.py:226
#, fuzzy
msgid "Site administration" msgid "Site administration"
msgstr "Django administrasjon" msgstr "Nettsted administrasjon"
#: contrib/admin/views/main.py:260 #: contrib/admin/views/main.py:260
#, python-format #, python-format
@ -502,7 +500,7 @@ msgstr "Ny %s"
#: contrib/admin/views/main.py:336 #: contrib/admin/views/main.py:336
#, python-format #, python-format
msgid "Added %s." msgid "Added %s."
msgstr "La til %s" msgstr "Lagt til %s"
#: contrib/admin/views/main.py:336 contrib/admin/views/main.py:338 #: contrib/admin/views/main.py:336 contrib/admin/views/main.py:338
#: contrib/admin/views/main.py:340 #: contrib/admin/views/main.py:340
@ -559,7 +557,7 @@ msgid "Are you sure?"
msgstr "Er du sikker?" msgstr "Er du sikker?"
#: contrib/admin/views/main.py:533 #: contrib/admin/views/main.py:533
#, fuzzy, python-format #, python-format
msgid "Change history: %s" msgid "Change history: %s"
msgstr "Endre historien: %s" msgstr "Endre historien: %s"
@ -580,7 +578,6 @@ msgid "Integer"
msgstr "Heltall" msgstr "Heltall"
#: contrib/admin/views/doc.py:278 #: contrib/admin/views/doc.py:278
#, fuzzy
msgid "Boolean (Either True or False)" msgid "Boolean (Either True or False)"
msgstr "Boolean (Enten \"True\" eller \"False\")" msgstr "Boolean (Enten \"True\" eller \"False\")"
@ -603,7 +600,7 @@ msgstr "Dato/tid"
#: contrib/admin/views/doc.py:283 #: contrib/admin/views/doc.py:283
msgid "E-mail address" msgid "E-mail address"
msgstr "Epost adresse" msgstr "E-post adresse"
#: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287 #: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287
msgid "File path" msgid "File path"
@ -614,13 +611,12 @@ msgid "Decimal number"
msgstr "Desimal tall" msgstr "Desimal tall"
#: contrib/admin/views/doc.py:291 #: contrib/admin/views/doc.py:291
#, fuzzy
msgid "Boolean (Either True, False or None)" msgid "Boolean (Either True, False or None)"
msgstr "Boolean (enten \"True\", \"False\" eller \"None\")" msgstr "Boolean (enten \"True\", \"False\" eller \"None\")"
#: contrib/admin/views/doc.py:292 #: contrib/admin/views/doc.py:292
msgid "Relation to parent model" msgid "Relation to parent model"
msgstr "" msgstr "Relasjon til forelder modell"
#: contrib/admin/views/doc.py:293 #: contrib/admin/views/doc.py:293
msgid "Phone number" msgid "Phone number"
@ -636,7 +632,7 @@ msgstr "Tid"
#: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7 #: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7
msgid "URL" msgid "URL"
msgstr "Internettadresse" msgstr "URL"
#: contrib/admin/views/doc.py:301 #: contrib/admin/views/doc.py:301
msgid "U.S. state (two uppercase letters)" msgid "U.S. state (two uppercase letters)"
@ -756,12 +752,12 @@ msgstr "Fant ikke siden"
#: 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 "Beklager, men siden du spør etter finnest ikke." msgstr "Beklager, men siden du spør etter finnes ikke."
#: contrib/admin/templates/admin/index.html:17 #: contrib/admin/templates/admin/index.html:17
#, python-format #, python-format
msgid "Models available in the %(name)s application." msgid "Models available in the %(name)s application."
msgstr "" msgstr "Modeller fra applikasjonen %(name)s."
#: contrib/admin/templates/admin/index.html:28 #: contrib/admin/templates/admin/index.html:28
#: contrib/admin/templates/admin/change_form.html:15 #: contrib/admin/templates/admin/change_form.html:15
@ -813,7 +809,7 @@ msgid ""
"objects, but your account doesn't have permission to delete the following " "objects, but your account doesn't have permission to delete the following "
"types of objects:" "types of objects:"
msgstr "" msgstr ""
"Vist du sletter %(object_name)s '%(object)s' vill du også slette relaterte " "Hivs du sletter %(object_name)s '%(object)s' vil du også slette relaterte "
"objekter, men du har ikke tillatelse til å slette de følgende objektene:" "objekter, men du har ikke tillatelse til å slette de følgende objektene:"
#: contrib/admin/templates/admin/delete_confirmation.html:21 #: contrib/admin/templates/admin/delete_confirmation.html:21
@ -836,11 +832,11 @@ msgstr "Av %(title)s "
#: contrib/admin/templates/admin/search_form.html:8 #: contrib/admin/templates/admin/search_form.html:8
msgid "Go" msgid "Go"
msgstr "" msgstr ""
#: contrib/admin/templates/admin/change_form.html:21 #: contrib/admin/templates/admin/change_form.html:21
msgid "View on site" msgid "View on site"
msgstr "Vis på siden" msgstr "Vis på nettsted"
#: contrib/admin/templates/admin/change_form.html:30 #: contrib/admin/templates/admin/change_form.html:30
msgid "Please correct the error below." msgid "Please correct the error below."
@ -900,12 +896,12 @@ msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll reset " "Forgotten your password? Enter your e-mail address below, and we'll reset "
"your password and e-mail the new one to you." "your password and e-mail the new one to you."
msgstr "" msgstr ""
"Har du glemt passordet ditt? Skriv inn epost adressen din under, så sender " "Har du glemt passordet ditt? Skriv inn e-post adressen din under, så sender "
"vi deg et nytt passord via epost." "vi deg et nytt passord via e-post."
#: 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 "Epost adresse:" msgstr "E-post adresse:"
#: 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"
@ -917,7 +913,7 @@ msgstr "Takk for å bruke tid på internett siden i dag."
#: contrib/admin/templates/registration/logged_out.html:10 #: contrib/admin/templates/registration/logged_out.html:10
msgid "Log in again" msgid "Log in again"
msgstr "Log inn igjen" msgstr "Logg inn igjen"
#: 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
@ -929,7 +925,7 @@ msgid ""
"We've e-mailed a new password to the e-mail address you submitted. You " "We've e-mailed a new password to the e-mail address you submitted. You "
"should be receiving it shortly." "should be receiving it shortly."
msgstr "" msgstr ""
"Vi sender deg et nytt passord til epost adressen du oppgav. Du villmotta det " "Vi sender deg et nytt passord til e-post adressen du oppgav. Du villmotta det "
"snart." "snart."
#: contrib/admin/templates/registration/password_change_form.html:12 #: contrib/admin/templates/registration/password_change_form.html:12
@ -959,7 +955,7 @@ msgstr "Endre passord"
#: 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 "" msgstr ""
"Du har mottatt denne epost-en fordi du ba om å tilbakestille passordet ditt" "Du har mottatt denne e-posten fordi du ba om å tilbakestille passordet ditt"
#: contrib/admin/templates/registration/password_reset_email.html:3 #: contrib/admin/templates/registration/password_reset_email.html:3
#, python-format #, python-format
@ -1036,10 +1032,9 @@ msgid "Edit this object (current window)"
msgstr "Endre dette objektet (åpnes i dette vinduet)" msgstr "Endre dette objektet (åpnes i dette vinduet)"
#: contrib/admin/templates/admin_doc/bookmarklets.html:26 #: contrib/admin/templates/admin_doc/bookmarklets.html:26
#, fuzzy
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."
msgstr "" msgstr ""
"Hopp til administrasjonsiden for siden som representerer et enkelt objekt." "Hopp til administrasjonsiden for sidene som representerer et enkelt objekt."
#: contrib/admin/templates/admin_doc/bookmarklets.html:28 #: contrib/admin/templates/admin_doc/bookmarklets.html:28
msgid "Edit this object (new window)" msgid "Edit this object (new window)"
@ -1051,21 +1046,19 @@ msgstr "Samme som over, men åpner administrasjonsiden i et nytt vindu."
#: contrib/admin/templates/widget/date_time.html:3 #: contrib/admin/templates/widget/date_time.html:3
msgid "Date:" msgid "Date:"
msgstr "" msgstr "Dato:"
#: contrib/admin/templates/widget/date_time.html:4 #: contrib/admin/templates/widget/date_time.html:4
#, fuzzy
msgid "Time:" msgid "Time:"
msgstr "Tid" msgstr "Tid:"
#: contrib/admin/templates/widget/file.html:2 #: contrib/admin/templates/widget/file.html:2
msgid "Currently:" msgid "Currently:"
msgstr "" msgstr "Nå:"
#: contrib/admin/templates/widget/file.html:3 #: contrib/admin/templates/widget/file.html:3
#, fuzzy
msgid "Change:" msgid "Change:"
msgstr "Endre" msgstr "Endre:"
#: contrib/redirects/models.py:7 #: contrib/redirects/models.py:7
msgid "redirect from" msgid "redirect from"
@ -1126,7 +1119,7 @@ msgid ""
"Example: 'flatpages/contact_page'. If this isn't provided, the system will " "Example: 'flatpages/contact_page'. If this isn't provided, the system will "
"use 'flatpages/default'." "use 'flatpages/default'."
msgstr "" msgstr ""
"Eksempel: 'flatfiler/kontakt_side'. Vist denne ikke denne er gitt, vill " "Eksempel: 'flatfiler/kontakt_side'. Hvis denne ikke denne er gitt, vill "
"'flatfiles/default' bli brukt." "'flatfiles/default' bli brukt."
#: contrib/flatpages/models.py:14 #: contrib/flatpages/models.py:14
@ -1136,7 +1129,7 @@ msgstr "registrering kreves"
#: 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 "" msgstr ""
"Vist denne er krysset av er det bare brukere som er logget inn som kan se " "Hvis denne er krysset av er det bare brukere som er logget inn som kan se "
"siden." "siden."
#: contrib/flatpages/models.py:18 #: contrib/flatpages/models.py:18
@ -1156,24 +1149,20 @@ msgid "codename"
msgstr "kodenavn" msgstr "kodenavn"
#: contrib/auth/models.py:17 #: contrib/auth/models.py:17
#, fuzzy
msgid "permission" msgid "permission"
msgstr "Rettighet" msgstr "rettighet"
#: contrib/auth/models.py:18 contrib/auth/models.py:27 #: contrib/auth/models.py:18 contrib/auth/models.py:27
#, fuzzy
msgid "permissions" msgid "permissions"
msgstr "Rettigheter" msgstr "rettigheter"
#: contrib/auth/models.py:29 #: contrib/auth/models.py:29
#, fuzzy
msgid "group" msgid "group"
msgstr "Gruppe" msgstr "gruppe"
#: contrib/auth/models.py:30 contrib/auth/models.py:65 #: contrib/auth/models.py:30 contrib/auth/models.py:65
#, fuzzy
msgid "groups" msgid "groups"
msgstr "Grupper" msgstr "grupper"
#: contrib/auth/models.py:55 #: contrib/auth/models.py:55
msgid "username" msgid "username"
@ -1205,7 +1194,7 @@ msgstr "administrasjons status"
#: contrib/auth/models.py:60 #: contrib/auth/models.py:60
msgid "Designates whether the user can log into this admin site." msgid "Designates whether the user can log into this admin site."
msgstr "Bestemmer om brukeren kan logge inn på denne administrasjons siden." msgstr "Bestemmer om brukeren kan logge inn på dette administrasjons sted."
#: contrib/auth/models.py:61 #: contrib/auth/models.py:61
msgid "active" msgid "active"
@ -1217,7 +1206,7 @@ msgstr "super bruker"
#: contrib/auth/models.py:63 #: contrib/auth/models.py:63
msgid "last login" msgid "last login"
msgstr "liste logg inn" msgstr "siste logg inn"
#: contrib/auth/models.py:64 #: contrib/auth/models.py:64
msgid "date joined" msgid "date joined"
@ -1232,19 +1221,16 @@ msgstr ""
"tilgang til gruppene han/hun er i." "tilgang til gruppene han/hun er i."
#: contrib/auth/models.py:67 #: contrib/auth/models.py:67
#, fuzzy
msgid "user permissions" msgid "user permissions"
msgstr "Rettigheter" msgstr "Rettigheter"
#: contrib/auth/models.py:70 #: contrib/auth/models.py:70
#, fuzzy
msgid "user" msgid "user"
msgstr "Bruker" msgstr "bruker"
#: contrib/auth/models.py:71 #: contrib/auth/models.py:71
#, fuzzy
msgid "users" msgid "users"
msgstr "Brukere" msgstr "brukere"
#: contrib/auth/models.py:76 #: contrib/auth/models.py:76
msgid "Personal info" msgid "Personal info"
@ -1263,9 +1249,8 @@ msgid "Groups"
msgstr "Grupper" msgstr "Grupper"
#: contrib/auth/models.py:219 #: contrib/auth/models.py:219
#, fuzzy
msgid "message" msgid "message"
msgstr "Meldinger" msgstr "Melding"
#: contrib/auth/forms.py:30 #: contrib/auth/forms.py:30
msgid "" msgid ""
@ -1274,9 +1259,8 @@ msgid ""
msgstr "" msgstr ""
#: contrib/contenttypes/models.py:25 #: contrib/contenttypes/models.py:25
#, fuzzy
msgid "python model class name" msgid "python model class name"
msgstr "python modul navn" msgstr "python modell klasse navn"
#: contrib/contenttypes/models.py:28 #: contrib/contenttypes/models.py:28
msgid "content type" msgid "content type"
@ -1312,23 +1296,23 @@ msgstr "domene navn"
#: contrib/sites/models.py:11 #: contrib/sites/models.py:11
msgid "display name" msgid "display name"
msgstr "vist navn" msgstr "vise navn"
#: contrib/sites/models.py:15 #: contrib/sites/models.py:15
msgid "site" msgid "site"
msgstr "side" msgstr "nettsted"
#: contrib/sites/models.py:16 #: contrib/sites/models.py:16
msgid "sites" msgid "sites"
msgstr "sider" msgstr "nettsteder"
#: utils/translation.py:360 #: utils/translation.py:360
msgid "DATE_FORMAT" msgid "DATE_FORMAT"
msgstr "j. M U" msgstr "j. M Y"
#: utils/translation.py:361 #: utils/translation.py:361
msgid "DATETIME_FORMAT" msgid "DATETIME_FORMAT"
msgstr "j. M U - h:i" msgstr "j. M Y - h:i"
#: utils/translation.py:362 #: utils/translation.py:362
msgid "TIME_FORMAT" msgid "TIME_FORMAT"
@ -1336,7 +1320,7 @@ msgstr "h:i"
#: utils/dates.py:6 #: utils/dates.py:6
msgid "Monday" msgid "Monday"
msgstr "Mondag" msgstr "Mandag"
#: utils/dates.py:6 #: utils/dates.py:6
msgid "Tuesday" msgid "Tuesday"
@ -1411,54 +1395,52 @@ msgid "December"
msgstr "Desember" msgstr "Desember"
#: utils/dates.py:19 #: utils/dates.py:19
#, fuzzy
msgid "jan" msgid "jan"
msgstr "og" msgstr "jan"
#: utils/dates.py:19 #: utils/dates.py:19
msgid "feb" msgid "feb"
msgstr "" msgstr "feb"
#: utils/dates.py:19 #: utils/dates.py:19
msgid "mar" msgid "mar"
msgstr "" msgstr "mar"
#: utils/dates.py:19 #: utils/dates.py:19
msgid "apr" msgid "apr"
msgstr "" msgstr "apr"
#: utils/dates.py:19 #: utils/dates.py:19
#, fuzzy
msgid "may" msgid "may"
msgstr "Mai" msgstr "mai"
#: utils/dates.py:19 #: utils/dates.py:19
msgid "jun" msgid "jun"
msgstr "" msgstr "jun"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "jul" msgid "jul"
msgstr "" msgstr "jul"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "aug" msgid "aug"
msgstr "" msgstr "aug"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "sep" msgid "sep"
msgstr "" msgstr "sep"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "oct" msgid "oct"
msgstr "" msgstr "okt"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "nov" msgid "nov"
msgstr "" msgstr "nov"
#: utils/dates.py:20 #: utils/dates.py:20
msgid "dec" msgid "dec"
msgstr "" msgstr "des"
#: utils/dates.py:27 #: utils/dates.py:27
msgid "Jan." msgid "Jan."
@ -1466,7 +1448,7 @@ msgstr "Jan."
#: utils/dates.py:27 #: utils/dates.py:27
msgid "Feb." msgid "Feb."
msgstr "Fef." msgstr "Feb."
#: utils/dates.py:28 #: utils/dates.py:28
msgid "Aug." msgid "Aug."
@ -1491,40 +1473,38 @@ msgstr "Des."
#: utils/timesince.py:12 #: utils/timesince.py:12
msgid "year" msgid "year"
msgid_plural "years" msgid_plural "years"
msgstr[0] "" msgstr[0] "år"
msgstr[1] "" msgstr[1] "år"
#: utils/timesince.py:13 #: utils/timesince.py:13
msgid "month" msgid "month"
msgid_plural "months" msgid_plural "months"
msgstr[0] "" msgstr[0] "måned"
msgstr[1] "" msgstr[1] "måndeder"
#: utils/timesince.py:14 #: utils/timesince.py:14
msgid "week" msgid "week"
msgid_plural "weeks" msgid_plural "weeks"
msgstr[0] "" msgstr[0] "uke"
msgstr[1] "" msgstr[1] "uker"
#: utils/timesince.py:15 #: utils/timesince.py:15
#, fuzzy
msgid "day" msgid "day"
msgid_plural "days" msgid_plural "days"
msgstr[0] "Mai" msgstr[0] "dag"
msgstr[1] "Mai" msgstr[1] "dager"
#: utils/timesince.py:16 #: utils/timesince.py:16
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "" msgstr[0] "time"
msgstr[1] "" msgstr[1] "timer"
#: utils/timesince.py:17 #: utils/timesince.py:17
#, fuzzy
msgid "minute" msgid "minute"
msgid_plural "minutes" msgid_plural "minutes"
msgstr[0] "side" msgstr[0] "minutt"
msgstr[1] "side" msgstr[1] "minutter"
#: conf/global_settings.py:37 #: conf/global_settings.py:37
msgid "Bengali" msgid "Bengali"
@ -1548,7 +1528,7 @@ msgstr "Tysk"
#: conf/global_settings.py:42 #: conf/global_settings.py:42
msgid "Greek" msgid "Greek"
msgstr "" msgstr "Gresk"
#: conf/global_settings.py:43 #: conf/global_settings.py:43
msgid "English" msgid "English"
@ -1568,11 +1548,11 @@ msgstr "Galisisk"
#: conf/global_settings.py:47 #: conf/global_settings.py:47
msgid "Hungarian" msgid "Hungarian"
msgstr "" msgstr "Ungarsk"
#: conf/global_settings.py:48 #: conf/global_settings.py:48
msgid "Hebrew" msgid "Hebrew"
msgstr "" msgstr "Hebraiske"
#: conf/global_settings.py:49 #: conf/global_settings.py:49
msgid "Icelandic" msgid "Icelandic"
@ -1584,11 +1564,11 @@ msgstr "Italiensk"
#: conf/global_settings.py:51 #: conf/global_settings.py:51
msgid "Japanese" msgid "Japanese"
msgstr "" msgstr "Japansk"
#: conf/global_settings.py:52 #: conf/global_settings.py:52
msgid "Dutch" msgid "Dutch"
msgstr "" msgstr "Nederlandsk"
#: conf/global_settings.py:53 #: conf/global_settings.py:53
msgid "Norwegian" msgid "Norwegian"
@ -1600,7 +1580,7 @@ msgstr "Brasiliansk"
#: conf/global_settings.py:55 #: conf/global_settings.py:55
msgid "Romanian" msgid "Romanian"
msgstr "Romansk" msgstr "Rumensk"
#: conf/global_settings.py:56 #: conf/global_settings.py:56
msgid "Russian" msgid "Russian"
@ -1611,9 +1591,8 @@ msgid "Slovak"
msgstr "Slovakisk" msgstr "Slovakisk"
#: conf/global_settings.py:58 #: conf/global_settings.py:58
#, fuzzy
msgid "Slovenian" msgid "Slovenian"
msgstr "Slovakisk" msgstr "Slovensk"
#: conf/global_settings.py:59 #: conf/global_settings.py:59
msgid "Serbian" msgid "Serbian"
@ -1624,9 +1603,8 @@ msgid "Swedish"
msgstr "Svensk" msgstr "Svensk"
#: conf/global_settings.py:61 #: conf/global_settings.py:61
#, fuzzy
msgid "Ukrainian" msgid "Ukrainian"
msgstr "Brasiliansk" msgstr "Ukrainsk"
#: conf/global_settings.py:62 #: conf/global_settings.py:62
msgid "Simplified Chinese" msgid "Simplified Chinese"
@ -1634,14 +1612,13 @@ msgstr "Simplifisert Kinesisk"
#: conf/global_settings.py:63 #: conf/global_settings.py:63
msgid "Traditional Chinese" msgid "Traditional Chinese"
msgstr "" msgstr "Tradisjonell Kinesisk"
#: 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 "Dette feltet må bare inneholde bokstaver, nummer og understreker." msgstr "Dette feltet må bare inneholde bokstaver, nummer og understreker."
#: core/validators.py:64 #: core/validators.py:64
#, fuzzy
msgid "" msgid ""
"This value must contain only letters, numbers, underscores, dashes or " "This value must contain only letters, numbers, underscores, dashes or "
"slashes." "slashes."
@ -1651,7 +1628,7 @@ msgstr ""
#: core/validators.py:72 #: core/validators.py:72
msgid "Uppercase letters are not allowed here." msgid "Uppercase letters are not allowed here."
msgstr "Tor skrift er ikke tillatt her." msgstr "Stor bokstaver er ikke tillatt her."
#: core/validators.py:76 #: core/validators.py:76
msgid "Lowercase letters are not allowed here." msgid "Lowercase letters are not allowed here."
@ -1687,19 +1664,19 @@ msgstr "Skriv inn et helt nummer."
#: core/validators.py:120 #: core/validators.py:120
msgid "Only alphabetical characters are allowed here." msgid "Only alphabetical characters are allowed here."
msgstr "Bare alfabetiske bokstaber er tillatt her." msgstr "Bare alfabetiske bokstaver er tillatt her."
#: 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."
msgstr "Skriv inn en dato i ÅÅÅÅ-MM-DD formatet." msgstr "Skriv inn en dato i ÅÅÅÅ-MM-DD format."
#: core/validators.py:128 #: core/validators.py:128
msgid "Enter a valid time in HH:MM format." msgid "Enter a valid time in HH:MM format."
msgstr "Skriv inn tiden i TT:MM formatet." msgstr "Skriv inn tiden i TT:MM format."
#: core/validators.py:132 db/models/fields/__init__.py:468 #: core/validators.py:132 db/models/fields/__init__.py:468
msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format." msgid "Enter a valid date/time in YYYY-MM-DD HH:MM format."
msgstr "Skriv inn dato og tid i ÅÅÅÅ-MM-DD TT:MM formatet." msgstr "Skriv inn dato og tid i ÅÅÅÅ-MM-DD TT:MM format."
#: core/validators.py:136 #: core/validators.py:136
msgid "Enter a valid e-mail address." msgid "Enter a valid e-mail address."
@ -1722,7 +1699,7 @@ msgstr "Internettadressen %s peker ikke til et godkjent bilde."
#, 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 "" msgstr ""
"Telefon nummeret må være i XXX-XXX-XXXX formatet. \"%s\" er ikke godkjent." "Telefon nummeret må være i XXX-XXX-XXXX format. \"%s\" er ikke godkjent."
#: core/validators.py:167 #: core/validators.py:167
#, python-format #, python-format
@ -1731,7 +1708,7 @@ msgstr "Internettadressen %s peker ikke til en godkjent QuickTime film."
#: core/validators.py:171 #: core/validators.py:171
msgid "A valid URL is required." msgid "A valid URL is required."
msgstr "En godkjent internettadresse er påbudt." msgstr "En godkjent internettadresse er påkrevd."
#: core/validators.py:185 #: core/validators.py:185
#, python-format #, python-format
@ -1739,7 +1716,7 @@ msgid ""
"Valid HTML is required. Specific errors are:\n" "Valid HTML is required. Specific errors are:\n"
"%s" "%s"
msgstr "" msgstr ""
"Godkjent HTML er påbudt. Feilene var:\n" "Godkjent HTML er påkrevd. Feilene var:\n"
"%s" "%s"
#: core/validators.py:192 #: core/validators.py:192
@ -1750,7 +1727,7 @@ msgstr "Ikke godkjent XML: %s"
#: core/validators.py:202 #: core/validators.py:202
#, python-format #, python-format
msgid "Invalid URL: %s" msgid "Invalid URL: %s"
msgstr "Ikke godkjent internettadresse: %s" msgstr "Ikke godkjent URL: %s"
#: core/validators.py:206 core/validators.py:208 #: core/validators.py:206 core/validators.py:208
#, python-format #, python-format
@ -1759,7 +1736,7 @@ msgstr "Internettadresse fører til en side som ikke virker."
#: core/validators.py:214 #: core/validators.py:214
msgid "Enter a valid U.S. state abbreviation." msgid "Enter a valid U.S. state abbreviation."
msgstr "Skriv inn en godkjent amerikansk stats forkortelse." msgstr "Skriv inn en godkjent amerikansk delstat forkortelse."
#: core/validators.py:229 #: core/validators.py:229
#, python-format #, python-format
@ -1771,7 +1748,7 @@ msgstr[1] "Pass munnen din! Ordene %s er ikke tillatt her."
#: core/validators.py:236 #: core/validators.py:236
#, python-format #, python-format
msgid "This field must match the '%s' field." msgid "This field must match the '%s' field."
msgstr "Dette felte må være det samme som i '%s' feltet." msgstr "Dette feltet må være det samme som i '%s' feltet."
#: 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."
@ -1784,12 +1761,12 @@ msgstr "Vennligst skriv inn noe i begge felta, eller la dem stå blanke."
#: 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 "Dette feltet må bare brukes vist %(field)s er lik %(value)s" msgstr "Dette feltet må bare brukes hvis %(field)s er lik %(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 "Dette feltet må bare brukes vist %(field)s ikke er lik %(value)s" msgstr "Dette feltet må bare brukes hvis %(field)s ikke er lik %(value)s"
#: core/validators.py:313 #: core/validators.py:313
msgid "Duplicate values are not allowed." msgid "Duplicate values are not allowed."
@ -1824,13 +1801,13 @@ msgstr[1] "Skriv inn et desimal tall med maksimum %s tall bak komma. "
#, 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 "" msgstr ""
"Er du sikker på at fila du prøver å laste opp er minimum %s bytes stor?" "Vær sikker på at fila du prøver å laste opp er minimum %s bytes stor."
#: 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 "" msgstr ""
"Er du sikker på at fila du prøver å laste opp er maksimum %s bytes stor?" "Vær sikker på at fila du prøver å laste opp er maksimum %s bytes stor."
#: core/validators.py:376 #: core/validators.py:376
msgid "The format for this field is wrong." msgid "The format for this field is wrong."
@ -1850,7 +1827,7 @@ msgstr "Klarte ikke å motta noe fra %s."
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 ""
"Tnternettadressen %(url)s returnerte en ikke godkjent Content-Type '%" "Internettadressen %(url)s returnerte en ikke godkjent Content-Type '%"
"(contenttype)s'." "(contenttype)s'."
#: core/validators.py:462 #: core/validators.py:462
@ -1859,7 +1836,7 @@ 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 "
"\"%(start)s\".)" "\"%(start)s\".)"
msgstr "" msgstr ""
"Vennligst lukk taggen %(tag)s på linje %(line)s. (Linja starer med \"%(start)" "Vennligst lukk taggen %(tag)s på linje %(line)s. (Linjen starer med \"%(start)"
"s\".)" "s\".)"
#: core/validators.py:466 #: core/validators.py:466
@ -1868,7 +1845,7 @@ 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 "
"starts with \"%(start)s\".)" "starts with \"%(start)s\".)"
msgstr "" msgstr ""
"Noe av teksten som starter på linje %(line)s er ikke tillatt. (Linja starter " "Noe av teksten som starter på linje %(line)s er ikke tillatt. (Linjen starter "
"med \"%(start)s\".)" "med \"%(start)s\".)"
#: core/validators.py:471 #: core/validators.py:471
@ -1877,7 +1854,7 @@ 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 \"%"
"(start)s\".)" "(start)s\".)"
msgstr "" msgstr ""
"\"%(attr)s\" på linje %(line)s er ikke en godkjent tillegg. (Linja starter " "\"%(attr)s\" på linje %(line)s er ikke en godkjent tillegg. (Linjen starter "
"med \"%(start)s\".)" "med \"%(start)s\".)"
#: core/validators.py:476 #: core/validators.py:476
@ -1886,7 +1863,7 @@ 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 \"%"
"(start)s\".)" "(start)s\".)"
msgstr "" msgstr ""
"\"<%(tag)s>\" på linje %(line)s er ikke en godkjent tag. (linja starter med " "\"<%(tag)s>\" på linje %(line)s er ikke en godkjent tag. (linjen starter med "
"\"%(start)s\".)" "\"%(start)s\".)"
#: core/validators.py:480 #: core/validators.py:480
@ -1895,7 +1872,7 @@ 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 "
"starts with \"%(start)s\".)" "starts with \"%(start)s\".)"
msgstr "" msgstr ""
"En tag på linje %(line)s mangler en av de påbydte tillegga. (linja starter " "En tag på linje %(line)s mangler en av de påkrevde attributtene. (linjen starter "
"med \"%(start)s\".)" "med \"%(start)s\".)"
#: core/validators.py:485 #: core/validators.py:485
@ -1904,13 +1881,13 @@ 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 "
"starts with \"%(start)s\".)" "starts with \"%(start)s\".)"
msgstr "" msgstr ""
"\"%(attr)s\" tillegg på linje $(line)s har en ikke godkjent verdi. (Linja " "\"%(attr)s\" tillegg på linje $(line)s har en ikke godkjent verdi. (Linjen "
"starter med \"%(start)s\".)" "starter med \"%(start)s\".)"
#: db/models/manipulators.py:302 #: db/models/manipulators.py:302
#, fuzzy, python-format #, python-format
msgid "%(object)s with this %(type)s already exists for the given %(field)s." msgid "%(object)s with this %(type)s already exists for the given %(field)s."
msgstr "$(optname)s med %(fieldname)s finnes allerede." msgstr "%(object)s med %(type)s finnes allerede for angitt %(field)s."
#: db/models/fields/__init__.py:40 #: db/models/fields/__init__.py:40
#, python-format #, python-format
@ -1924,37 +1901,31 @@ msgid "This field is required."
msgstr "Dette feltet er påkrevd." msgstr "Dette feltet er påkrevd."
#: db/models/fields/__init__.py:337 #: db/models/fields/__init__.py:337
#, fuzzy
msgid "This value must be an integer." msgid "This value must be an integer."
msgstr "Denne verdien må være 'power' av %s." msgstr "Denne verdien må være et heltall."
#: db/models/fields/__init__.py:369 #: db/models/fields/__init__.py:369
#, fuzzy
msgid "This value must be either True or False." msgid "This value must be either True or False."
msgstr "Denne verdien må være 'power' av %s." msgstr "Denne verdien må være enten \"True\" eller \"False\"."
#: db/models/fields/__init__.py:385 #: db/models/fields/__init__.py:385
#, fuzzy
msgid "This field cannot be null." msgid "This field cannot be null."
msgstr "Dette feltet er feil." msgstr "Dette feltet kan ikke være null/tom."
#: db/models/fields/__init__.py:562 #: db/models/fields/__init__.py:562
#, fuzzy
msgid "Enter a valid filename." msgid "Enter a valid filename."
msgstr "Skriv inn en godkjent e-post adresse." msgstr "Skriv inn et godkjent fil navn."
#: db/models/fields/related.py:43 #: db/models/fields/related.py:43
#, fuzzy, python-format #, python-format
msgid "Please enter a valid %s." msgid "Please enter a valid %s."
msgstr "Vennligst skriv inn en godkjent IP adresse." msgstr "Vennligst skriv inn en/et gyldig %s."
#: db/models/fields/related.py:579 #: db/models/fields/related.py:579
#, fuzzy
msgid "Separate multiple IDs with commas." msgid "Separate multiple IDs with commas."
msgstr "Separer Id-ene med kommaer." msgstr "Separer Id-ene med kommaer."
#: db/models/fields/related.py:581 #: db/models/fields/related.py:581
#, fuzzy
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 ""
@ -1965,14 +1936,14 @@ msgstr ""
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 ""
"Please enter valid %(self)s IDs. The values %(value)r are invalid." "Please enter valid %(self)s IDs. The values %(value)r are invalid."
msgstr[0] "" msgstr[0] "Skriv inn gyldige %(self)s ID-er. Verdien %(value)r er ikke gyldig."
msgstr[1] "" msgstr[1] "Skriv inn gyldige %(self)s ID-er. Verdiene %(value)r er ikke gyldige."
#: forms/__init__.py:380 #: forms/__init__.py:380
#, fuzzy, 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] "Sjekk at teksten er kortere enn %s bokstaver" msgstr[0] "Sjekk at teksten er kortere enn %s bokstav"
msgstr[1] "Sjekk at teksten er kortere enn %s bokstaver" msgstr[1] "Sjekk at teksten er kortere enn %s bokstaver"
#: forms/__init__.py:385 #: forms/__init__.py:385
@ -1982,7 +1953,7 @@ msgstr "Det er ikke tillatt med flere linjer her."
#: forms/__init__.py:480 forms/__init__.py:551 forms/__init__.py:589 #: forms/__init__.py:480 forms/__init__.py:551 forms/__init__.py:589
#, python-format #, 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 "Velg et av valga; '%(data)s' er ikke i %(choices)s." msgstr "Velg et gyldig valg; '%(data)s' er ikke i %(choices)s."
#: forms/__init__.py:645 #: forms/__init__.py:645
msgid "The submitted file is empty." msgid "The submitted file is empty."
@ -2002,7 +1973,7 @@ msgstr "Skriv inn et heltall mellom 0 og 32767."
#: template/defaultfilters.py:379 #: template/defaultfilters.py:379
msgid "yes,no,maybe" msgid "yes,no,maybe"
msgstr "" msgstr "ja,nei,kanskje"
#, fuzzy #, fuzzy
#~ msgid "Comments" #~ msgid "Comments"

View File

@ -61,6 +61,15 @@ msgstr "Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag"
msgid "S M T W T F S" msgid "S M T W T F S"
msgstr "S M T O T F L" msgstr "S M T O T F L"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "Vis"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "Skjul"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now" msgid "Now"
@ -80,7 +89,7 @@ msgstr "24.00"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m." msgid "6 a.m."
msgstr "18.00" msgstr "06.00"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon" msgid "Noon"

View File

@ -126,12 +126,10 @@ msgid "approved by staff"
msgstr "zaakceptowano" msgstr "zaakceptowano"
#: contrib/comments/models.py:176 #: contrib/comments/models.py:176
#, fuzzy
msgid "free comment" msgid "free comment"
msgstr "wolny komentarz" msgstr "wolny komentarz"
#: contrib/comments/models.py:177 #: contrib/comments/models.py:177
#, fuzzy
msgid "free comments" msgid "free comments"
msgstr "wolne komentarze" msgstr "wolne komentarze"
@ -144,7 +142,6 @@ msgid "score date"
msgstr "data przyznania punktów" msgstr "data przyznania punktów"
#: contrib/comments/models.py:237 #: contrib/comments/models.py:237
#, fuzzy
msgid "karma score" msgid "karma score"
msgstr "ilość punktów" msgstr "ilość punktów"
@ -243,6 +240,9 @@ msgid ""
"\n" "\n"
"%(text)s" "%(text)s"
msgstr "" msgstr ""
"Ten komentarze został dodany przez użytkownika::\n"
"\n"
"%(text)s"
#: contrib/comments/views/comments.py:189 #: contrib/comments/views/comments.py:189
#: contrib/comments/views/comments.py:280 #: contrib/comments/views/comments.py:280
@ -257,19 +257,20 @@ msgstr "Jedno lub więcej wymaganych pól nie zostało wypełnionych"
#: contrib/comments/views/comments.py:197 #: contrib/comments/views/comments.py:197
#: contrib/comments/views/comments.py:286 #: contrib/comments/views/comments.py:286
msgid "Somebody tampered with the comment form (security violation)" msgid "Somebody tampered with the comment form (security violation)"
msgstr "" msgstr "Ktoś próbował obejść zabezpieczenia formularza komentarzy"
#: contrib/comments/views/comments.py:207 #: contrib/comments/views/comments.py:207
#: contrib/comments/views/comments.py:292 #: contrib/comments/views/comments.py:292
msgid "" msgid ""
"The comment form had an invalid 'target' parameter -- the object ID was " "The comment form had an invalid 'target' parameter -- the object ID was "
"invalid" "invalid"
msgstr "" msgstr "Formularz komentarza miał niepoprawny parametr 'target' -- ID obiektu było "
"niepoprawne"
#: contrib/comments/views/comments.py:257 #: contrib/comments/views/comments.py:257
#: contrib/comments/views/comments.py:321 #: contrib/comments/views/comments.py:321
msgid "The comment form didn't provide either 'preview' or 'post'" msgid "The comment form didn't provide either 'preview' or 'post'"
msgstr "" msgstr "Formularz komentarza nie zapewnił obiektów 'preview' ani 'post'"
#: contrib/comments/templates/comments/form.html:6 #: contrib/comments/templates/comments/form.html:6
#: contrib/comments/templates/comments/form.html:8 #: contrib/comments/templates/comments/form.html:8
@ -600,7 +601,7 @@ msgstr "Wartość logiczna (True, False, None - prawda, fałsz lub nic)"
#: contrib/admin/views/doc.py:292 #: contrib/admin/views/doc.py:292
msgid "Relation to parent model" msgid "Relation to parent model"
msgstr "" msgstr "Relacja do modelu rodzica"
#: contrib/admin/views/doc.py:293 #: contrib/admin/views/doc.py:293
msgid "Phone number" msgid "Phone number"
@ -794,6 +795,9 @@ msgid ""
"objects, but your account doesn't have permission to delete the following " "objects, but your account doesn't have permission to delete the following "
"types of objects:" "types of objects:"
msgstr "" msgstr ""
"Skasowanie %(object_name)s '%(object)s' spowoduje kasację zależnych "
"obiektów, lecz twoje uprawnienia nie pozwalają na usunięcie następujących "
"typów obiektów:"
#: contrib/admin/templates/admin/delete_confirmation.html:21 #: contrib/admin/templates/admin/delete_confirmation.html:21
#, python-format #, python-format
@ -801,6 +805,8 @@ msgid ""
"Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of " "Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of "
"the following related items will be deleted:" "the following related items will be deleted:"
msgstr "" msgstr ""
"Czy chcesz skasować %(object_name)s \"%(object)s\"? Wszystkie "
"zależne obiekty zostaną skasowane:"
#: contrib/admin/templates/admin/delete_confirmation.html:26 #: contrib/admin/templates/admin/delete_confirmation.html:26
msgid "Yes, I'm sure" msgid "Yes, I'm sure"
@ -820,11 +826,10 @@ msgid "View on site"
msgstr "Pokaż na stronie" msgstr "Pokaż na stronie"
#: contrib/admin/templates/admin/change_form.html:30 #: contrib/admin/templates/admin/change_form.html:30
#, fuzzy
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] "Proszę popraw poniższy błąd" msgstr[0] "Proszę popraw poniższy błąd"
msgstr[1] "Proszę popraw poniższy błąd" msgstr[1] "Proszę popraw poniższe błędy"
#: contrib/admin/templates/admin/change_form.html:48 #: contrib/admin/templates/admin/change_form.html:48
msgid "Ordering" msgid "Ordering"
@ -965,11 +970,11 @@ msgstr "Zespół %(site_name)s"
#: contrib/admin/templates/admin_doc/bookmarklets.html:3 #: contrib/admin/templates/admin_doc/bookmarklets.html:3
msgid "Bookmarklets" msgid "Bookmarklets"
msgstr "" msgstr "Zakładki"
#: contrib/admin/templates/admin_doc/bookmarklets.html:5 #: contrib/admin/templates/admin_doc/bookmarklets.html:5
msgid "Documentation bookmarklets" msgid "Documentation bookmarklets"
msgstr "" msgstr "Zakładki Dokumentacji"
#: contrib/admin/templates/admin_doc/bookmarklets.html:9 #: contrib/admin/templates/admin_doc/bookmarklets.html:9
msgid "" msgid ""
@ -1094,6 +1099,8 @@ msgid ""
"Example: 'flatpages/contact_page'. If this isn't provided, the system will " "Example: 'flatpages/contact_page'. If this isn't provided, the system will "
"use 'flatpages/default'." "use 'flatpages/default'."
msgstr "" msgstr ""
"Przykład: 'flatpages/contact_page'. Jeżeli nie podane system użyje "
"'flatpages/default'."
#: contrib/flatpages/models.py:14 #: contrib/flatpages/models.py:14
msgid "registration required" msgid "registration required"
@ -1105,11 +1112,11 @@ msgstr "Jeżeli zaznaczone - tylko zalogowani użytkownicy będą mogli zobaczy
#: contrib/flatpages/models.py:18 #: contrib/flatpages/models.py:18
msgid "flat page" msgid "flat page"
msgstr "" msgstr "strona statyczna"
#: contrib/flatpages/models.py:19 #: contrib/flatpages/models.py:19
msgid "flat pages" msgid "flat pages"
msgstr "" msgstr "strony statyczne"
#: contrib/auth/models.py:13 contrib/auth/models.py:26 #: contrib/auth/models.py:13 contrib/auth/models.py:26
msgid "name" msgid "name"
@ -1117,7 +1124,7 @@ msgstr "nazwa"
#: contrib/auth/models.py:15 #: contrib/auth/models.py:15
msgid "codename" msgid "codename"
msgstr "" msgstr "nazwa kodowa"
#: contrib/auth/models.py:17 #: contrib/auth/models.py:17
msgid "permission" msgid "permission"
@ -1161,11 +1168,11 @@ msgstr "Użyj '[algo]$[salt]$[hexdigest]'"
#: contrib/auth/models.py:60 #: contrib/auth/models.py:60
msgid "staff status" msgid "staff status"
msgstr "stan w zespole" msgstr "w zespole"
#: contrib/auth/models.py:60 #: contrib/auth/models.py:60
msgid "Designates whether the user can log into this admin site." msgid "Designates whether the user can log into this admin site."
msgstr "Oznaczy czy użytkownik może zalogować się do panelu admina." msgstr "Oznacza czy użytkownik może zalogować się do panelu admina."
#: contrib/auth/models.py:61 #: contrib/auth/models.py:61
msgid "active" msgid "active"
@ -1195,15 +1202,14 @@ msgstr ""
msgid "user permissions" msgid "user permissions"
msgstr "uprawnienia użytkownika" msgstr "uprawnienia użytkownika"
#kurwa
#: contrib/auth/models.py:70 #: contrib/auth/models.py:70
#, fuzzy
msgid "user" msgid "user"
msgstr "Użytkownik" msgstr "użytkownik"
#: contrib/auth/models.py:71 #: contrib/auth/models.py:71
#, fuzzy
msgid "users" msgid "users"
msgstr "Uzytkownicy" msgstr "ytkownicy"
#: contrib/auth/models.py:76 #: contrib/auth/models.py:76
msgid "Personal info" msgid "Personal info"
@ -1222,7 +1228,6 @@ msgid "Groups"
msgstr "Grupy" msgstr "Grupy"
#: contrib/auth/models.py:219 #: contrib/auth/models.py:219
#, fuzzy
msgid "message" msgid "message"
msgstr "wiadomość" msgstr "wiadomość"
@ -1371,7 +1376,6 @@ msgid "December"
msgstr "Grudzień" msgstr "Grudzień"
#: utils/dates.py:19 #: utils/dates.py:19
#, fuzzy
msgid "jan" msgid "jan"
msgstr "sty" msgstr "sty"
@ -1472,11 +1476,10 @@ msgstr[0] "dzień"
msgstr[1] "dni" msgstr[1] "dni"
#: utils/timesince.py:16 #: utils/timesince.py:16
#, fuzzy
msgid "hour" msgid "hour"
msgid_plural "hours" msgid_plural "hours"
msgstr[0] "godzina" msgstr[0] "godzina"
msgstr[1] "godzina" msgstr[1] "godzin"
#: utils/timesince.py:17 #: utils/timesince.py:17
msgid "minute" msgid "minute"
@ -1569,7 +1572,6 @@ msgid "Slovak"
msgstr "Słowacki" msgstr "Słowacki"
#: conf/global_settings.py:58 #: conf/global_settings.py:58
#, fuzzy
msgid "Slovenian" msgid "Slovenian"
msgstr "Słowacki" msgstr "Słowacki"
@ -1582,9 +1584,8 @@ msgid "Swedish"
msgstr "Szwedzki" msgstr "Szwedzki"
#: conf/global_settings.py:61 #: conf/global_settings.py:61
#, fuzzy
msgid "Ukrainian" msgid "Ukrainian"
msgstr "Brazylijski" msgstr "Ukraiński"
#: conf/global_settings.py:62 #: conf/global_settings.py:62
msgid "Simplified Chinese" msgid "Simplified Chinese"
@ -1715,14 +1716,14 @@ msgstr "Odnośnik %s jest nieprawidłowy."
#: core/validators.py:214 #: core/validators.py:214
msgid "Enter a valid U.S. state abbreviation." msgid "Enter a valid U.S. state abbreviation."
msgstr "Wpisz poprawny kod stanu U.S." msgstr "Wpisz poprawny kod stanu U.S.A."
#: core/validators.py:229 #: core/validators.py:229
#, fuzzy, 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] "Nie wolno przeklinać! Słowo %s jest niedozwolone." msgstr[0] "Nie wolno przeklinać! Słowo %s jest niedozwolone."
msgstr[1] "Nie wolno przeklinać! Słowo %s jest niedozwolone." msgstr[1] "Nie wolno przeklinać! Słowa %s są niedozwolone."
#: core/validators.py:236 #: core/validators.py:236
#, python-format #, python-format
@ -1745,11 +1746,11 @@ msgstr "To pole musi być uzupełnione jeśli %(field)s jest %(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 "" msgstr "To pole musi być wypełnione jeżeli %(field)s nie jest %(value)s"
#: core/validators.py:313 #: core/validators.py:313
msgid "Duplicate values are not allowed." msgid "Duplicate values are not allowed."
msgstr "" msgstr "Duplikaty są niedozwolone."
#: core/validators.py:336 #: core/validators.py:336
#, python-format #, python-format
@ -1761,20 +1762,20 @@ msgid "Please enter a valid decimal number."
msgstr "Proszę wpisać poprawną liczbę dziesiętną." msgstr "Proszę wpisać poprawną liczbę dziesiętną."
#: core/validators.py:349 #: core/validators.py:349
#, fuzzy, 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 ""
"Please enter a valid decimal number with at most %s total digits." "Please enter a valid decimal number with at most %s total digits."
msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną." msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną zawierającą nie więcej niż %s cyfry."
msgstr[1] "Proszę wpisać poprawną liczbę dziesiętną." msgstr[1] "Proszę wpisać poprawną liczbę dziesiętną zawierającą nie więcej niż %s cyfr."
#: core/validators.py:352 #: core/validators.py:352
#, fuzzy, 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 ""
"Please enter a valid decimal number with at most %s decimal places." "Please enter a valid decimal number with at most %s decimal places."
msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną." msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną z dokładnością do %s miejsca po przecinku."
msgstr[1] "Proszę wpisać poprawną liczbę dziesiętną." msgstr[1] "Proszę wpisać poprawną liczbę dziesiętną z dokładnością do %s miejsc po przecinku."
#: core/validators.py:362 #: core/validators.py:362
#, python-format #, python-format
@ -1797,13 +1798,14 @@ msgstr "To pole jest nieprawidłowe."
#: 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 "Nie można otrzymać nic z %s." msgstr "Nie można nic pobrać z %s."
#: core/validators.py:429 #: core/validators.py:429
#, 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 zwrócił niepoprawny Content-Type header '%(contenttype)s'."
#: core/validators.py:462 #: core/validators.py:462
@ -1866,17 +1868,15 @@ msgstr "To pole jest wymagane"
#: 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 "" msgstr "Ta wartość musi być liczbą całkowitą"
#: db/models/fields/__init__.py:369 #: db/models/fields/__init__.py:369
#, fuzzy
msgid "This value must be either True or False." msgid "This value must be either True or False."
msgstr "Wartość logiczna (True, False - prawda lub fałsz)" msgstr "Ta wartość musi być logiczna (True, False - prawda lub fałsz)."
#: db/models/fields/__init__.py:385 #: db/models/fields/__init__.py:385
#, fuzzy
msgid "This field cannot be null." msgid "This field cannot be null."
msgstr "To pole jest nieprawidłowe." msgstr "To pole nie może być puste."
#: db/models/fields/__init__.py:562 #: db/models/fields/__init__.py:562
msgid "Enter a valid filename." msgid "Enter a valid filename."
@ -1888,12 +1888,10 @@ msgid "Please enter a valid %s."
msgstr "Proszę wpisać poprawne %s." msgstr "Proszę wpisać poprawne %s."
#: db/models/fields/related.py:579 #: db/models/fields/related.py:579
#, fuzzy
msgid "Separate multiple IDs with commas." msgid "Separate multiple IDs with commas."
msgstr "Oddziel kilka pól ID przecinkami." msgstr "Oddziel kilka pól ID przecinkami."
#: db/models/fields/related.py:581 #: db/models/fields/related.py:581
#, fuzzy
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 ""
@ -1909,11 +1907,11 @@ msgstr[0] ""
msgstr[1] "" msgstr[1] ""
#: forms/__init__.py:380 #: forms/__init__.py:380
#, fuzzy, 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] "Upewnij się, że jest mniej niż %s znaków." msgstr[0] "Upewnij się, że tekst ma mniej niż %s znak."
msgstr[1] "Upewnij się, że jest mniej niż %s znaków." msgstr[1] "Upewnij się, że tekst ma mniej niż %s znaków."
#: forms/__init__.py:385 #: forms/__init__.py:385
msgid "Line breaks are not allowed here." msgid "Line breaks are not allowed here."

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,109 @@
# Django 0.95
# Copyright (C) 2006 Django
# This file is distributed under the same license as the Django package.
# Bahadır Kandemir <bahadir@pardus.org.tr>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: Django 0.95\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-09-30 01:31+0300\n"
"PO-Revision-Date: 2006-09-30 01:31+0300\n"
"Last-Translator: Bahadır Kandemir <bahadir@pardus.org.tr>\n"
"Language-Team: Bahadır Kandemir <bahadir@pardus.org.tr>\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 "Mevcut %s"
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
msgstr "Hepsini seç"
#: contrib/admin/media/js/SelectFilter2.js:46
msgid "Add"
msgstr "Ekle"
#: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove"
msgstr "Kaldır"
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "Seçilen %s"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
msgstr "Seçiminizi yapın ve tıklayın "
#: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all"
msgstr "Hepsini temizle"
#: 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 "Ocak Şubat Mart Nisan Mayıs Haziran Temmuz Ağustos Eylül Ekim Kasım "
"Aralık"
#: contrib/admin/media/js/dateparse.js:27
msgid "Sunday Monday Tuesday Wednesday Thursday Friday Saturday"
msgstr "Pazar Pazartesi Salı Çarşamba Perşembe Cuma Cumartesi"
#: contrib/admin/media/js/calendar.js:25
msgid "S M T W T F S"
msgstr "P P S Ç P C C"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
msgid "Now"
msgstr "Şimdi"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48
msgid "Clock"
msgstr "Saat"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
msgid "Choose a time"
msgstr "Saat seçin"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Midnight"
msgstr "Geceyarısı"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m."
msgstr "Sabah 6"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon"
msgstr "Öğle"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
msgid "Cancel"
msgstr "İptal"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
msgid "Today"
msgstr "Bugün"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114
msgid "Calendar"
msgstr "Takvim"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160
msgid "Yesterday"
msgstr "Dün"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow"
msgstr "Yarın"

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: django v1.0\n" "Project-Id-Version: django v1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-05-16 10:10+0200\n" "POT-Creation-Date: 2006-05-16 10:10+0200\n"
"PO-Revision-Date: 2006-05-17 13:47+0800\n" "PO-Revision-Date: 2006-09-01 22:05+0800\n"
"Last-Translator: limodou <limodou@gmail.com>\n" "Last-Translator: limodou <limodou@gmail.com>\n"
"Language-Team: Simplified Chinese <limodou@gmail.com>\n" "Language-Team: Simplified Chinese <limodou@gmail.com>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -1167,7 +1167,7 @@ msgstr "个人信息"
#: contrib/auth/models.py:77 #: contrib/auth/models.py:77
msgid "Permissions" msgid "Permissions"
msgstr "许可" msgstr "权限"
#: contrib/auth/models.py:78 #: contrib/auth/models.py:78
msgid "Important dates" msgid "Important dates"

View File

@ -3,22 +3,21 @@
# This file is distributed under the same license as the PACKAGE package. # This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: Django 0.95\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-03-21 18:43+0800\n" "POT-Creation-Date: 2006-03-21 18:43+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2006-09-25 08:35+0800\n"
"Last-Translator: FULL NAME <max@exoweb.net>\n" "Last-Translator: limodou <limodou@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: limodou <limodou@gmail.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"
#: contrib/admin/media/js/SelectFilter2.js:33 #: contrib/admin/media/js/SelectFilter2.js:33
msgid "Available %s" msgid "Available %s"
msgstr "可 %s" msgstr "可 %s"
#: contrib/admin/media/js/SelectFilter2.js:41 #: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all" msgid "Choose all"
@ -30,34 +29,32 @@ msgstr "增加"
#: contrib/admin/media/js/SelectFilter2.js:48 #: contrib/admin/media/js/SelectFilter2.js:48
msgid "Remove" msgid "Remove"
msgstr "移出" msgstr "删除"
#: contrib/admin/media/js/SelectFilter2.js:53 #: contrib/admin/media/js/SelectFilter2.js:53
msgid "Chosen %s" msgid "Chosen %s"
msgstr "选 %s" msgstr "选中的 %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 "选择并点击 "
#: contrib/admin/media/js/SelectFilter2.js:59 #: contrib/admin/media/js/SelectFilter2.js:59
msgid "Clear all" msgid "Clear all"
msgstr "清除所有" msgstr "清除全部"
#: contrib/admin/media/js/dateparse.js:32 #: 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 December"
"January February March April May June July August September October November "
"December"
msgstr "一月 二月 三月 四月 五月 六月 六月 七月 八月 九月 十月 十一月 十二月" msgstr "一月 二月 三月 四月 五月 六月 六月 七月 八月 九月 十月 十一月 十二月"
#: contrib/admin/media/js/dateparse.js:33 #: 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 "星期 星期一 星期二 星期三 星期四 星期五 星期六"
#: 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 "日 一 二 三 四 五 六"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
@ -105,3 +102,4 @@ msgstr "昨天"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164 #: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
msgid "Tomorrow" msgid "Tomorrow"
msgstr "明天" msgstr "明天"

View File

@ -27,6 +27,10 @@ LANGUAGE_CODE = 'en-us'
SITE_ID = 1 SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media. # Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/" # Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = '' MEDIA_ROOT = ''
@ -60,8 +64,9 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = '{{ project_name }}.urls' ROOT_URLCONF = '{{ project_name }}.urls'
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates". # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows. # Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
) )
INSTALLED_APPS = ( INSTALLED_APPS = (

View File

@ -10,8 +10,10 @@ include = lambda urlconf_module: [urlconf_module]
def patterns(prefix, *tuples): def patterns(prefix, *tuples):
pattern_list = [] pattern_list = []
for t in tuples: for t in tuples:
if type(t[1]) == list: regex, view_or_include = t[:2]
pattern_list.append(RegexURLResolver(t[0], t[1][0])) default_kwargs = t[2:]
if type(view_or_include) == list:
pattern_list.append(RegexURLResolver(regex, view_or_include[0], *default_kwargs))
else: else:
pattern_list.append(RegexURLPattern(t[0], prefix and (prefix + '.' + t[1]) or t[1], *t[2:])) pattern_list.append(RegexURLPattern(regex, prefix and (prefix + '.' + view_or_include) or view_or_include, *default_kwargs))
return pattern_list return pattern_list

View File

@ -123,7 +123,7 @@ class DateFieldFilterSpec(FilterSpec):
def choices(self, cl): def choices(self, cl):
for title, param_dict in self.links: for title, param_dict in self.links:
yield {'selected': self.date_params == param_dict, yield {'selected': self.date_params == param_dict,
'query_string': cl.get_query_string(param_dict, self.field_generic), 'query_string': cl.get_query_string(param_dict, [self.field_generic]),
'display': title} 'display': title}
FilterSpec.register(lambda f: isinstance(f, models.DateField), DateFieldFilterSpec) FilterSpec.register(lambda f: isinstance(f, models.DateField), DateFieldFilterSpec)

View File

@ -42,9 +42,9 @@
/* PAGINATOR */ /* PAGINATOR */
.paginator { font-size:11px; padding-top:10px; padding-bottom:10px; line-height:22px; margin:0; border-top:1px solid #ddd; } .paginator { font-size:11px; padding-top:10px; padding-bottom:10px; line-height:22px; margin:0; border-top:1px solid #ddd; }
.paginator a:link, .paginator a:visited { padding:2px 6px; border:solid 1px #ccc; background:white; text-decoration:none; } .paginator a:link, .paginator a:visited { padding:2px 6px; border:solid 1px #ccc; background:white; text-decoration:none; }
.paginator a.showall { padding:0 !important; border:none !important; } .paginator a.showall { padding:0 !important; border:none !important; }
.paginator a.showall:hover { color:#036 !important; background:transparent !important; } .paginator a.showall:hover { color:#036 !important; background:transparent !important; }
.paginator .end { border-width:2px !important; margin-right:6px; } .paginator .end { border-width:2px !important; margin-right:6px; }
.paginator .this-page { padding:2px 6px; font-weight:bold; font-size:13px; vertical-align:top; } .paginator .this-page { padding:2px 6px; font-weight:bold; font-size:13px; vertical-align:top; }
.paginator a:hover { color:white; background:#5b80b2; border-color:#036; } .paginator a:hover { color:white; background:#5b80b2; border-color:#036; }

View File

@ -7,10 +7,10 @@
form .form-row p { padding-left:0; font-size:11px; } form .form-row p { padding-left:0; font-size:11px; }
/* FORM LABELS */ /* FORM LABELS */
form h4 { margin:0 !important; padding:0 !important; border:none !important; } form h4 { margin:0 !important; padding:0 !important; border:none !important; }
label { font-weight:normal !important; color:#666; font-size:12px; } label { font-weight:normal !important; color:#666; font-size:12px; }
label.inline { margin-left:20px; } label.inline { margin-left:20px; }
.required label, label.required { font-weight:bold !important; color:#333 !important; } .required label, label.required { font-weight:bold !important; color:#333 !important; }
/* RADIO BUTTONS */ /* RADIO BUTTONS */
form ul.radiolist li { list-style-type:none; } form ul.radiolist li { list-style-type:none; }

View File

@ -1,4 +1,4 @@
body { margin:0; padding:0; font-size:12px; font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:#fff; } body { margin:0; padding:0; font-size:12px; font-family:"Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:#fff; }
/* LINKS */ /* LINKS */
a:link, a:visited { color: #5b80b2; text-decoration:none; } a:link, a:visited { color: #5b80b2; text-decoration:none; }
@ -31,7 +31,7 @@ fieldset { margin:0; padding:0; }
blockquote { font-size:11px; color:#777; margin-left:2px; padding-left:10px; border-left:5px solid #ddd; } blockquote { font-size:11px; color:#777; margin-left:2px; padding-left:10px; border-left:5px solid #ddd; }
code, pre { font-family:"Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; background:inherit; color:#666; font-size:11px; } code, pre { font-family:"Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; background:inherit; color:#666; font-size:11px; }
pre.literal-block { margin:10px; background:#eee; padding:6px 8px; } pre.literal-block { margin:10px; background:#eee; padding:6px 8px; }
code strong { color:#930; } code strong { color:#930; }
hr { clear:both; color:#eee; background-color:#eee; height:1px; border:none; margin:0; padding:0; font-size:1px; line-height:1px; } hr { clear:both; color:#eee; background-color:#eee; height:1px; border:none; margin:0; padding:0; font-size:1px; line-height:1px; }
/* TEXT STYLES & MODIFIERS */ /* TEXT STYLES & MODIFIERS */
@ -81,7 +81,7 @@ table.orderable tbody tr td:first-child { padding-left:14px; background-image:ur
table.orderable-initalized .order-cell, body>tr>td.order-cell { display:none; } table.orderable-initalized .order-cell, body>tr>td.order-cell { display:none; }
/* FORM DEFAULTS */ /* FORM DEFAULTS */
input, textarea, select { margin:2px 0; padding:2px 3px; vertical-align:middle; font-family:"Lucida Grande", Verdana, Arial, sans-serif; font-weight:normal; font-size:11px; } input, textarea, select { margin:2px 0; padding:2px 3px; vertical-align:middle; font-family:"Lucida Grande", Verdana, Arial, sans-serif; font-weight:normal; font-size:11px; }
textarea { vertical-align:top !important; } textarea { vertical-align:top !important; }
input[type=text], input[type=password], textarea, select, .vTextField { border:1px solid #ccc; } input[type=text], input[type=password], textarea, select, .vTextField { border:1px solid #ccc; }
@ -92,7 +92,7 @@ input[type=submit].default, .submit-row input.default { border:2px solid #5b80b2
input[type=submit].default:active { background-image:url(../img/admin/default-bg-reverse.gif); background-position:top; } input[type=submit].default:active { background-image:url(../img/admin/default-bg-reverse.gif); background-position:top; }
/* MODULES */ /* MODULES */
.module { border:1px solid #ccc; margin-bottom:5px; background:white; } .module { border:1px solid #ccc; margin-bottom:5px; background:white; }
.module p, .module ul, .module h3, .module h4, .module dl, .module pre { padding-left:10px; padding-right:10px; } .module p, .module ul, .module h3, .module h4, .module dl, .module pre { padding-left:10px; padding-right:10px; }
.module blockquote { margin-left:12px; } .module blockquote { margin-left:12px; }
.module ul, .module ol { margin-left:1.5em; } .module ul, .module ol { margin-left:1.5em; }

View File

@ -4,7 +4,7 @@
#header { width:100%; } #header { width:100%; }
#content-main { float:left; width:100%; } #content-main { float:left; width:100%; }
#content-related { float:right; width:18em; position:relative; margin-right:-19em; } #content-related { float:right; width:18em; position:relative; margin-right:-19em; }
#footer { clear:both; padding:10px; } #footer { clear:both; padding:10px; }
/* COLUMN TYPES */ /* COLUMN TYPES */
.colMS { margin-right:20em !important; } .colMS { margin-right:20em !important; }
@ -16,14 +16,14 @@
.dashboard #content { width:500px; } .dashboard #content { width:500px; }
/* HEADER */ /* HEADER */
#header { background:#417690; color:#ffc; overflow:hidden; } #header { background:#417690; color:#ffc; overflow:hidden; }
#header a:link, #header a:visited { color:white; } #header a:link, #header a:visited { color:white; }
#header a:hover { text-decoration:underline; } #header a:hover { text-decoration:underline; }
#branding h1 { padding:0 10px; font-size:18px; margin:8px 0; font-weight:normal; color:#f4f379; } #branding h1 { padding:0 10px; font-size:18px; margin:8px 0; font-weight:normal; color:#f4f379; }
#branding h2 { padding:0 10px; font-size:14px; margin:-8px 0 8px 0; font-weight:normal; color:#ffc; } #branding h2 { padding:0 10px; font-size:14px; margin:-8px 0 8px 0; font-weight:normal; color:#ffc; }
#user-tools { position:absolute; top:0; right:0; padding:1.2em 10px; font-size:11px; text-align:right; } #user-tools { position:absolute; top:0; right:0; padding:1.2em 10px; font-size:11px; text-align:right; }
/* SIDEBAR */ /* SIDEBAR */
#content-related h3 { font-size:12px; color:#666; margin-bottom:3px; } #content-related h3 { font-size:12px; color:#666; margin-bottom:3px; }
#content-related h4 { font-size:11px; } #content-related h4 { font-size:11px; }
#content-related .module h2 { background:#eee url(../img/admin/nav-bg.gif) bottom left repeat-x; color:#666; } #content-related .module h2 { background:#eee url(../img/admin/nav-bg.gif) bottom left repeat-x; color:#666; }

View File

@ -16,7 +16,7 @@ th { text-align: right; }
/* layout styles */ /* layout styles */
#user-tools { right:auto; left:0; text-align:left; } #user-tools { right:auto; left:0; text-align:left; }
div.breadcrumbs { text-align:right; } div.breadcrumbs { text-align:right; }
#content-main { float:right;} #content-main { float:right;}
#content-related { float:left; margin-left:-19em; margin-right:auto;} #content-related { float:left; margin-left:-19em; margin-right:auto;}

View File

@ -3,83 +3,83 @@
// link when the fieldset is visible. // link when the fieldset is visible.
function findForm(node) { function findForm(node) {
// returns the node of the form containing the given node // returns the node of the form containing the given node
if (node.tagName.toLowerCase() != 'form') { if (node.tagName.toLowerCase() != 'form') {
return findForm(node.parentNode); return findForm(node.parentNode);
} }
return node; return node;
} }
var CollapsedFieldsets = { var CollapsedFieldsets = {
collapse_re: /\bcollapse\b/, // Class of fieldsets that should be dealt with. collapse_re: /\bcollapse\b/, // Class of fieldsets that should be dealt with.
collapsed_re: /\bcollapsed\b/, // Class that fieldsets get when they're hidden. collapsed_re: /\bcollapsed\b/, // Class that fieldsets get when they're hidden.
collapsed_class: 'collapsed', collapsed_class: 'collapsed',
init: function() { init: function() {
var fieldsets = document.getElementsByTagName('fieldset'); var fieldsets = document.getElementsByTagName('fieldset');
var collapsed_seen = false; var collapsed_seen = false;
for (var i = 0, fs; fs = fieldsets[i]; i++) { for (var i = 0, fs; fs = fieldsets[i]; i++) {
// Collapse this fieldset if it has the correct class, and if it // Collapse this fieldset if it has the correct class, and if it
// doesn't have any errors. (Collapsing shouldn't apply in the case // doesn't have any errors. (Collapsing shouldn't apply in the case
// of error messages.) // of error messages.)
if (fs.className.match(CollapsedFieldsets.collapse_re) && !CollapsedFieldsets.fieldset_has_errors(fs)) { if (fs.className.match(CollapsedFieldsets.collapse_re) && !CollapsedFieldsets.fieldset_has_errors(fs)) {
collapsed_seen = true; collapsed_seen = true;
// Give it an additional class, used by CSS to hide it. // Give it an additional class, used by CSS to hide it.
fs.className += ' ' + CollapsedFieldsets.collapsed_class; fs.className += ' ' + CollapsedFieldsets.collapsed_class;
// (<a id="fieldsetcollapser3" class="collapse-toggle" href="#">Show</a>) // (<a id="fieldsetcollapser3" class="collapse-toggle" href="#">Show</a>)
var collapse_link = document.createElement('a'); var collapse_link = document.createElement('a');
collapse_link.className = 'collapse-toggle'; collapse_link.className = 'collapse-toggle';
collapse_link.id = 'fieldsetcollapser' + i; collapse_link.id = 'fieldsetcollapser' + i;
collapse_link.onclick = new Function('CollapsedFieldsets.show('+i+'); return false;'); collapse_link.onclick = new Function('CollapsedFieldsets.show('+i+'); return false;');
collapse_link.href = '#'; collapse_link.href = '#';
collapse_link.innerHTML = gettext('Show'); collapse_link.innerHTML = gettext('Show');
var h2 = fs.getElementsByTagName('h2')[0]; var h2 = fs.getElementsByTagName('h2')[0];
h2.appendChild(document.createTextNode(' (')); h2.appendChild(document.createTextNode(' ('));
h2.appendChild(collapse_link); h2.appendChild(collapse_link);
h2.appendChild(document.createTextNode(')')); h2.appendChild(document.createTextNode(')'));
} }
} }
if (collapsed_seen) { if (collapsed_seen) {
// Expand all collapsed fieldsets when form is submitted. // Expand all collapsed fieldsets when form is submitted.
addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); }); addEvent(findForm(document.getElementsByTagName('fieldset')[0]), 'submit', function() { CollapsedFieldsets.uncollapse_all(); });
} }
}, },
fieldset_has_errors: function(fs) { fieldset_has_errors: function(fs) {
// Returns true if any fields in the fieldset have validation errors. // Returns true if any fields in the fieldset have validation errors.
var divs = fs.getElementsByTagName('div'); var divs = fs.getElementsByTagName('div');
for (var i=0; i<divs.length; i++) { for (var i=0; i<divs.length; i++) {
if (divs[i].className.match(/\berror\b/)) { if (divs[i].className.match(/\berror\b/)) {
return true; return true;
} }
} }
return false; return false;
}, },
show: function(fieldset_index) { show: function(fieldset_index) {
var fs = document.getElementsByTagName('fieldset')[fieldset_index]; var fs = document.getElementsByTagName('fieldset')[fieldset_index];
// Remove the class name that causes the "display: none". // Remove the class name that causes the "display: none".
fs.className = fs.className.replace(CollapsedFieldsets.collapsed_re, ''); fs.className = fs.className.replace(CollapsedFieldsets.collapsed_re, '');
// Toggle the "Show" link to a "Hide" link // Toggle the "Show" link to a "Hide" link
var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index); var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index);
collapse_link.onclick = new Function('CollapsedFieldsets.hide('+fieldset_index+'); return false;'); collapse_link.onclick = new Function('CollapsedFieldsets.hide('+fieldset_index+'); return false;');
collapse_link.innerHTML = gettext('Hide'); collapse_link.innerHTML = gettext('Hide');
}, },
hide: function(fieldset_index) { hide: function(fieldset_index) {
var fs = document.getElementsByTagName('fieldset')[fieldset_index]; var fs = document.getElementsByTagName('fieldset')[fieldset_index];
// Add the class name that causes the "display: none". // Add the class name that causes the "display: none".
fs.className += ' ' + CollapsedFieldsets.collapsed_class; fs.className += ' ' + CollapsedFieldsets.collapsed_class;
// Toggle the "Hide" link to a "Show" link // Toggle the "Hide" link to a "Show" link
var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index); var collapse_link = document.getElementById('fieldsetcollapser' + fieldset_index);
collapse_link.onclick = new Function('CollapsedFieldsets.show('+fieldset_index+'); return false;'); collapse_link.onclick = new Function('CollapsedFieldsets.show('+fieldset_index+'); return false;');
collapse_link.innerHTML = gettext('Show'); collapse_link.innerHTML = gettext('Show');
}, },
uncollapse_all: function() { uncollapse_all: function() {
var fieldsets = document.getElementsByTagName('fieldset'); var fieldsets = document.getElementsByTagName('fieldset');
for (var i=0; i<fieldsets.length; i++) { for (var i=0; i<fieldsets.length; i++) {
if (fieldsets[i].className.match(CollapsedFieldsets.collapsed_re)) { if (fieldsets[i].className.match(CollapsedFieldsets.collapsed_re)) {
CollapsedFieldsets.show(i); CollapsedFieldsets.show(i);
} }
} }
} }
} }
addEvent(window, 'load', CollapsedFieldsets.init); addEvent(window, 'load', CollapsedFieldsets.init);

View File

@ -8,7 +8,9 @@ var DateTimeShortcuts = {
clockInputs: [], clockInputs: [],
calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled
calendarDivName2: 'calendarin', // name of <div> that contains calendar calendarDivName2: 'calendarin', // name of <div> that contains calendar
calendarLinkName: 'calendarlink',// name of the link that is used to toggle
clockDivName: 'clockbox', // name of clock <div> that gets toggled clockDivName: 'clockbox', // name of clock <div> that gets toggled
clockLinkName: 'clocklink', // name of the link that is used to toggle
admin_media_prefix: '', admin_media_prefix: '',
init: function() { init: function() {
// Deduce admin_media_prefix by looking at the <script>s in the // Deduce admin_media_prefix by looking at the <script>s in the
@ -46,6 +48,7 @@ var DateTimeShortcuts = {
now_link.appendChild(document.createTextNode(gettext('Now'))); now_link.appendChild(document.createTextNode(gettext('Now')));
var clock_link = document.createElement('a'); var clock_link = document.createElement('a');
clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');'); clock_link.setAttribute('href', 'javascript:DateTimeShortcuts.openClock(' + num + ');');
clock_link.id = DateTimeShortcuts.clockLinkName + num;
quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', gettext('Clock')); quickElement('img', clock_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_clock.gif', 'alt', gettext('Clock'));
shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(document.createTextNode('\240'));
shortcuts_span.appendChild(now_link); shortcuts_span.appendChild(now_link);
@ -69,17 +72,6 @@ var DateTimeShortcuts = {
var clock_box = document.createElement('div'); var clock_box = document.createElement('div');
clock_box.style.display = 'none'; clock_box.style.display = 'none';
clock_box.style.position = 'absolute'; clock_box.style.position = 'absolute';
if (getStyle(document.body,'direction')!='rtl') {
clock_box.style.left = findPosX(clock_link) + 17 + 'px';
}
else {
// since style's width is in em, it'd be tough to calculate
// px value of it. let's use an estimated px for now
// TODO: IE returns wrong value for findPosX when in rtl mode
// (it returns as it was left aligned), needs to be fixed.
clock_box.style.left = findPosX(clock_link) - 110 + 'px';
}
clock_box.style.top = findPosY(clock_link) - 30 + 'px';
clock_box.className = 'clockbox module'; clock_box.className = 'clockbox module';
clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num); clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num);
document.body.appendChild(clock_box); document.body.appendChild(clock_box);
@ -98,7 +90,25 @@ var DateTimeShortcuts = {
quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');'); quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + num + ');');
}, },
openClock: function(num) { openClock: function(num) {
document.getElementById(DateTimeShortcuts.clockDivName + num).style.display = 'block'; var clock_box = document.getElementById(DateTimeShortcuts.clockDivName+num)
var clock_link = document.getElementById(DateTimeShortcuts.clockLinkName+num)
// Recalculate the clockbox position
// is it left-to-right or right-to-left layout ?
if (getStyle(document.body,'direction')!='rtl') {
clock_box.style.left = findPosX(clock_link) + 17 + 'px';
}
else {
// since style's width is in em, it'd be tough to calculate
// px value of it. let's use an estimated px for now
// TODO: IE returns wrong value for findPosX when in rtl mode
// (it returns as it was left aligned), needs to be fixed.
clock_box.style.left = findPosX(clock_link) - 110 + 'px';
}
clock_box.style.top = findPosY(clock_link) - 30 + 'px';
// Show the clock box
clock_box.style.display = 'block';
addEvent(window, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; }); addEvent(window, 'click', function() { DateTimeShortcuts.dismissClock(num); return true; });
}, },
dismissClock: function(num) { dismissClock: function(num) {
@ -123,6 +133,7 @@ var DateTimeShortcuts = {
today_link.appendChild(document.createTextNode(gettext('Today'))); today_link.appendChild(document.createTextNode(gettext('Today')));
var cal_link = document.createElement('a'); var cal_link = document.createElement('a');
cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');'); cal_link.setAttribute('href', 'javascript:DateTimeShortcuts.openCalendar(' + num + ');');
cal_link.id = DateTimeShortcuts.calendarLinkName + num;
quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', gettext('Calendar')); quickElement('img', cal_link, '', 'src', DateTimeShortcuts.admin_media_prefix + 'img/admin/icon_calendar.gif', 'alt', gettext('Calendar'));
shortcuts_span.appendChild(document.createTextNode('\240')); shortcuts_span.appendChild(document.createTextNode('\240'));
shortcuts_span.appendChild(today_link); shortcuts_span.appendChild(today_link);
@ -149,18 +160,6 @@ var DateTimeShortcuts = {
var cal_box = document.createElement('div'); var cal_box = document.createElement('div');
cal_box.style.display = 'none'; cal_box.style.display = 'none';
cal_box.style.position = 'absolute'; cal_box.style.position = 'absolute';
// is it left-to-right or right-to-left layout ?
if (getStyle(document.body,'direction')!='rtl') {
cal_box.style.left = findPosX(cal_link) + 17 + 'px';
}
else {
// since style's width is in em, it'd be tough to calculate
// px value of it. let's use an estimated px for now
// TODO: IE returns wrong value for findPosX when in rtl mode
// (it returns as it was left aligned), needs to be fixed.
cal_box.style.left = findPosX(cal_link) - 180 + 'px';
}
cal_box.style.top = findPosY(cal_link) - 75 + 'px';
cal_box.className = 'calendarbox module'; cal_box.className = 'calendarbox module';
cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num); cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num);
document.body.appendChild(cal_box); document.body.appendChild(cal_box);
@ -172,7 +171,6 @@ var DateTimeShortcuts = {
cal_nav_prev.className = 'calendarnav-previous'; cal_nav_prev.className = 'calendarnav-previous';
var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');'); var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
cal_nav_next.className = 'calendarnav-next'; cal_nav_next.className = 'calendarnav-next';
cal_box.appendChild(cal_nav);
// main box // main box
var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num); var cal_main = quickElement('div', cal_box, '', 'id', DateTimeShortcuts.calendarDivName2 + num);
@ -195,7 +193,24 @@ var DateTimeShortcuts = {
quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');'); quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissCalendar(' + num + ');');
}, },
openCalendar: function(num) { openCalendar: function(num) {
document.getElementById(DateTimeShortcuts.calendarDivName1+num).style.display = 'block'; var cal_box = document.getElementById(DateTimeShortcuts.calendarDivName1+num)
var cal_link = document.getElementById(DateTimeShortcuts.calendarLinkName+num)
// Recalculate the clockbox position
// is it left-to-right or right-to-left layout ?
if (getStyle(document.body,'direction')!='rtl') {
cal_box.style.left = findPosX(cal_link) + 17 + 'px';
}
else {
// since style's width is in em, it'd be tough to calculate
// px value of it. let's use an estimated px for now
// TODO: IE returns wrong value for findPosX when in rtl mode
// (it returns as it was left aligned), needs to be fixed.
cal_box.style.left = findPosX(cal_link) - 180 + 'px';
}
cal_box.style.top = findPosY(cal_link) - 75 + 'px';
cal_box.style.display = 'block';
addEvent(window, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; }); addEvent(window, 'click', function() { DateTimeShortcuts.dismissCalendar(num); return true; });
}, },
dismissCalendar: function(num) { dismissCalendar: function(num) {

View File

@ -11,7 +11,7 @@ function showRelatedObjectLookupPopup(triggeringLink) {
} else { } else {
href = triggeringLink.href + '?pop=1'; href = triggeringLink.href + '?pop=1';
} }
var win = window.open(href, name, 'height=500,width=740,resizable=yes,scrollbars=yes'); var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes');
win.focus(); win.focus();
return false; return false;
} }

View File

@ -0,0 +1,28 @@
{% extends "admin/change_form.html" %}
{% load i18n %}
{% block after_field_sets %}
<p>{% trans "First, enter a username and password. Then, you'll be able to edit more user options." %}</p>
<fieldset class="module aligned">
<div class="form-row">
{{ form.username.html_error_list }}
<label for="id_username" class="required">{% trans 'Username' %}:</label> {{ form.username }}
<p class="help">{{ username_help_text }}</p>
</div>
<div class="form-row">
{{ form.password1.html_error_list }}
<label for="id_password1" class="required">{% trans 'Password' %}:</label> {{ form.password1 }}
</div>
<div class="form-row">
{{ form.password2.html_error_list }}
<label for="id_password2" class="required">{% trans 'Password (again)' %}:</label> {{ form.password2 }}
<p class="help">{% trans 'Enter the same password as above, for verification.' %}</p>
</div>
</fieldset>
{% endblock %}

View File

@ -6,6 +6,7 @@
{% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %} {% if LANGUAGE_BIDI %}<link rel="stylesheet" type="text/css" href="{% block stylesheet_rtl %}{% admin_media_prefix %}css/rtl.css{% endblock %}" />{% endif %}
{% block extrastyle %}{% endblock %} {% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %} {% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head> </head>
{% load i18n %} {% load i18n %}
@ -20,13 +21,13 @@
<div id="branding"> <div id="branding">
{% block branding %}{% endblock %} {% block branding %}{% endblock %}
</div> </div>
{% if not user.is_anonymous %}{% if user.is_staff %} {% if user.is_authenticated and user.is_staff %}
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div> <div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
{% endif %}{% endif %} {% endif %}
{% block nav-global %}{% endblock %} {% block nav-global %}{% endblock %}
</div> </div>
<!-- END Header --> <!-- END Header -->
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %} {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title|escape }}{% endif %}</div>{% endblock %}
{% endif %} {% endif %}
{% if messages %} {% if messages %}
@ -36,7 +37,7 @@
<!-- Content --> <!-- Content -->
<div id="content" class="{% block coltype %}colM{% endblock %}"> <div id="content" class="{% block coltype %}colM{% endblock %}">
{% block pretitle %}{% endblock %} {% block pretitle %}{% endblock %}
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %} {% block content_title %}{% if title %}<h1>{{ title|escape }}</h1>{% endif %}{% endblock %}
{% block content %}{{ content }}{% endblock %} {% block content %}{{ content }}{% endblock %}
{% block sidebar %}{% endblock %} {% block sidebar %}{% endblock %}
<br class="clear" /> <br class="clear" />

View File

@ -1,7 +1,7 @@
{% extends "admin/base.html" %} {% extends "admin/base.html" %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %} {% block title %}{{ title|escape }} | {% trans 'Django site admin' %}{% endblock %}
{% block branding %} {% block branding %}
<h1 id="site-name">{% trans 'Django administration' %}</h1> <h1 id="site-name">{% trans 'Django administration' %}</h1>

View File

@ -11,8 +11,8 @@
{% block breadcrumbs %}{% if not is_popup %} {% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs"> <div class="breadcrumbs">
<a href="../../../">{% trans "Home" %}</a> &rsaquo; <a href="../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo; <a href="../">{{ opts.verbose_name_plural|capfirst|escape }}</a> &rsaquo;
{% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18"|escape }}{% endif %} {% if add %}{% trans "Add" %} {{ opts.verbose_name|escape }}{% else %}{{ original|truncatewords:"18"|escape }}{% endif %}
</div> </div>
{% endif %}{% endblock %} {% endif %}{% endblock %}
{% block content %}<div id="content-main"> {% block content %}<div id="content-main">
@ -21,7 +21,7 @@
{% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%} {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
</ul> </ul>
{% endif %}{% endif %} {% endif %}{% endif %}
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post">{% block form_top %}{% endblock %} <form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.module_name }}_form">{% block form_top %}{% endblock %}
<div> <div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %} {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}
{% if opts.admin.save_on_top %}{% submit_row %}{% endif %} {% if opts.admin.save_on_top %}{% submit_row %}{% endif %}

View File

@ -3,12 +3,12 @@
{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %} {% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
{% block bodyclass %}change-list{% endblock %} {% block bodyclass %}change-list{% endblock %}
{% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / <a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %} {% block userlinks %}<a href="../../doc/">{% trans 'Documentation' %}</a> / <a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}</div>{% endblock %}{% endif %} {% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; {{ cl.opts.verbose_name_plural|capfirst|escape }}</div>{% endblock %}{% endif %}
{% block coltype %}flex{% endblock %} {% block coltype %}flex{% endblock %}
{% block content %} {% block content %}
<div id="content-main"> <div id="content-main">
{% if has_add_permission %} {% if has_add_permission %}
<ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}</a></li></ul> <ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% blocktrans with cl.opts.verbose_name|escape as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
{% endif %} {% endif %}
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist"> <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %} {% block search %}{% search_form cl %}{% endblock %}

View File

@ -1,10 +1,10 @@
{% if show %} {% if show %}
<div class="xfull"> <div class="xfull">
<ul class="toplinks"> <ul class="toplinks">
{% if back %}<li class="date-back"><a href="{{ back.link }}">&lsaquo; {{ back.title }}</a></li>{% endif %} {% if back %}<li class="date-back"><a href="{{ back.link }}">&lsaquo; {{ back.title|escape }}</a></li>{% endif %}
{% for choice in choices %} {% for choice in choices %}
<li> {% if choice.link %}<a href="{{ choice.link }}">{% endif %}{{ choice.title }}{% if choice.link %}</a>{% endif %}</li> <li> {% if choice.link %}<a href="{{ choice.link }}">{% endif %}{{ choice.title|escape }}{% if choice.link %}</a>{% endif %}</li>
{% endfor %} {% endfor %}
</ul><br class="clear" /> </ul><br class="clear" />
</div> </div>
{% endif %} {% endif %}

View File

@ -4,21 +4,21 @@
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="breadcrumbs"> <div class="breadcrumbs">
<a href="../../../../">{% trans "Home" %}</a> &rsaquo; <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo; <a href="../../">{{ opts.verbose_name_plural|capfirst|escape }}</a> &rsaquo;
<a href="../">{{ object|striptags|truncatewords:"18" }}</a> &rsaquo; <a href="../">{{ object|escape|truncatewords:"18" }}</a> &rsaquo;
{% trans 'Delete' %} {% trans 'Delete' %}
</div> </div>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% if perms_lacking %} {% if perms_lacking %}
<p>{% blocktrans %}Deleting the {{ object_name }} '{{ object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p> <p>{% blocktrans with object|escape as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
<ul> <ul>
{% for obj in perms_lacking %} {% for obj in perms_lacking %}
<li>{{ obj }}</li> <li>{{ obj|escape }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
<p>{% blocktrans %}Are you sure you want to delete the {{ object_name }} "{{ object }}"? All of the following related items will be deleted:{% endblocktrans %}</p> <p>{% blocktrans with object|escape as escaped_object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
<ul>{{ deleted_objects|unordered_list }}</ul> <ul>{{ deleted_objects|unordered_list }}</ul>
<form action="" method="post"> <form action="" method="post">
<div> <div>

View File

@ -1,7 +1,7 @@
{% load admin_modify %} {% load admin_modify %}
<fieldset class="module aligned"> <fieldset class="module aligned">
{% for fcw in bound_related_object.form_field_collection_wrappers %} {% for fcw in bound_related_object.form_field_collection_wrappers %}
<h2>{{ bound_related_object.relation.opts.verbose_name|capfirst }}&nbsp;#{{ forloop.counter }}</h2> <h2>{{ bound_related_object.relation.opts.verbose_name|capfirst|escape }}&nbsp;#{{ forloop.counter }}</h2>
{% if bound_related_object.show_url %}{% if fcw.obj.original %} {% if bound_related_object.show_url %}{% if fcw.obj.original %}
<p><a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a></p> <p><a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a></p>
{% endif %}{% endif %} {% endif %}{% endif %}

View File

@ -1,12 +1,13 @@
{% load admin_modify %} {% load admin_modify %}
<fieldset class="module"> <fieldset class="module">
<h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><table> <h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst|escape }}</h2><table>
<thead><tr> <thead><tr>
{% for fw in bound_related_object.field_wrapper_list %} {% for fw in bound_related_object.field_wrapper_list %}
{% if fw.needs_header %} {% if fw.needs_header %}
<th{{ fw.header_class_attribute }}>{{ fw.field.verbose_name|capfirst }}</th> <th{{ fw.header_class_attribute }}>{{ fw.field.verbose_name|capfirst|escape }}</th>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</tr></thead>
{% for fcw in bound_related_object.form_field_collection_wrappers %} {% for fcw in bound_related_object.form_field_collection_wrappers %}
{% if change %}{% if original_row_needed %} {% if change %}{% if original_row_needed %}
{% if fcw.obj.original %} {% if fcw.obj.original %}

View File

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
<h3>{% blocktrans %} By {{ title }} {% endblocktrans %}</h3> <h3>{% blocktrans with title|escape as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
<ul> <ul>
{% for choice in choices %} {% for choice in choices %}
<li{% if choice.selected %} class="selected"{% endif %}> <li{% if choice.selected %} class="selected"{% endif %}>

View File

@ -19,9 +19,9 @@
{% for model in app.models %} {% for model in app.models %}
<tr> <tr>
{% if model.perms.change %} {% if model.perms.change %}
<th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th> <th scope="row"><a href="{{ model.admin_url }}">{{ model.name|escape }}</a></th>
{% else %} {% else %}
<th scope="row">{{ model.name }}</th> <th scope="row">{{ model.name|escape }}</th>
{% endif %} {% endif %}
{% if model.perms.add %} {% if model.perms.add %}
@ -58,7 +58,7 @@
{% else %} {% else %}
<ul class="actionlist"> <ul class="actionlist">
{% for entry in admin_log %} {% for entry in admin_log %}
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{{ entry.content_type.name|capfirst }}</span></li> <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{{ entry.content_type.name|capfirst|escape }}</span></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View File

@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %} {% extends "admin/base_site.html" %}
{% load i18n %} {% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {{ title }}</div>{% endblock %} {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> &rsaquo; {{ title|escape }}</div>{% endblock %}
{% block content %} {% block content %}

View File

@ -13,17 +13,17 @@
{% endif %} {% endif %}
<div id="content-main"> <div id="content-main">
<form action="{{ app_path }}" method="post" id="login-form"> <form action="{{ app_path }}" method="post" id="login-form">
<div class="form-row"> <div class="form-row">
<label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" /> <label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
</div> </div>
<div class="form-row"> <div class="form-row">
<label for="id_password">{% trans 'Password:' %}</label> <input type="password" name="password" id="id_password" /> <label for="id_password">{% trans 'Password:' %}</label> <input type="password" name="password" id="id_password" />
<input type="hidden" name="this_is_the_login_form" value="1" /> <input type="hidden" name="this_is_the_login_form" value="1" />
<input type="hidden" name="post_data" value="{{ post_data }}" /> {% comment %}<span class="help">{% trans 'Have you <a href="/password_reset/">forgotten your password</a>?' %}</span>{% endcomment %} <input type="hidden" name="post_data" value="{{ post_data }}" /> {#<span class="help">{% trans 'Have you <a href="/password_reset/">forgotten your password</a>?' %}</span>#}
</div> </div>
<div class="submit-row"> <div class="submit-row">
<label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" /> <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
</div> </div>
</form> </form>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %} {% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="breadcrumbs"><a href="../../../../">{% trans 'Home' %}</a> &rsaquo; <a href="../../">{{ module_name }}</a> &rsaquo; <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo; {% trans 'History' %}</div> <div class="breadcrumbs"><a href="../../../../">{% trans 'Home' %}</a> &rsaquo; <a href="../../">{{ module_name|escape }}</a> &rsaquo; <a href="../">{{ object|escape|truncatewords:"18" }}</a> &rsaquo; {% trans 'History' %}</div>
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -6,6 +6,6 @@
{% paginator_number cl i %} {% paginator_number cl i %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %} {{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name|escape }}{% else %}{{ cl.opts.verbose_name_plural|escape }}{% endifequal %}
{% if show_all_url %}&nbsp;&nbsp;<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %} {% if show_all_url %}&nbsp;&nbsp;<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
</p> </p>

View File

@ -9,17 +9,17 @@
<h1>Documentation</h1> <h1>Documentation</h1>
<div id="content-main"> <div id="content-main">
<h3><a href="tags/">Tags</a></h3> <h3><a href="tags/">Tags</a></h3>
<p>List of all the template tags and their functions.</p> <p>List of all the template tags and their functions.</p>
<h3><a href="filters/">Filters</a></h3> <h3><a href="filters/">Filters</a></h3>
<p>Filters are actions which can be applied to variables in a template to alter the output.</p> <p>Filters are actions which can be applied to variables in a template to alter the output.</p>
<h3><a href="models/">Models</a></h3> <h3><a href="models/">Models</a></h3>
<p>Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables.</p> <p>Models are descriptions of all the objects in the system and their associated fields. Each model has a list of fields which can be accessed as template variables.</p>
<h3><a href="views/">Views</a></h3> <h3><a href="views/">Views</a></h3>
<p>Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.</p> <p>Each page on the public site is generated by a view. The view defines which template is used to generate the page and which objects are available to that template.</p>
<h3><a href="bookmarklets/">Bookmarklets</a></h3> <h3><a href="bookmarklets/">Bookmarklets</a></h3>
<p>Tools for your browser to quickly access admin functionality.</p> <p>Tools for your browser to quickly access admin functionality.</p>

View File

@ -9,9 +9,9 @@
<h1>Documentation</h1> <h1>Documentation</h1>
<div id="content-main"> <div id="content-main">
<h3>The admin documentation system requires Python's <a href="http://docutils.sf.net/">docutils</a> library.</h3> <h3>The admin documentation system requires Python's <a href="http://docutils.sf.net/">docutils</a> library.</h3>
<p>Please ask your administrators to install <a href="http://docutils.sf.net/">docutils</a>.</p> <p>Please ask your administrators to install <a href="http://docutils.sf.net/">docutils</a>.</p>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -9,13 +9,13 @@
</style> </style>
{% endblock %} {% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Models</a> &rsaquo; {{ name }}</div>{% endblock %} {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Models</a> &rsaquo; {{ name|escape }}</div>{% endblock %}
{% block title %}Model: {{ name }}{% endblock %} {% block title %}Model: {{ name|escape }}{% endblock %}
{% block content %} {% block content %}
<div id="content-main"> <div id="content-main">
<h1>{{ summary }}</h1> <h1>{{ summary|escape }}</h1>
{% if description %} {% if description %}
<p>{% filter escape|linebreaksbr %}{% trans description %}{% endfilter %}</p> <p>{% filter escape|linebreaksbr %}{% trans description %}{% endfilter %}</p>

View File

@ -1,19 +1,19 @@
{% extends "admin/base_site.html" %} {% extends "admin/base_site.html" %}
{% load i18n %} {% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; Templates &rsaquo; {{ name }}</div>{% endblock %} {% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; Templates &rsaquo; {{ name|escape }}</div>{% endblock %}
{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %} {% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block title %}Template: {{ name }}{% endblock %} {% block title %}Template: {{ name|escape }}{% endblock %}
{% block content %} {% block content %}
<h1>Template: "{{ name }}"</h1> <h1>Template: "{{ name|escape }}"</h1>
{% regroup templates|dictsort:"site_id" by site as templates_by_site %} {% regroup templates|dictsort:"site_id" by site as templates_by_site %}
{% for group in templates_by_site %} {% for group in templates_by_site %}
<h2>Search path for template "{{ name }}" on {{ group.grouper }}:</h2> <h2>Search path for template "{{ name|escape }}" on {{ group.grouper }}:</h2>
<ol> <ol>
{% for template in group.list|dictsort:"order" %} {% for template in group.list|dictsort:"order" %}
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li> <li><code>{{ template.file|escape }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li>
{% endfor %} {% endfor %}
</ol> </ol>
{% endfor %} {% endfor %}

View File

@ -1,4 +1,4 @@
{% load admin_modify i18n %}{% if bound_field.original_value %} {% load admin_modify i18n %}{% if bound_field.original_value %}
{% trans "Currently:" %} <a href="{{ bound_field.original_url }}" > {{ bound_field.original_value }} </a><br /> {% trans "Currently:" %} <a href="{{ bound_field.original_url }}" > {{ bound_field.original_value|escape }} </a><br />
{% trans "Change:" %}{% output_all bound_field.form_fields %} {% trans "Change:" %}{% output_all bound_field.form_fields %}
{% else %} {% output_all bound_field.form_fields %} {% endif %} {% else %} {% output_all bound_field.form_fields %} {% endif %}

View File

@ -15,6 +15,6 @@
{{ bound_field.original_value }} {{ bound_field.original_value }}
{% endif %} {% endif %}
{% if bound_field.raw_id_admin %} {% if bound_field.raw_id_admin %}
{% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14" }}</strong>{% endif %} {% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14"|escape }}</strong>{% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -1,2 +1,2 @@
{% if add %}{% include "widget/foreign.html" %}{% endif %} {% if add %}{% include "widget/foreign.html" %}{% endif %}
{% if change %}{% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14" }}</strong>{% endif %}{% endif %} {% if change %}{% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14"|escape }}</strong>{% endif %}{% endif %}

View File

@ -1,8 +1,6 @@
from django import template
from django.conf import settings from django.conf import settings
from django.contrib.admin.views.main import MAX_SHOW_ALL_ALLOWED, ALL_VAR from django.contrib.admin.views.main import ALL_VAR, EMPTY_CHANGELIST_VALUE
from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR
from django.contrib.admin.views.main import IS_POPUP_VAR, EMPTY_CHANGELIST_VALUE
from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import ObjectDoesNotExist
from django.db import models from django.db import models
from django.utils import dateformat from django.utils import dateformat
@ -119,7 +117,7 @@ def items_for_result(cl, result):
if callable(attr): if callable(attr):
attr = attr() attr = attr()
result_repr = str(attr) result_repr = str(attr)
except AttributeError, ObjectDoesNotExist: except (AttributeError, ObjectDoesNotExist):
result_repr = EMPTY_CHANGELIST_VALUE result_repr = EMPTY_CHANGELIST_VALUE
else: else:
# Strip HTML tags in the resulting text, except if the # Strip HTML tags in the resulting text, except if the
@ -167,11 +165,12 @@ def items_for_result(cl, result):
result_repr = '&nbsp;' result_repr = '&nbsp;'
# If list_display_links not defined, add the link tag to the first field # If list_display_links not defined, add the link tag to the first field
if (first and not cl.lookup_opts.admin.list_display_links) or field_name in cl.lookup_opts.admin.list_display_links: if (first and not cl.lookup_opts.admin.list_display_links) or field_name in cl.lookup_opts.admin.list_display_links:
table_tag = {True:'th', False:'td'}[first]
first = False first = False
url = cl.url_for_result(result) url = cl.url_for_result(result)
result_id = str(getattr(result, pk)) # str() is needed in case of 23L (long ints) result_id = str(getattr(result, pk)) # str() is needed in case of 23L (long ints)
yield ('<th%s><a href="%s"%s>%s</a></th>' % \ yield ('<%s%s><a href="%s"%s>%s</a></%s>' % \
(row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr)) (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr, table_tag))
else: else:
yield ('<td%s>%s</td>' % (row_class, result_repr)) yield ('<td%s>%s</td>' % (row_class, result_repr))

View File

@ -1,9 +1,7 @@
from django import template from django import template
from django.contrib.admin.views.main import AdminBoundField from django.contrib.admin.views.main import AdminBoundField
from django.template import loader from django.template import loader
from django.utils.html import escape
from django.utils.text import capfirst from django.utils.text import capfirst
from django.utils.functional import curry
from django.db import models from django.db import models
from django.db.models.fields import Field from django.db.models.fields import Field
from django.db.models.related import BoundRelatedObject from django.db.models.related import BoundRelatedObject
@ -162,8 +160,10 @@ class EditInlineNode(template.Node):
context.push() context.push()
if relation.field.rel.edit_inline == models.TABULAR: if relation.field.rel.edit_inline == models.TABULAR:
bound_related_object_class = TabularBoundRelatedObject bound_related_object_class = TabularBoundRelatedObject
else: elif relation.field.rel.edit_inline == models.STACKED:
bound_related_object_class = StackedBoundRelatedObject bound_related_object_class = StackedBoundRelatedObject
else:
bound_related_object_class = relation.field.rel.edit_inline
original = context.get('original', None) original = context.get('original', None)
bound_related_object = relation.bind(context['form'], original, bound_related_object_class) bound_related_object = relation.bind(context['form'], original, bound_related_object_class)
context['bound_related_object'] = bound_related_object context['bound_related_object'] = bound_related_object
@ -198,7 +198,7 @@ def filter_interface_script_maybe(bound_field):
if f.rel and isinstance(f.rel, models.ManyToManyRel) and f.rel.filter_interface: if f.rel and isinstance(f.rel, models.ManyToManyRel) and f.rel.filter_interface:
return '<script type="text/javascript">addEvent(window, "load", function(e) {' \ return '<script type="text/javascript">addEvent(window, "load", function(e) {' \
' SelectFilter.init("id_%s", "%s", %s, "%s"); });</script>\n' % ( ' SelectFilter.init("id_%s", "%s", %s, "%s"); });</script>\n' % (
f.name, f.verbose_name, f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX) f.name, f.verbose_name.replace('"', '\\"'), f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX)
else: else:
return '' return ''
filter_interface_script_maybe = register.simple_tag(filter_interface_script_maybe) filter_interface_script_maybe = register.simple_tag(filter_interface_script_maybe)

View File

@ -21,13 +21,15 @@ urlpatterns = patterns('',
('^doc/tags/$', 'django.contrib.admin.views.doc.template_tag_index'), ('^doc/tags/$', 'django.contrib.admin.views.doc.template_tag_index'),
('^doc/filters/$', 'django.contrib.admin.views.doc.template_filter_index'), ('^doc/filters/$', 'django.contrib.admin.views.doc.template_filter_index'),
('^doc/views/$', 'django.contrib.admin.views.doc.view_index'), ('^doc/views/$', 'django.contrib.admin.views.doc.view_index'),
('^doc/views/jump/$', 'django.contrib.admin.views.doc.jump_to_view'),
('^doc/views/(?P<view>[^/]+)/$', 'django.contrib.admin.views.doc.view_detail'), ('^doc/views/(?P<view>[^/]+)/$', 'django.contrib.admin.views.doc.view_detail'),
('^doc/models/$', 'django.contrib.admin.views.doc.model_index'), ('^doc/models/$', 'django.contrib.admin.views.doc.model_index'),
('^doc/models/(?P<app_label>[^\.]+)\.(?P<model_name>[^/]+)/$', 'django.contrib.admin.views.doc.model_detail'), ('^doc/models/(?P<app_label>[^\.]+)\.(?P<model_name>[^/]+)/$', 'django.contrib.admin.views.doc.model_detail'),
# ('^doc/templates/$', 'django.views.admin.doc.template_index'), # ('^doc/templates/$', 'django.views.admin.doc.template_index'),
('^doc/templates/(?P<template>.*)/$', 'django.contrib.admin.views.doc.template_detail'), ('^doc/templates/(?P<template>.*)/$', 'django.contrib.admin.views.doc.template_detail'),
# "Add user" -- a special-case view
('^auth/user/add/$', 'django.contrib.admin.views.auth.user_add_stage'),
# Add/change/delete/history # Add/change/delete/history
('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list'), ('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list'),
('^([^/]+)/([^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'), ('^([^/]+)/([^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'),

View File

@ -3,7 +3,6 @@
import re import re
from email.Parser import HeaderParser from email.Parser import HeaderParser
from email.Errors import HeaderParseError from email.Errors import HeaderParseError
from urlparse import urljoin
try: try:
import docutils.core import docutils.core
import docutils.nodes import docutils.nodes

View File

@ -0,0 +1,44 @@
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from django import forms, template
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
def user_add_stage(request):
if not request.user.has_perm('auth.change_user'):
raise PermissionDenied
manipulator = UserCreationForm()
if request.method == 'POST':
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
if not errors:
new_user = manipulator.save(new_data)
msg = _('The %(name)s "%(obj)s" was added successfully.') % {'name': 'user', 'obj': new_user}
if request.POST.has_key("_addanother"):
request.user.message_set.create(message=msg)
return HttpResponseRedirect(request.path)
else:
request.user.message_set.create(message=msg + ' ' + _("You may edit it again below."))
return HttpResponseRedirect('../%s/' % new_user.id)
else:
errors = new_data = {}
form = forms.FormWrapper(manipulator, new_data, errors)
return render_to_response('admin/auth/user/add_form.html', {
'title': _('Add user'),
'form': form,
'is_popup': request.REQUEST.has_key('_popup'),
'add': True,
'change': False,
'has_delete_permission': False,
'has_change_permission': True,
'has_file_field': False,
'has_absolute_url': False,
'auto_populated_fields': (),
'bound_field_sets': (),
'first_form_field_id': 'id_username',
'opts': User._meta,
'username_help_text': User._meta.get_field('username').help_text,
}, context_instance=template.RequestContext(request))
user_add_stage = staff_member_required(user_add_stage)

View File

@ -46,7 +46,7 @@ def staff_member_required(view_func):
member, displaying the login page if necessary. member, displaying the login page if necessary.
""" """
def _checklogin(request, *args, **kwargs): def _checklogin(request, *args, **kwargs):
if not request.user.is_anonymous() and request.user.is_staff: if request.user.is_authenticated() and request.user.is_staff:
# The user is valid. Continue to the admin page. # The user is valid. Continue to the admin page.
if request.POST.has_key('post_data'): if request.POST.has_key('post_data'):
# User must have re-authenticated through a different window # User must have re-authenticated through a different window
@ -87,7 +87,7 @@ def staff_member_required(view_func):
# The user data is correct; log in the user in and continue. # The user data is correct; log in the user in and continue.
else: else:
if user.is_staff: if user.is_active and user.is_staff:
login(request, user) login(request, user)
# TODO: set last_login with an event. # TODO: set last_login with an event.
user.last_login = datetime.datetime.now() user.last_login = datetime.datetime.now()

View File

@ -28,7 +28,7 @@ def bookmarklets(request):
# Hack! This couples this view to the URL it lives at. # Hack! This couples this view to the URL it lives at.
admin_root = request.path[:-len('doc/bookmarklets/')] admin_root = request.path[:-len('doc/bookmarklets/')]
return render_to_response('admin_doc/bookmarklets.html', { return render_to_response('admin_doc/bookmarklets.html', {
'admin_url': "%s://%s%s" % (os.environ.get('HTTPS') == 'on' and 'https' or 'http', get_host(request), admin_root), 'admin_url': "%s://%s%s" % (request.is_secure() and 'https' or 'http', get_host(request), admin_root),
}, context_instance=RequestContext(request)) }, context_instance=RequestContext(request))
bookmarklets = staff_member_required(bookmarklets) bookmarklets = staff_member_required(bookmarklets)
@ -43,11 +43,11 @@ def template_tag_index(request):
for tag_name, tag_func in library.tags.items(): for tag_name, tag_func in library.tags.items():
title, body, metadata = utils.parse_docstring(tag_func.__doc__) title, body, metadata = utils.parse_docstring(tag_func.__doc__)
if title: if title:
title = utils.parse_rst(title, 'tag', 'tag:' + tag_name) title = utils.parse_rst(title, 'tag', _('tag:') + tag_name)
if body: if body:
body = utils.parse_rst(body, 'tag', 'tag:' + tag_name) body = utils.parse_rst(body, 'tag', _('tag:') + tag_name)
for key in metadata: for key in metadata:
metadata[key] = utils.parse_rst(metadata[key], 'tag', 'tag:' + tag_name) metadata[key] = utils.parse_rst(metadata[key], 'tag', _('tag:') + tag_name)
if library in template.builtins: if library in template.builtins:
tag_library = None tag_library = None
else: else:
@ -74,11 +74,11 @@ def template_filter_index(request):
for filter_name, filter_func in library.filters.items(): for filter_name, filter_func in library.filters.items():
title, body, metadata = utils.parse_docstring(filter_func.__doc__) title, body, metadata = utils.parse_docstring(filter_func.__doc__)
if title: if title:
title = utils.parse_rst(title, 'filter', 'filter:' + filter_name) title = utils.parse_rst(title, 'filter', _('filter:') + filter_name)
if body: if body:
body = utils.parse_rst(body, 'filter', 'filter:' + filter_name) body = utils.parse_rst(body, 'filter', _('filter:') + filter_name)
for key in metadata: for key in metadata:
metadata[key] = utils.parse_rst(metadata[key], 'filter', 'filter:' + filter_name) metadata[key] = utils.parse_rst(metadata[key], 'filter', _('filter:') + filter_name)
if library in template.builtins: if library in template.builtins:
tag_library = None tag_library = None
else: else:
@ -132,11 +132,11 @@ def view_detail(request, view):
raise Http404 raise Http404
title, body, metadata = utils.parse_docstring(view_func.__doc__) title, body, metadata = utils.parse_docstring(view_func.__doc__)
if title: if title:
title = utils.parse_rst(title, 'view', 'view:' + view) title = utils.parse_rst(title, 'view', _('view:') + view)
if body: if body:
body = utils.parse_rst(body, 'view', 'view:' + view) body = utils.parse_rst(body, 'view', _('view:') + view)
for key in metadata: for key in metadata:
metadata[key] = utils.parse_rst(metadata[key], 'model', 'view:' + view) metadata[key] = utils.parse_rst(metadata[key], 'model', _('view:') + view)
return render_to_response('admin_doc/view_detail.html', { return render_to_response('admin_doc/view_detail.html', {
'name': view, 'name': view,
'summary': title, 'summary': title,
@ -161,14 +161,14 @@ def model_detail(request, app_label, model_name):
try: try:
app_mod = models.get_app(app_label) app_mod = models.get_app(app_label)
except ImproperlyConfigured: except ImproperlyConfigured:
raise Http404, "App %r not found" % app_label raise Http404, _("App %r not found") % app_label
model = None model = None
for m in models.get_models(app_mod): for m in models.get_models(app_mod):
if m._meta.object_name.lower() == model_name: if m._meta.object_name.lower() == model_name:
model = m model = m
break break
if model is None: if model is None:
raise Http404, "Model %r not found in app %r" % (model_name, app_label) raise Http404, _("Model %r not found in app %r") % (model_name, app_label)
opts = model._meta opts = model._meta
@ -180,7 +180,7 @@ def model_detail(request, app_label, model_name):
if isinstance(field, models.ForeignKey): if isinstance(field, models.ForeignKey):
data_type = related_object_name = field.rel.to.__name__ data_type = related_object_name = field.rel.to.__name__
app_label = field.rel.to._meta.app_label app_label = field.rel.to._meta.app_label
verbose = utils.parse_rst(("the related `%s.%s` object" % (app_label, data_type)), 'model', 'model:' + data_type) verbose = utils.parse_rst((_("the related `%s.%s` object") % (app_label, data_type)), 'model', _('model:') + data_type)
else: else:
data_type = get_readable_field_data_type(field) data_type = get_readable_field_data_type(field)
verbose = field.verbose_name verbose = field.verbose_name
@ -202,7 +202,7 @@ def model_detail(request, app_label, model_name):
continue continue
verbose = func.__doc__ verbose = func.__doc__
if verbose: if verbose:
verbose = utils.parse_rst(utils.trim_docstring(verbose), 'model', 'model:' + opts.module_name) verbose = utils.parse_rst(utils.trim_docstring(verbose), 'model', _('model:') + opts.module_name)
fields.append({ fields.append({
'name': func_name, 'name': func_name,
'data_type': get_return_data_type(func_name), 'data_type': get_return_data_type(func_name),
@ -211,22 +211,22 @@ def model_detail(request, app_label, model_name):
# Gather related objects # Gather related objects
for rel in opts.get_all_related_objects(): for rel in opts.get_all_related_objects():
verbose = "related `%s.%s` objects" % (rel.opts.app_label, rel.opts.object_name) verbose = _("related `%s.%s` objects") % (rel.opts.app_label, rel.opts.object_name)
accessor = rel.get_accessor_name() accessor = rel.get_accessor_name()
fields.append({ fields.append({
'name' : "%s.all" % accessor, 'name' : "%s.all" % accessor,
'data_type' : 'List', 'data_type' : 'List',
'verbose' : utils.parse_rst("all " + verbose , 'model', 'model:' + opts.module_name), 'verbose' : utils.parse_rst(_("all %s") % verbose , 'model', _('model:') + opts.module_name),
}) })
fields.append({ fields.append({
'name' : "%s.count" % accessor, 'name' : "%s.count" % accessor,
'data_type' : 'Integer', 'data_type' : 'Integer',
'verbose' : utils.parse_rst("number of " + verbose , 'model', 'model:' + opts.module_name), 'verbose' : utils.parse_rst(_("number of %s") % verbose , 'model', _('model:') + opts.module_name),
}) })
return render_to_response('admin_doc/model_detail.html', { return render_to_response('admin_doc/model_detail.html', {
'name': '%s.%s' % (opts.app_label, opts.object_name), 'name': '%s.%s' % (opts.app_label, opts.object_name),
'summary': "Fields on %s objects" % opts.object_name, 'summary': _("Fields on %s objects") % opts.object_name,
'description': model.__doc__, 'description': model.__doc__,
'fields': fields, 'fields': fields,
}, context_instance=RequestContext(request)) }, context_instance=RequestContext(request))
@ -328,15 +328,19 @@ def extract_views_from_urlpatterns(urlpatterns, base=''):
""" """
views = [] views = []
for p in urlpatterns: for p in urlpatterns:
if hasattr(p, 'get_callback'): if hasattr(p, '_get_callback'):
try: try:
views.append((p.get_callback(), base + p.regex.pattern)) views.append((p._get_callback(), base + p.regex.pattern))
except ViewDoesNotExist: except ViewDoesNotExist:
continue continue
elif hasattr(p, '_get_url_patterns'): elif hasattr(p, '_get_url_patterns'):
views.extend(extract_views_from_urlpatterns(p.url_patterns, base + p.regex.pattern)) try:
patterns = p.url_patterns
except ImportError:
continue
views.extend(extract_views_from_urlpatterns(patterns, base + p.regex.pattern))
else: else:
raise TypeError, "%s does not appear to be a urlpattern object" % p raise TypeError, _("%s does not appear to be a urlpattern object") % p
return views return views
named_group_matcher = re.compile(r'\(\?P(<\w+>).+?\)') named_group_matcher = re.compile(r'\(\?P(<\w+>).+?\)')

View File

@ -10,9 +10,6 @@ from django.shortcuts import get_object_or_404, render_to_response
from django.db import models from django.db import models
from django.db.models.query import handle_legacy_orderlist, QuerySet from django.db.models.query import handle_legacy_orderlist, QuerySet
from django.http import Http404, HttpResponse, HttpResponseRedirect from django.http import Http404, HttpResponse, HttpResponseRedirect
from django.template import loader
from django.utils import dateformat
from django.utils.dates import MONTHS
from django.utils.html import escape from django.utils.html import escape
from django.utils.text import capfirst, get_text_list from django.utils.text import capfirst, get_text_list
import operator import operator
@ -266,6 +263,8 @@ def add_stage(request, app_label, model_name, show_delete=False, form_url='', po
post_url_continue += "?_popup=1" post_url_continue += "?_popup=1"
return HttpResponseRedirect(post_url_continue % pk_value) return HttpResponseRedirect(post_url_continue % pk_value)
if request.POST.has_key("_popup"): if request.POST.has_key("_popup"):
if type(pk_value) is str: # Quote if string, so JavaScript doesn't think it's a variable.
pk_value = '"%s"' % pk_value.replace('"', '\\"')
return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \ return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
(pk_value, str(new_object).replace('"', '\\"'))) (pk_value, str(new_object).replace('"', '\\"')))
elif request.POST.has_key("_addanother"): elif request.POST.has_key("_addanother"):
@ -455,7 +454,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current
if related.opts.admin and has_related_objs: if related.opts.admin and has_related_objs:
p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission()) p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission())
if not user.has_perm(p): if not user.has_perm(p):
perms_needed.add(rel_opts_name) perms_needed.add(related.opts.verbose_name)
for related in opts.get_all_related_many_to_many_objects(): for related in opts.get_all_related_many_to_many_objects():
if related.opts in opts_seen: if related.opts in opts_seen:
continue continue
@ -714,10 +713,22 @@ class ChangeList(object):
qs = qs.order_by((self.order_type == 'desc' and '-' or '') + lookup_order_field) qs = qs.order_by((self.order_type == 'desc' and '-' or '') + lookup_order_field)
# Apply keyword searches. # Apply keyword searches.
def construct_search(field_name):
if field_name.startswith('^'):
return "%s__istartswith" % field_name[1:]
elif field_name.startswith('='):
return "%s__iexact" % field_name[1:]
elif field_name.startswith('@'):
return "%s__search" % field_name[1:]
else:
return "%s__icontains" % field_name
if self.lookup_opts.admin.search_fields and self.query: if self.lookup_opts.admin.search_fields and self.query:
for bit in self.query.split(): for bit in self.query.split():
or_queries = [models.Q(**{'%s__icontains' % field_name: bit}) for field_name in self.lookup_opts.admin.search_fields] or_queries = [models.Q(**{construct_search(field_name): bit}) for field_name in self.lookup_opts.admin.search_fields]
other_qs = QuerySet(self.model) other_qs = QuerySet(self.model)
if qs._select_related:
other_qs = other_qs.select_related()
other_qs = other_qs.filter(reduce(operator.or_, or_queries)) other_qs = other_qs.filter(reduce(operator.or_, or_queries))
qs = qs & other_qs qs = qs & other_qs

View File

@ -22,7 +22,7 @@ def template_validator(request):
new_data = request.POST.copy() new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data) errors = manipulator.get_validation_errors(new_data)
if not errors: if not errors:
request.user.add_message('The template is valid.') request.user.message_set.create(message='The template is valid.')
return render_to_response('admin/template_validator.html', { return render_to_response('admin/template_validator.html', {
'title': 'Template validator', 'title': 'Template validator',
'form': forms.FormWrapper(manipulator, new_data, errors), 'form': forms.FormWrapper(manipulator, new_data, errors),
@ -32,7 +32,7 @@ template_validator = staff_member_required(template_validator)
class TemplateValidator(forms.Manipulator): class TemplateValidator(forms.Manipulator):
def __init__(self, settings_modules): def __init__(self, settings_modules):
self.settings_modules = settings_modules self.settings_modules = settings_modules
site_list = Site.objects.get_in_bulk(settings_modules.keys()).values() site_list = Site.objects.in_bulk(settings_modules.keys()).values()
self.fields = ( self.fields = (
forms.SelectField('site', is_required=True, choices=[(s.id, s.name) for s in site_list]), forms.SelectField('site', is_required=True, choices=[(s.id, s.name) for s in site_list]),
forms.LargeTextField('template', is_required=True, rows=25, validator_list=[self.isValidTemplate]), forms.LargeTextField('template', is_required=True, rows=25, validator_list=[self.isValidTemplate]),

View File

@ -38,7 +38,7 @@ def authenticate(**credentials):
if user is None: if user is None:
continue continue
# Annotate the user object with the path of the backend. # Annotate the user object with the path of the backend.
user.backend = str(backend.__class__) user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__)
return user return user
def login(request, user): def login(request, user):
@ -56,8 +56,14 @@ def logout(request):
""" """
Remove the authenticated user's ID from the request. Remove the authenticated user's ID from the request.
""" """
del request.session[SESSION_KEY] try:
del request.session[BACKEND_SESSION_KEY] del request.session[SESSION_KEY]
except KeyError:
pass
try:
del request.session[BACKEND_SESSION_KEY]
except KeyError:
pass
def get_user(request): def get_user(request):
from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import AnonymousUser

View File

@ -1,4 +1,4 @@
from django.contrib.auth.models import User, check_password from django.contrib.auth.models import User
class ModelBackend: class ModelBackend:
""" """

View File

@ -46,6 +46,7 @@ def createsuperuser(username=None, email=None, password=None):
if not username.isalnum(): if not username.isalnum():
sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n") sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n")
username = None username = None
continue
try: try:
User.objects.get(username=username) User.objects.get(username=username)
except User.DoesNotExist: except User.DoesNotExist:

View File

@ -13,14 +13,24 @@ def user_passes_test(test_func, login_url=LOGIN_URL):
if test_func(request.user): if test_func(request.user):
return view_func(request, *args, **kwargs) return view_func(request, *args, **kwargs)
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path()))) return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path())))
_checklogin.__doc__ = view_func.__doc__
_checklogin.__dict__ = view_func.__dict__
return _checklogin return _checklogin
return _dec return _dec
login_required = user_passes_test(lambda u: not u.is_anonymous()) login_required = user_passes_test(lambda u: u.is_authenticated())
login_required.__doc__ = ( login_required.__doc__ = (
""" """
Decorator for views that checks that the user is logged in, redirecting Decorator for views that checks that the user is logged in, redirecting
to the log-in page if necessary. to the log-in page if necessary.
""" """
) )
def permission_required(perm, login_url=LOGIN_URL):
"""
Decorator for views that checks whether a user has a particular permission
enabled, redirecting to the log-in page if necessary.
"""
return user_passes_test(lambda u: u.has_perm(perm), login_url=login_url)

View File

@ -5,6 +5,28 @@ from django.template import Context, loader
from django.core import validators from django.core import validators
from django import forms from django import forms
class UserCreationForm(forms.Manipulator):
"A form that creates a user, with no privileges, from the given username and password."
def __init__(self):
self.fields = (
forms.TextField(field_name='username', length=30, maxlength=30, is_required=True,
validator_list=[validators.isAlphaNumeric, self.isValidUsername]),
forms.PasswordField(field_name='password1', length=30, maxlength=60, is_required=True),
forms.PasswordField(field_name='password2', length=30, maxlength=60, is_required=True,
validator_list=[validators.AlwaysMatchesOtherField('password1', _("The two password fields didn't match."))]),
)
def isValidUsername(self, field_data, all_data):
try:
User.objects.get(username=field_data)
except User.DoesNotExist:
return
raise validators.ValidationError, _('A user with that username already exists.')
def save(self, new_data):
"Creates the user."
return User.objects.create_user(new_data['username'], '', new_data['password1'])
class AuthenticationForm(forms.Manipulator): class AuthenticationForm(forms.Manipulator):
""" """
Base class for authenticating users. Extend this to get a form that accepts Base class for authenticating users. Extend this to get a form that accepts
@ -59,9 +81,9 @@ class PasswordResetForm(forms.Manipulator):
try: try:
self.user_cache = User.objects.get(email__iexact=new_data) self.user_cache = User.objects.get(email__iexact=new_data)
except User.DoesNotExist: except User.DoesNotExist:
raise validators.ValidationError, "That e-mail address doesn't have an associated user acount. Are you sure you've registered?" raise validators.ValidationError, _("That e-mail address doesn't have an associated user account. Are you sure you've registered?")
def save(self, domain_override=None): def save(self, domain_override=None, email_template_name='registration/password_reset_email.html'):
"Calculates a new password randomly and sends it to the user" "Calculates a new password randomly and sends it to the user"
from django.core.mail import send_mail from django.core.mail import send_mail
new_pass = User.objects.make_random_password() new_pass = User.objects.make_random_password()
@ -73,7 +95,7 @@ class PasswordResetForm(forms.Manipulator):
domain = current_site.domain domain = current_site.domain
else: else:
site_name = domain = domain_override site_name = domain = domain_override
t = loader.get_template('registration/password_reset_email.html') t = loader.get_template(email_template_name)
c = { c = {
'new_password': new_pass, 'new_password': new_pass,
'email': self.user_cache.email, 'email': self.user_cache.email,
@ -91,14 +113,14 @@ class PasswordChangeForm(forms.Manipulator):
forms.PasswordField(field_name="old_password", length=30, maxlength=30, is_required=True, forms.PasswordField(field_name="old_password", length=30, maxlength=30, is_required=True,
validator_list=[self.isValidOldPassword]), validator_list=[self.isValidOldPassword]),
forms.PasswordField(field_name="new_password1", length=30, maxlength=30, is_required=True, forms.PasswordField(field_name="new_password1", length=30, maxlength=30, is_required=True,
validator_list=[validators.AlwaysMatchesOtherField('new_password2', "The two 'new password' fields didn't match.")]), validator_list=[validators.AlwaysMatchesOtherField('new_password2', _("The two 'new password' fields didn't match."))]),
forms.PasswordField(field_name="new_password2", length=30, maxlength=30, is_required=True), forms.PasswordField(field_name="new_password2", length=30, maxlength=30, is_required=True),
) )
def isValidOldPassword(self, new_data, all_data): def isValidOldPassword(self, new_data, all_data):
"Validates that the old_password field is correct." "Validates that the old_password field is correct."
if not self.user.check_password(new_data): if not self.user.check_password(new_data):
raise validators.ValidationError, "Your old password was entered incorrectly. Please enter it again." raise validators.ValidationError, _("Your old password was entered incorrectly. Please enter it again.")
def save(self, new_data): def save(self, new_data):
"Saves the new password." "Saves the new password."

View File

@ -22,6 +22,8 @@ def authenhandler(req, **kwargs):
os.environ['DJANGO_SETTINGS_MODULE'] = settings_module os.environ['DJANGO_SETTINGS_MODULE'] = settings_module
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django import db
db.reset_queries()
# check that the username is valid # check that the username is valid
kwargs = {'username': req.user, 'is_active': True} kwargs = {'username': req.user, 'is_active': True}
@ -30,18 +32,21 @@ def authenhandler(req, **kwargs):
if superuser_only: if superuser_only:
kwargs['is_superuser'] = True kwargs['is_superuser'] = True
try: try:
user = User.objects.get(**kwargs) try:
except User.DoesNotExist: user = User.objects.get(**kwargs)
return apache.HTTP_UNAUTHORIZED except User.DoesNotExist:
return apache.HTTP_UNAUTHORIZED
# check the password and any permission given
if user.check_password(req.get_basic_auth_pw()): # check the password and any permission given
if permission_name: if user.check_password(req.get_basic_auth_pw()):
if user.has_perm(permission_name): if permission_name:
return apache.OK if user.has_perm(permission_name):
return apache.OK
else:
return apache.HTTP_UNAUTHORIZED
else: else:
return apache.HTTP_UNAUTHORIZED return apache.OK
else: else:
return apache.OK return apache.HTTP_UNAUTHORIZED
else: finally:
return apache.HTTP_UNAUTHORIZED db.connection.close()

View File

@ -16,7 +16,7 @@ def _get_all_permissions(opts):
perms.append((_get_permission_codename(action, opts), 'Can %s %s' % (action, opts.verbose_name))) perms.append((_get_permission_codename(action, opts), 'Can %s %s' % (action, opts.verbose_name)))
return perms + list(opts.permissions) return perms + list(opts.permissions)
def create_permissions(app, created_models): def create_permissions(app, created_models, verbosity):
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import Permission from django.contrib.auth.models import Permission
app_models = get_models(app) app_models = get_models(app)
@ -27,13 +27,13 @@ def create_permissions(app, created_models):
for codename, name in _get_all_permissions(klass._meta): for codename, name in _get_all_permissions(klass._meta):
p, created = Permission.objects.get_or_create(codename=codename, content_type__pk=ctype.id, p, created = Permission.objects.get_or_create(codename=codename, content_type__pk=ctype.id,
defaults={'name': name, 'content_type': ctype}) defaults={'name': name, 'content_type': ctype})
if created: if created and verbosity >= 2:
print "Adding permission '%s'" % p print "Adding permission '%s'" % p
def create_superuser(app, created_models): def create_superuser(app, created_models, verbosity, **kwargs):
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.contrib.auth.create_superuser import createsuperuser as do_create from django.contrib.auth.create_superuser import createsuperuser as do_create
if User in created_models: if User in created_models and kwargs.get('interactive', True):
msg = "\nYou just installed Django's auth system, which means you don't have " \ msg = "\nYou just installed Django's auth system, which means you don't have " \
"any superusers defined.\nWould you like to create one now? (yes/no): " "any superusers defined.\nWould you like to create one now? (yes/no): "
confirm = raw_input(msg) confirm = raw_input(msg)

View File

@ -1,12 +1,9 @@
class LazyUser(object): class LazyUser(object):
def __init__(self):
self._user = None
def __get__(self, request, obj_type=None): def __get__(self, request, obj_type=None):
if self._user is None: if not hasattr(request, '_cached_user'):
from django.contrib.auth import get_user from django.contrib.auth import get_user
self._user = get_user(request) request._cached_user = get_user(request)
return self._user return request._cached_user
class AuthenticationMiddleware(object): class AuthenticationMiddleware(object):
def process_request(self, request): def process_request(self, request):

View File

@ -1,4 +1,5 @@
from django.core import validators from django.core import validators
from django.core.exceptions import ImproperlyConfigured
from django.db import backend, connection, models from django.db import backend, connection, models
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -32,7 +33,7 @@ class Permission(models.Model):
Permissions are set globally per type of object, not per specific object instance. It is possible to say "Mary may change news stories," but it's not currently possible to say "Mary may change news stories, but only the ones she created herself" or "Mary may only change news stories that have a certain status or publication date." Permissions are set globally per type of object, not per specific object instance. It is possible to say "Mary may change news stories," but it's not currently possible to say "Mary may change news stories, but only the ones she created herself" or "Mary may only change news stories that have a certain status or publication date."
Three basic permissions -- add, create and delete -- are automatically created for each Django model. Three basic permissions -- add, change and delete -- are automatically created for each Django model.
""" """
name = models.CharField(_('name'), maxlength=50) name = models.CharField(_('name'), maxlength=50)
content_type = models.ForeignKey(ContentType) content_type = models.ForeignKey(ContentType)
@ -91,9 +92,9 @@ class User(models.Model):
last_name = models.CharField(_('last name'), maxlength=30, blank=True) last_name = models.CharField(_('last name'), maxlength=30, blank=True)
email = models.EmailField(_('e-mail address'), blank=True) email = models.EmailField(_('e-mail address'), blank=True)
password = models.CharField(_('password'), maxlength=128, help_text=_("Use '[algo]$[salt]$[hexdigest]'")) password = models.CharField(_('password'), maxlength=128, help_text=_("Use '[algo]$[salt]$[hexdigest]'"))
is_staff = models.BooleanField(_('staff status'), help_text=_("Designates whether the user can log into this admin site.")) is_staff = models.BooleanField(_('staff status'), default=False, help_text=_("Designates whether the user can log into this admin site."))
is_active = models.BooleanField(_('active'), default=True, help_text=_("Designates whether this user can log into the Django admin. Unselect this instead of deleting accounts.")) is_active = models.BooleanField(_('active'), default=True, help_text=_("Designates whether this user can log into the Django admin. Unselect this instead of deleting accounts."))
is_superuser = models.BooleanField(_('superuser status'), help_text=_("Designates that this user has all permissions without explicitly assigning them.")) is_superuser = models.BooleanField(_('superuser status'), default=False, help_text=_("Designates that this user has all permissions without explicitly assigning them."))
last_login = models.DateTimeField(_('last login'), default=models.LazyDate()) last_login = models.DateTimeField(_('last login'), default=models.LazyDate())
date_joined = models.DateTimeField(_('date joined'), default=models.LazyDate()) date_joined = models.DateTimeField(_('date joined'), default=models.LazyDate())
groups = models.ManyToManyField(Group, verbose_name=_('groups'), blank=True, groups = models.ManyToManyField(Group, verbose_name=_('groups'), blank=True,
@ -126,6 +127,11 @@ class User(models.Model):
"Always returns False. This is a way of comparing User objects to anonymous users." "Always returns False. This is a way of comparing User objects to anonymous users."
return False return False
def is_authenticated(self):
"""Always return True. This is a way to tell if the user has been authenticated in templates.
"""
return True
def get_full_name(self): def get_full_name(self):
"Returns the first_name plus the last_name, with a space in between." "Returns the first_name plus the last_name, with a space in between."
full_name = '%s %s' % (self.first_name, self.last_name) full_name = '%s %s' % (self.first_name, self.last_name)
@ -210,6 +216,8 @@ class User(models.Model):
def has_module_perms(self, app_label): def has_module_perms(self, app_label):
"Returns True if the user has any permissions in the given app label." "Returns True if the user has any permissions in the given app label."
if not self.is_active:
return False
if self.is_superuser: if self.is_superuser:
return True return True
return bool(len([p for p in self.get_all_permissions() if p[:p.index('.')] == app_label])) return bool(len([p for p in self.get_all_permissions() if p[:p.index('.')] == app_label]))
@ -262,6 +270,15 @@ class AnonymousUser(object):
def __str__(self): def __str__(self):
return 'AnonymousUser' return 'AnonymousUser'
def __eq__(self, other):
return isinstance(other, self.__class__)
def __ne__(self, other):
return not self.__eq__(other)
def __hash__(self):
return 1 # instances always return the same hash value
def save(self): def save(self):
raise NotImplementedError raise NotImplementedError
@ -293,3 +310,6 @@ class AnonymousUser(object):
def is_anonymous(self): def is_anonymous(self):
return True return True
def is_authenticated(self):
return False

View File

@ -4,7 +4,7 @@ from django import forms
from django.shortcuts import render_to_response from django.shortcuts import render_to_response
from django.template import RequestContext from django.template import RequestContext
from django.contrib.sites.models import Site from django.contrib.sites.models import Site
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME from django.contrib.auth import LOGIN_URL, REDIRECT_FIELD_NAME
@ -34,9 +34,8 @@ def login(request, template_name='registration/login.html'):
def logout(request, next_page=None, template_name='registration/logged_out.html'): def logout(request, next_page=None, template_name='registration/logged_out.html'):
"Logs out the user and displays 'You are logged out' message." "Logs out the user and displays 'You are logged out' message."
from django.contrib.auth import logout from django.contrib.auth import logout
try: logout(request)
logout(request) if next_page is None:
except KeyError:
return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request)) return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
else: else:
# Redirect to this page until the session has been cleared. # Redirect to this page until the session has been cleared.
@ -50,7 +49,8 @@ def redirect_to_login(next, login_url=LOGIN_URL):
"Redirects the user to the login page, passing the given 'next' page" "Redirects the user to the login page, passing the given 'next' page"
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, next)) return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, next))
def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html'): def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html',
email_template_name='registration/password_reset_email.html'):
new_data, errors = {}, {} new_data, errors = {}, {}
form = PasswordResetForm() form = PasswordResetForm()
if request.POST: if request.POST:
@ -58,9 +58,9 @@ def password_reset(request, is_admin_site=False, template_name='registration/pas
errors = form.get_validation_errors(new_data) errors = form.get_validation_errors(new_data)
if not errors: if not errors:
if is_admin_site: if is_admin_site:
form.save(request.META['HTTP_HOST']) form.save(domain_override=request.META['HTTP_HOST'])
else: else:
form.save() form.save(email_template_name=email_template_name)
return HttpResponseRedirect('%sdone/' % request.path) return HttpResponseRedirect('%sdone/' % request.path)
return render_to_response(template_name, {'form': forms.FormWrapper(form, new_data, errors)}, return render_to_response(template_name, {'form': forms.FormWrapper(form, new_data, errors)},
context_instance=RequestContext(request)) context_instance=RequestContext(request))

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