1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +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
interface, pretty error pages, official Web site (djangoproject.com) and has
made many other contributions.
made many other contributions. He makes us look good.
Malcolm Tredinnick <http://www.pointy-stick.com/blog/>, who has made
significant contributions to all levels of the framework, from its database
layer to template system and documentation.
Georg "Hugo" Bauer <http://hugo.muensterland.org/>, who added
internationalization support, manages i18n contributions and has made a ton
of excellent tweaks, feature additions and bug fixes.
Luke Plant <http://lukeplant.me.uk/>, who has contributed many excellent
improvements, including database-level improvements, the CSRF middleware and
unit tests.
Russell Keith-Magee <freakboy@iinet.net.au>, who has contributed many excellent
improvements, including refactoring of the Django ORM code and unit tests.
Robert Wittams <http://robert.wittams.com/>, who majorly refactored the Django
admin application to allow for easier reuse and has made a ton of excellent
tweaks, feature additions and bug fixes.
@ -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
answer newbie questions, and generally made Django that much better:
adurdin@gmail.com
akaihola
Andreas
ant9000@netwise.it
David Ascher <http://ascher.ca/>
Arthur <avandorp@gmail.com>
Jiri Barton
@ -49,18 +62,30 @@ answer newbie questions, and generally made Django that much better:
Amit Chakradeo <http://amit.chakradeo.net/>
ChaosKCW
Ian Clelland <clelland@gmail.com>
crankycoder@gmail.com
Matt Croydon <http://www.postneo.com/>
dackze+django@gmail.com
Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>
Jason Davies (Esaj) <http://www.jasondavies.com/>
Alex Dedul
deric@monowerks.com
dne@mayonnaise.net
Maximillian Dornseif <md@hudora.de>
dummy@habmalnefrage.de
Jeremy Dunck <http://dunck.us/>
Andy Dustman <farcepest@gmail.com>
Clint Ecker
Enrico <rico.bl@gmail.com>
favo@exoweb.net
gandalf@owca.info
Baishampayan Ghose
martin.glueck@gmail.com
Simon Greenhill <dev@simon.net.nz>
Espen Grindhaug <http://grindhaug.org/>
Brant Harris
Hawkeye
heckj@mac.com
Joel Heenan <joelh-django@planetjoel.com>
hipertracker@gmail.com
Ian Holsman <http://feh.holsman.net/>
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/>
jpellerin@gmail.com
junzhang.jn@gmail.com
Russell Keith-Magee <freakboy@iinet.net.au>
Garth Kidd <http://www.deadlybloodyserious.com/>
kilian <kilian.cavalotti@lip6.fr>
Sune Kirkeby <http://ibofobi.dk/>
Cameron Knight (ckknight)
Meir Kriheli <http://mksoft.co.il/>
Bruce Kroeze <http://coderseye.com/>
Joseph Kocherhans
konrad@gwu.edu
lakin.wecker@gmail.com
Stuart Langridge <http://www.kryogenix.org/>
Eugene Lazutkin <http://lazutkin.com/blog/>
Jeong-Min Lee
Christopher Lenz <http://www.cmlenz.net/>
lerouxb@gmail.com
limodou
mattmcc
Martin Maney <http://www.chipy.org/Martin_Maney>
Manuzhai
Petar Marić
mark@junklight.com
mattycakes@gmail.com
Jason McBrayer <http://www.carcosa.net/jason/>
mccutchen@gmail.com
michael.mcewan@gmail.com
mir@noris.de
mmarshall
Eric Moritz <http://eric.themoritzfamily.com/>
Robin Munn <http://www.geekforgod.com/>
Nebojša Dorđević
Fraser Nevett <mail@nevett.org>
Sam Newman <http://www.magpiebrain.com/>
Neal Norwitz <nnorwitz@google.com>
oggie rob <oz.robharvey@gmail.com>
Jay Parlar <parlar@gmail.com>
pgross@thoughtworks.com
phaedo <http://phaedo.cx/>
phil@produxion.net
@ -106,25 +136,35 @@ answer newbie questions, and generally made Django that much better:
plisk
Daniel Poelzleithner <http://poelzi.org/>
J. Rademaker
Michael Radziej <mir@noris.de>
ramiro
Brian Ray <http://brianray.chipy.org/>
rhettg@gmail.com
Oliver Rutherfurd <http://rutherfurd.net/>
Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
David Schein
serbaut@gmail.com
Pete Shinners <pete@shinners.org>
SmileyChris <smileychris@gmail.com>
sopel
Thomas Steinacher <tom@eggdrop.ch>
Radek Švarz <http://www.svarz.cz/translate/>
Swaroop C H <http://www.swaroopch.info>
Aaron Swartz <http://www.aaronsw.com/>
Tyson Tate <tyson@fallingbullets.com>
Tom Tobin
Tom Insam
Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>
Malcolm Tredinnick
Karen Tracey <graybark@bellsouth.net>
Amit Upadhyay
Geert Vanderkelen
Milton Waddams
Dan Watson <http://theidioteque.net/>
Rachel Willmer <http://www.willmer.com/kb/>
Gary Wilson <gary.wilson@gmail.com>
wojtek
ye7cakf02@sneakemail.com
ymasuda@ethercube.com
Cheng Zhang
A big THANK YOU goes to:

19
INSTALL
View File

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

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:
* 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
http://groups-beta.google.com/group/django-users.
http://groups.google.com/group/django-users.
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 sys
import getopt
def compile_messages():
basedir = None
@ -12,15 +11,25 @@ def compile_messages():
elif os.path.isdir('locale'):
basedir = os.path.abspath('locale')
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)
for (dirpath, dirnames, filenames) in os.walk(basedir):
for dirpath, dirnames, filenames in os.walk(basedir):
for f in filenames:
if f.endswith('.po'):
sys.stderr.write('processing file %s in %s\n' % (f, dirpath))
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)
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
DOCUMENTATION_DIRECTORY = '/home/html/documentation/'
def clean_up():
# Clean up old database records
cursor = connection.cursor()
cursor.execute("DELETE FROM %s WHERE %s < NOW()" % \
(backend.quote_name('core_sessions'), 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')))
(backend.quote_name('django_session'), backend.quote_name('expire_date')))
transaction.commit_unless_managed()
if __name__ == "__main__":

View File

@ -1,5 +1,9 @@
#!/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
import re
import os

View File

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

View File

@ -46,6 +46,7 @@ LANGUAGES = (
('en', gettext_noop('English')),
('es', gettext_noop('Spanish')),
('es_AR', gettext_noop('Argentinean Spanish')),
('fi', gettext_noop('Finnish')),
('fr', gettext_noop('French')),
('gl', gettext_noop('Galician')),
('hu', gettext_noop('Hungarian')),
@ -55,6 +56,7 @@ LANGUAGES = (
('ja', gettext_noop('Japanese')),
('nl', gettext_noop('Dutch')),
('no', gettext_noop('Norwegian')),
('pl', gettext_noop('Polish')),
('pt-br', gettext_noop('Brazilian')),
('ro', gettext_noop('Romanian')),
('ru', gettext_noop('Russian')),
@ -62,6 +64,8 @@ LANGUAGES = (
('sl', gettext_noop('Slovenian')),
('sr', gettext_noop('Serbian')),
('sv', gettext_noop('Swedish')),
('ta', gettext_noop('Tamil')),
('tr', gettext_noop('Turkish')),
('uk', gettext_noop('Ukrainian')),
('zh-cn', gettext_noop('Simplified Chinese')),
('zh-tw', gettext_noop('Traditional Chinese')),
@ -220,10 +224,6 @@ YEAR_MONTH_FORMAT = 'F Y'
# http://www.djangoproject.com/documentation/templates/#now
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?
# Hint: you really don't!
TRANSACTIONS_MANAGED = False
@ -251,6 +251,7 @@ MIDDLEWARE_CLASSES = (
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_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_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
# 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.
# Set to None if you're not using it.
COMMENTS_BANNED_USERS_GROUP = None
@ -294,3 +299,14 @@ BANNED_IPS = ()
##################
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
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Django 1.0\n"
"Report-Msgid-Bugs-To: Django-users Japan <django-ja@googlegroups.com>\n"
"POT-Creation-Date: 2006-05-02 23:06+0900\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-06 00:30+0900\n"
"PO-Revision-Date: 2006-05-08 13:39+0900\n"
"Last-Translator: makoto tsuyuki <mtsuyuki@gmail.com>\n"
"Language-Team: Japanese <django-ja@googlegroups.com>\n"
@ -61,50 +61,58 @@ msgstr "選択してクリック"
msgid "Clear all"
msgstr "全てクリア"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:45
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:80
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:34
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:72
msgid "Show"
msgstr "表示"
#: contrib/admin/media/js/admin/CollapsedFieldsets.js:63
msgid "Hide"
msgstr "非表示"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:47
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
msgid "Now"
msgstr "現在"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:48
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:51
msgid "Clock"
msgstr "時計"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:77
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:78
msgid "Choose a time"
msgstr "時間を選択"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:81
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "Midnight"
msgstr "夜中"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "6 a.m."
msgstr "午前 6 時"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:84
msgid "Noon"
msgstr "正午"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:87
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:168
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:88
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:183
msgid "Cancel"
msgstr "キャンセル"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:111
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:162
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:128
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:177
msgid "Today"
msgstr "今日"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:114
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:132
msgid "Calendar"
msgstr "カレンダー"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:160
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:175
msgid "Yesterday"
msgstr "昨日"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:164
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:179
msgid "Tomorrow"
msgstr "明日"

View File

@ -264,7 +264,7 @@ msgstr "Bare POST er tillatt"
#: contrib/comments/views/comments.py:193
#: contrib/comments/views/comments.py:284
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:286
@ -371,35 +371,32 @@ msgid "All"
msgstr "Alle"
#: contrib/admin/filterspecs.py:109
#, fuzzy
msgid "Any date"
msgstr "Alle datoer"
msgstr "Når som helst"
#: contrib/admin/filterspecs.py:110
#, fuzzy
msgid "Today"
msgstr "Mondag"
msgstr "I dag"
#: contrib/admin/filterspecs.py:113
msgid "Past 7 days"
msgstr ""
msgstr "Siste 7 dager"
#: contrib/admin/filterspecs.py:115
msgid "This month"
msgstr ""
msgstr "Denne måneden"
#: contrib/admin/filterspecs.py:117
msgid "This year"
msgstr ""
msgstr "I år"
#: contrib/admin/filterspecs.py:143
msgid "Yes"
msgstr ""
msgstr "Ja"
#: contrib/admin/filterspecs.py:143
#, fuzzy
msgid "No"
msgstr "Nov."
msgstr "Nei"
#: contrib/admin/filterspecs.py:150
msgid "Unknown"
@ -443,11 +440,13 @@ msgid ""
"Please enter a correct username and password. Note that both fields are case-"
"sensitive."
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/templates/admin/login.html:25
msgid "Log in"
msgstr "Log inn"
msgstr "Logg inn"
#: contrib/admin/views/decorators.py:61
msgid ""
@ -473,12 +472,11 @@ msgstr "Brukernavnet kan ikke inneholde '@'"
#: contrib/admin/views/decorators.py:84
#, python-format
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
#, fuzzy
msgid "Site administration"
msgstr "Django administrasjon"
msgstr "Nettsted administrasjon"
#: contrib/admin/views/main.py:260
#, python-format
@ -502,7 +500,7 @@ msgstr "Ny %s"
#: contrib/admin/views/main.py:336
#, python-format
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:340
@ -559,7 +557,7 @@ msgid "Are you sure?"
msgstr "Er du sikker?"
#: contrib/admin/views/main.py:533
#, fuzzy, python-format
#, python-format
msgid "Change history: %s"
msgstr "Endre historien: %s"
@ -580,7 +578,6 @@ msgid "Integer"
msgstr "Heltall"
#: contrib/admin/views/doc.py:278
#, fuzzy
msgid "Boolean (Either True or False)"
msgstr "Boolean (Enten \"True\" eller \"False\")"
@ -603,7 +600,7 @@ msgstr "Dato/tid"
#: contrib/admin/views/doc.py:283
msgid "E-mail address"
msgstr "Epost adresse"
msgstr "E-post adresse"
#: contrib/admin/views/doc.py:284 contrib/admin/views/doc.py:287
msgid "File path"
@ -614,13 +611,12 @@ msgid "Decimal number"
msgstr "Desimal tall"
#: contrib/admin/views/doc.py:291
#, fuzzy
msgid "Boolean (Either True, False or None)"
msgstr "Boolean (enten \"True\", \"False\" eller \"None\")"
#: contrib/admin/views/doc.py:292
msgid "Relation to parent model"
msgstr ""
msgstr "Relasjon til forelder modell"
#: contrib/admin/views/doc.py:293
msgid "Phone number"
@ -636,7 +632,7 @@ msgstr "Tid"
#: contrib/admin/views/doc.py:300 contrib/flatpages/models.py:7
msgid "URL"
msgstr "Internettadresse"
msgstr "URL"
#: contrib/admin/views/doc.py:301
msgid "U.S. state (two uppercase letters)"
@ -756,12 +752,12 @@ msgstr "Fant ikke siden"
#: contrib/admin/templates/admin/404.html:10
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
#, python-format
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/change_form.html:15
@ -813,7 +809,7 @@ msgid ""
"objects, but your account doesn't have permission to delete the following "
"types of objects:"
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:"
#: contrib/admin/templates/admin/delete_confirmation.html:21
@ -836,11 +832,11 @@ msgstr "Av %(title)s "
#: contrib/admin/templates/admin/search_form.html:8
msgid "Go"
msgstr ""
msgstr ""
#: contrib/admin/templates/admin/change_form.html:21
msgid "View on site"
msgstr "Vis på siden"
msgstr "Vis på nettsted"
#: contrib/admin/templates/admin/change_form.html:30
msgid "Please correct the error below."
@ -900,12 +896,12 @@ msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll reset "
"your password and e-mail the new one to you."
msgstr ""
"Har du glemt passordet ditt? Skriv inn epost adressen din under, så sender "
"vi deg et nytt passord via epost."
"Har du glemt passordet ditt? Skriv inn e-post adressen din under, så sender "
"vi deg et nytt passord via e-post."
#: contrib/admin/templates/registration/password_reset_form.html:16
msgid "E-mail address:"
msgstr "Epost adresse:"
msgstr "E-post adresse:"
#: contrib/admin/templates/registration/password_reset_form.html:16
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
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:10
@ -929,7 +925,7 @@ msgid ""
"We've e-mailed a new password to the e-mail address you submitted. You "
"should be receiving it shortly."
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."
#: 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
msgid "You're receiving this e-mail because you requested a password reset"
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
#, python-format
@ -1036,10 +1032,9 @@ msgid "Edit this object (current window)"
msgstr "Endre dette objektet (åpnes i dette vinduet)"
#: contrib/admin/templates/admin_doc/bookmarklets.html:26
#, fuzzy
msgid "Jumps to the admin page for pages that represent a single object."
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
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
msgid "Date:"
msgstr ""
msgstr "Dato:"
#: contrib/admin/templates/widget/date_time.html:4
#, fuzzy
msgid "Time:"
msgstr "Tid"
msgstr "Tid:"
#: contrib/admin/templates/widget/file.html:2
msgid "Currently:"
msgstr ""
msgstr "Nå:"
#: contrib/admin/templates/widget/file.html:3
#, fuzzy
msgid "Change:"
msgstr "Endre"
msgstr "Endre:"
#: contrib/redirects/models.py:7
msgid "redirect from"
@ -1126,7 +1119,7 @@ msgid ""
"Example: 'flatpages/contact_page'. If this isn't provided, the system will "
"use 'flatpages/default'."
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."
#: contrib/flatpages/models.py:14
@ -1136,7 +1129,7 @@ msgstr "registrering kreves"
#: contrib/flatpages/models.py:14
msgid "If this is checked, only logged-in users will be able to view the page."
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."
#: contrib/flatpages/models.py:18
@ -1156,24 +1149,20 @@ msgid "codename"
msgstr "kodenavn"
#: contrib/auth/models.py:17
#, fuzzy
msgid "permission"
msgstr "Rettighet"
msgstr "rettighet"
#: contrib/auth/models.py:18 contrib/auth/models.py:27
#, fuzzy
msgid "permissions"
msgstr "Rettigheter"
msgstr "rettigheter"
#: contrib/auth/models.py:29
#, fuzzy
msgid "group"
msgstr "Gruppe"
msgstr "gruppe"
#: contrib/auth/models.py:30 contrib/auth/models.py:65
#, fuzzy
msgid "groups"
msgstr "Grupper"
msgstr "grupper"
#: contrib/auth/models.py:55
msgid "username"
@ -1205,7 +1194,7 @@ msgstr "administrasjons status"
#: contrib/auth/models.py:60
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
msgid "active"
@ -1217,7 +1206,7 @@ msgstr "super bruker"
#: contrib/auth/models.py:63
msgid "last login"
msgstr "liste logg inn"
msgstr "siste logg inn"
#: contrib/auth/models.py:64
msgid "date joined"
@ -1232,19 +1221,16 @@ msgstr ""
"tilgang til gruppene han/hun er i."
#: contrib/auth/models.py:67
#, fuzzy
msgid "user permissions"
msgstr "Rettigheter"
#: contrib/auth/models.py:70
#, fuzzy
msgid "user"
msgstr "Bruker"
msgstr "bruker"
#: contrib/auth/models.py:71
#, fuzzy
msgid "users"
msgstr "Brukere"
msgstr "brukere"
#: contrib/auth/models.py:76
msgid "Personal info"
@ -1263,9 +1249,8 @@ msgid "Groups"
msgstr "Grupper"
#: contrib/auth/models.py:219
#, fuzzy
msgid "message"
msgstr "Meldinger"
msgstr "Melding"
#: contrib/auth/forms.py:30
msgid ""
@ -1274,9 +1259,8 @@ msgid ""
msgstr ""
#: contrib/contenttypes/models.py:25
#, fuzzy
msgid "python model class name"
msgstr "python modul navn"
msgstr "python modell klasse navn"
#: contrib/contenttypes/models.py:28
msgid "content type"
@ -1312,23 +1296,23 @@ msgstr "domene navn"
#: contrib/sites/models.py:11
msgid "display name"
msgstr "vist navn"
msgstr "vise navn"
#: contrib/sites/models.py:15
msgid "site"
msgstr "side"
msgstr "nettsted"
#: contrib/sites/models.py:16
msgid "sites"
msgstr "sider"
msgstr "nettsteder"
#: utils/translation.py:360
msgid "DATE_FORMAT"
msgstr "j. M U"
msgstr "j. M Y"
#: utils/translation.py:361
msgid "DATETIME_FORMAT"
msgstr "j. M U - h:i"
msgstr "j. M Y - h:i"
#: utils/translation.py:362
msgid "TIME_FORMAT"
@ -1336,7 +1320,7 @@ msgstr "h:i"
#: utils/dates.py:6
msgid "Monday"
msgstr "Mondag"
msgstr "Mandag"
#: utils/dates.py:6
msgid "Tuesday"
@ -1411,54 +1395,52 @@ msgid "December"
msgstr "Desember"
#: utils/dates.py:19
#, fuzzy
msgid "jan"
msgstr "og"
msgstr "jan"
#: utils/dates.py:19
msgid "feb"
msgstr ""
msgstr "feb"
#: utils/dates.py:19
msgid "mar"
msgstr ""
msgstr "mar"
#: utils/dates.py:19
msgid "apr"
msgstr ""
msgstr "apr"
#: utils/dates.py:19
#, fuzzy
msgid "may"
msgstr "Mai"
msgstr "mai"
#: utils/dates.py:19
msgid "jun"
msgstr ""
msgstr "jun"
#: utils/dates.py:20
msgid "jul"
msgstr ""
msgstr "jul"
#: utils/dates.py:20
msgid "aug"
msgstr ""
msgstr "aug"
#: utils/dates.py:20
msgid "sep"
msgstr ""
msgstr "sep"
#: utils/dates.py:20
msgid "oct"
msgstr ""
msgstr "okt"
#: utils/dates.py:20
msgid "nov"
msgstr ""
msgstr "nov"
#: utils/dates.py:20
msgid "dec"
msgstr ""
msgstr "des"
#: utils/dates.py:27
msgid "Jan."
@ -1466,7 +1448,7 @@ msgstr "Jan."
#: utils/dates.py:27
msgid "Feb."
msgstr "Fef."
msgstr "Feb."
#: utils/dates.py:28
msgid "Aug."
@ -1491,40 +1473,38 @@ msgstr "Des."
#: utils/timesince.py:12
msgid "year"
msgid_plural "years"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "år"
msgstr[1] "år"
#: utils/timesince.py:13
msgid "month"
msgid_plural "months"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "måned"
msgstr[1] "måndeder"
#: utils/timesince.py:14
msgid "week"
msgid_plural "weeks"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "uke"
msgstr[1] "uker"
#: utils/timesince.py:15
#, fuzzy
msgid "day"
msgid_plural "days"
msgstr[0] "Mai"
msgstr[1] "Mai"
msgstr[0] "dag"
msgstr[1] "dager"
#: utils/timesince.py:16
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgstr[1] ""
msgstr[0] "time"
msgstr[1] "timer"
#: utils/timesince.py:17
#, fuzzy
msgid "minute"
msgid_plural "minutes"
msgstr[0] "side"
msgstr[1] "side"
msgstr[0] "minutt"
msgstr[1] "minutter"
#: conf/global_settings.py:37
msgid "Bengali"
@ -1548,7 +1528,7 @@ msgstr "Tysk"
#: conf/global_settings.py:42
msgid "Greek"
msgstr ""
msgstr "Gresk"
#: conf/global_settings.py:43
msgid "English"
@ -1568,11 +1548,11 @@ msgstr "Galisisk"
#: conf/global_settings.py:47
msgid "Hungarian"
msgstr ""
msgstr "Ungarsk"
#: conf/global_settings.py:48
msgid "Hebrew"
msgstr ""
msgstr "Hebraiske"
#: conf/global_settings.py:49
msgid "Icelandic"
@ -1584,11 +1564,11 @@ msgstr "Italiensk"
#: conf/global_settings.py:51
msgid "Japanese"
msgstr ""
msgstr "Japansk"
#: conf/global_settings.py:52
msgid "Dutch"
msgstr ""
msgstr "Nederlandsk"
#: conf/global_settings.py:53
msgid "Norwegian"
@ -1600,7 +1580,7 @@ msgstr "Brasiliansk"
#: conf/global_settings.py:55
msgid "Romanian"
msgstr "Romansk"
msgstr "Rumensk"
#: conf/global_settings.py:56
msgid "Russian"
@ -1611,9 +1591,8 @@ msgid "Slovak"
msgstr "Slovakisk"
#: conf/global_settings.py:58
#, fuzzy
msgid "Slovenian"
msgstr "Slovakisk"
msgstr "Slovensk"
#: conf/global_settings.py:59
msgid "Serbian"
@ -1624,9 +1603,8 @@ msgid "Swedish"
msgstr "Svensk"
#: conf/global_settings.py:61
#, fuzzy
msgid "Ukrainian"
msgstr "Brasiliansk"
msgstr "Ukrainsk"
#: conf/global_settings.py:62
msgid "Simplified Chinese"
@ -1634,14 +1612,13 @@ msgstr "Simplifisert Kinesisk"
#: conf/global_settings.py:63
msgid "Traditional Chinese"
msgstr ""
msgstr "Tradisjonell Kinesisk"
#: core/validators.py:60
msgid "This value must contain only letters, numbers and underscores."
msgstr "Dette feltet må bare inneholde bokstaver, nummer og understreker."
#: core/validators.py:64
#, fuzzy
msgid ""
"This value must contain only letters, numbers, underscores, dashes or "
"slashes."
@ -1651,7 +1628,7 @@ msgstr ""
#: core/validators.py:72
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
msgid "Lowercase letters are not allowed here."
@ -1687,19 +1664,19 @@ msgstr "Skriv inn et helt nummer."
#: core/validators.py:120
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
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
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
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
msgid "Enter a valid e-mail address."
@ -1722,7 +1699,7 @@ msgstr "Internettadressen %s peker ikke til et godkjent bilde."
#, python-format
msgid "Phone numbers must be in XXX-XXX-XXXX format. \"%s\" is invalid."
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
#, python-format
@ -1731,7 +1708,7 @@ msgstr "Internettadressen %s peker ikke til en godkjent QuickTime film."
#: core/validators.py:171
msgid "A valid URL is required."
msgstr "En godkjent internettadresse er påbudt."
msgstr "En godkjent internettadresse er påkrevd."
#: core/validators.py:185
#, python-format
@ -1739,7 +1716,7 @@ msgid ""
"Valid HTML is required. Specific errors are:\n"
"%s"
msgstr ""
"Godkjent HTML er påbudt. Feilene var:\n"
"Godkjent HTML er påkrevd. Feilene var:\n"
"%s"
#: core/validators.py:192
@ -1750,7 +1727,7 @@ msgstr "Ikke godkjent XML: %s"
#: core/validators.py:202
#, python-format
msgid "Invalid URL: %s"
msgstr "Ikke godkjent internettadresse: %s"
msgstr "Ikke godkjent URL: %s"
#: core/validators.py:206 core/validators.py:208
#, python-format
@ -1759,7 +1736,7 @@ msgstr "Internettadresse fører til en side som ikke virker."
#: core/validators.py:214
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
#, python-format
@ -1771,7 +1748,7 @@ msgstr[1] "Pass munnen din! Ordene %s er ikke tillatt her."
#: core/validators.py:236
#, python-format
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
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
#, python-format
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
#, python-format
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
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
msgid "Make sure your uploaded file is at least %s bytes big."
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
#, python-format
msgid "Make sure your uploaded file is at most %s bytes big."
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
msgid "The format for this field is wrong."
@ -1850,7 +1827,7 @@ msgstr "Klarte ikke å motta noe fra %s."
msgid ""
"The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'."
msgstr ""
"Tnternettadressen %(url)s returnerte en ikke godkjent Content-Type '%"
"Internettadressen %(url)s returnerte en ikke godkjent Content-Type '%"
"(contenttype)s'."
#: core/validators.py:462
@ -1859,7 +1836,7 @@ msgid ""
"Please close the unclosed %(tag)s tag from line %(line)s. (Line starts with "
"\"%(start)s\".)"
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\".)"
#: core/validators.py:466
@ -1868,7 +1845,7 @@ msgid ""
"Some text starting on line %(line)s is not allowed in that context. (Line "
"starts with \"%(start)s\".)"
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\".)"
#: core/validators.py:471
@ -1877,7 +1854,7 @@ msgid ""
"\"%(attr)s\" on line %(line)s is an invalid attribute. (Line starts with \"%"
"(start)s\".)"
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\".)"
#: core/validators.py:476
@ -1886,7 +1863,7 @@ msgid ""
"\"<%(tag)s>\" on line %(line)s is an invalid tag. (Line starts with \"%"
"(start)s\".)"
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\".)"
#: core/validators.py:480
@ -1895,7 +1872,7 @@ msgid ""
"A tag on line %(line)s is missing one or more required attributes. (Line "
"starts with \"%(start)s\".)"
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\".)"
#: core/validators.py:485
@ -1904,13 +1881,13 @@ msgid ""
"The \"%(attr)s\" attribute on line %(line)s has an invalid value. (Line "
"starts with \"%(start)s\".)"
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\".)"
#: db/models/manipulators.py:302
#, fuzzy, python-format
#, python-format
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
#, python-format
@ -1924,37 +1901,31 @@ msgid "This field is required."
msgstr "Dette feltet er påkrevd."
#: db/models/fields/__init__.py:337
#, fuzzy
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
#, fuzzy
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
#, fuzzy
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
#, fuzzy
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
#, fuzzy, python-format
#, python-format
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
#, fuzzy
msgid "Separate multiple IDs with commas."
msgstr "Separer Id-ene med kommaer."
#: db/models/fields/related.py:581
#, fuzzy
msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr ""
@ -1965,14 +1936,14 @@ msgstr ""
msgid "Please enter valid %(self)s IDs. The value %(value)r is invalid."
msgid_plural ""
"Please enter valid %(self)s IDs. The values %(value)r are invalid."
msgstr[0] ""
msgstr[1] ""
msgstr[0] "Skriv inn gyldige %(self)s ID-er. Verdien %(value)r er ikke gyldig."
msgstr[1] "Skriv inn gyldige %(self)s ID-er. Verdiene %(value)r er ikke gyldige."
#: forms/__init__.py:380
#, fuzzy, python-format
#, python-format
msgid "Ensure your text is less than %s character."
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"
#: 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
#, python-format
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
msgid "The submitted file is empty."
@ -2002,7 +1973,7 @@ msgstr "Skriv inn et heltall mellom 0 og 32767."
#: template/defaultfilters.py:379
msgid "yes,no,maybe"
msgstr ""
msgstr "ja,nei,kanskje"
#, fuzzy
#~ 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"
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:80
msgid "Now"
@ -80,7 +89,7 @@ msgstr "24.00"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:82
msgid "6 a.m."
msgstr "18.00"
msgstr "06.00"
#: contrib/admin/media/js/admin/DateTimeShortcuts.js:83
msgid "Noon"

View File

@ -126,12 +126,10 @@ msgid "approved by staff"
msgstr "zaakceptowano"
#: contrib/comments/models.py:176
#, fuzzy
msgid "free comment"
msgstr "wolny komentarz"
#: contrib/comments/models.py:177
#, fuzzy
msgid "free comments"
msgstr "wolne komentarze"
@ -144,7 +142,6 @@ msgid "score date"
msgstr "data przyznania punktów"
#: contrib/comments/models.py:237
#, fuzzy
msgid "karma score"
msgstr "ilość punktów"
@ -243,6 +240,9 @@ msgid ""
"\n"
"%(text)s"
msgstr ""
"Ten komentarze został dodany przez użytkownika::\n"
"\n"
"%(text)s"
#: contrib/comments/views/comments.py:189
#: 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:286
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:292
msgid ""
"The comment form had an invalid 'target' parameter -- the object ID was "
"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:321
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:8
@ -600,7 +601,7 @@ msgstr "Wartość logiczna (True, False, None - prawda, fałsz lub nic)"
#: contrib/admin/views/doc.py:292
msgid "Relation to parent model"
msgstr ""
msgstr "Relacja do modelu rodzica"
#: contrib/admin/views/doc.py:293
msgid "Phone number"
@ -794,6 +795,9 @@ msgid ""
"objects, but your account doesn't have permission to delete the following "
"types of objects:"
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
#, python-format
@ -801,6 +805,8 @@ msgid ""
"Are you sure you want to delete the %(object_name)s \"%(object)s\"? All of "
"the following related items will be deleted:"
msgstr ""
"Czy chcesz skasować %(object_name)s \"%(object)s\"? Wszystkie "
"zależne obiekty zostaną skasowane:"
#: contrib/admin/templates/admin/delete_confirmation.html:26
msgid "Yes, I'm sure"
@ -820,11 +826,10 @@ msgid "View on site"
msgstr "Pokaż na stronie"
#: contrib/admin/templates/admin/change_form.html:30
#, fuzzy
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
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
msgid "Ordering"
@ -965,11 +970,11 @@ msgstr "Zespół %(site_name)s"
#: contrib/admin/templates/admin_doc/bookmarklets.html:3
msgid "Bookmarklets"
msgstr ""
msgstr "Zakładki"
#: contrib/admin/templates/admin_doc/bookmarklets.html:5
msgid "Documentation bookmarklets"
msgstr ""
msgstr "Zakładki Dokumentacji"
#: contrib/admin/templates/admin_doc/bookmarklets.html:9
msgid ""
@ -1094,6 +1099,8 @@ msgid ""
"Example: 'flatpages/contact_page'. If this isn't provided, the system will "
"use 'flatpages/default'."
msgstr ""
"Przykład: 'flatpages/contact_page'. Jeżeli nie podane system użyje "
"'flatpages/default'."
#: contrib/flatpages/models.py:14
msgid "registration required"
@ -1105,11 +1112,11 @@ msgstr "Jeżeli zaznaczone - tylko zalogowani użytkownicy będą mogli zobaczy
#: contrib/flatpages/models.py:18
msgid "flat page"
msgstr ""
msgstr "strona statyczna"
#: contrib/flatpages/models.py:19
msgid "flat pages"
msgstr ""
msgstr "strony statyczne"
#: contrib/auth/models.py:13 contrib/auth/models.py:26
msgid "name"
@ -1117,7 +1124,7 @@ msgstr "nazwa"
#: contrib/auth/models.py:15
msgid "codename"
msgstr ""
msgstr "nazwa kodowa"
#: contrib/auth/models.py:17
msgid "permission"
@ -1161,11 +1168,11 @@ msgstr "Użyj '[algo]$[salt]$[hexdigest]'"
#: contrib/auth/models.py:60
msgid "staff status"
msgstr "stan w zespole"
msgstr "w zespole"
#: contrib/auth/models.py:60
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
msgid "active"
@ -1195,15 +1202,14 @@ msgstr ""
msgid "user permissions"
msgstr "uprawnienia użytkownika"
#kurwa
#: contrib/auth/models.py:70
#, fuzzy
msgid "user"
msgstr "Użytkownik"
msgstr "użytkownik"
#: contrib/auth/models.py:71
#, fuzzy
msgid "users"
msgstr "Uzytkownicy"
msgstr "ytkownicy"
#: contrib/auth/models.py:76
msgid "Personal info"
@ -1222,7 +1228,6 @@ msgid "Groups"
msgstr "Grupy"
#: contrib/auth/models.py:219
#, fuzzy
msgid "message"
msgstr "wiadomość"
@ -1371,7 +1376,6 @@ msgid "December"
msgstr "Grudzień"
#: utils/dates.py:19
#, fuzzy
msgid "jan"
msgstr "sty"
@ -1472,11 +1476,10 @@ msgstr[0] "dzień"
msgstr[1] "dni"
#: utils/timesince.py:16
#, fuzzy
msgid "hour"
msgid_plural "hours"
msgstr[0] "godzina"
msgstr[1] "godzina"
msgstr[1] "godzin"
#: utils/timesince.py:17
msgid "minute"
@ -1569,7 +1572,6 @@ msgid "Slovak"
msgstr "Słowacki"
#: conf/global_settings.py:58
#, fuzzy
msgid "Slovenian"
msgstr "Słowacki"
@ -1582,9 +1584,8 @@ msgid "Swedish"
msgstr "Szwedzki"
#: conf/global_settings.py:61
#, fuzzy
msgid "Ukrainian"
msgstr "Brazylijski"
msgstr "Ukraiński"
#: conf/global_settings.py:62
msgid "Simplified Chinese"
@ -1715,14 +1716,14 @@ msgstr "Odnośnik %s jest nieprawidłowy."
#: core/validators.py:214
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
#, fuzzy, python-format
#, python-format
msgid "Watch your mouth! The word %s is not allowed here."
msgid_plural "Watch your mouth! The words %s are not allowed here."
msgstr[0] "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
#, python-format
@ -1745,11 +1746,11 @@ msgstr "To pole musi być uzupełnione jeśli %(field)s jest %(value)s"
#: core/validators.py:294
#, python-format
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
msgid "Duplicate values are not allowed."
msgstr ""
msgstr "Duplikaty są niedozwolone."
#: core/validators.py:336
#, python-format
@ -1761,20 +1762,20 @@ msgid "Please enter a valid decimal number."
msgstr "Proszę wpisać poprawną liczbę dziesiętną."
#: core/validators.py:349
#, fuzzy, python-format
#, python-format
msgid "Please enter a valid decimal number with at most %s total digit."
msgid_plural ""
"Please enter a valid decimal number with at most %s total digits."
msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną."
msgstr[1] "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ą zawierającą nie więcej niż %s cyfr."
#: core/validators.py:352
#, fuzzy, python-format
#, python-format
msgid "Please enter a valid decimal number with at most %s decimal place."
msgid_plural ""
"Please enter a valid decimal number with at most %s decimal places."
msgstr[0] "Proszę wpisać poprawną liczbę dziesiętną."
msgstr[1] "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ą z dokładnością do %s miejsc po przecinku."
#: core/validators.py:362
#, python-format
@ -1797,13 +1798,14 @@ msgstr "To pole jest nieprawidłowe."
#: core/validators.py:426
#, python-format
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
#, python-format
msgid ""
"The URL %(url)s returned the invalid Content-Type header '%(contenttype)s'."
msgstr ""
"URL %(url)s zwrócił niepoprawny Content-Type header '%(contenttype)s'."
#: core/validators.py:462
@ -1866,17 +1868,15 @@ msgstr "To pole jest wymagane"
#: db/models/fields/__init__.py:337
msgid "This value must be an integer."
msgstr ""
msgstr "Ta wartość musi być liczbą całkowitą"
#: db/models/fields/__init__.py:369
#, fuzzy
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
#, fuzzy
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
msgid "Enter a valid filename."
@ -1888,12 +1888,10 @@ msgid "Please enter a valid %s."
msgstr "Proszę wpisać poprawne %s."
#: db/models/fields/related.py:579
#, fuzzy
msgid "Separate multiple IDs with commas."
msgstr "Oddziel kilka pól ID przecinkami."
#: db/models/fields/related.py:581
#, fuzzy
msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr ""
@ -1909,11 +1907,11 @@ msgstr[0] ""
msgstr[1] ""
#: forms/__init__.py:380
#, fuzzy, python-format
#, python-format
msgid "Ensure your text is less than %s character."
msgid_plural "Ensure your text is less than %s characters."
msgstr[0] "Upewnij się, że jest mniej niż %s znaków."
msgstr[1] "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 tekst ma mniej niż %s znaków."
#: forms/__init__.py:385
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"
"Report-Msgid-Bugs-To: \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"
"Language-Team: Simplified Chinese <limodou@gmail.com>\n"
"MIME-Version: 1.0\n"
@ -1167,7 +1167,7 @@ msgstr "个人信息"
#: contrib/auth/models.py:77
msgid "Permissions"
msgstr "许可"
msgstr "权限"
#: contrib/auth/models.py:78
msgid "Important dates"

View File

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

View File

@ -27,6 +27,10 @@ LANGUAGE_CODE = 'en-us'
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.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
@ -60,8 +64,9 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = '{{ project_name }}.urls'
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.
# Don't forget to use absolute paths, not relative paths.
)
INSTALLED_APPS = (

View File

@ -10,8 +10,10 @@ include = lambda urlconf_module: [urlconf_module]
def patterns(prefix, *tuples):
pattern_list = []
for t in tuples:
if type(t[1]) == list:
pattern_list.append(RegexURLResolver(t[0], t[1][0]))
regex, view_or_include = t[:2]
default_kwargs = t[2:]
if type(view_or_include) == list:
pattern_list.append(RegexURLResolver(regex, view_or_include[0], *default_kwargs))
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

View File

@ -123,7 +123,7 @@ class DateFieldFilterSpec(FilterSpec):
def choices(self, cl):
for title, param_dict in self.links:
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}
FilterSpec.register(lambda f: isinstance(f, models.DateField), DateFieldFilterSpec)

View File

@ -42,9 +42,9 @@
/* PAGINATOR */
.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: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 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 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.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 */
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 */
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; }
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; }
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; }
/* 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; }
/* 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; }
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; }
/* 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 blockquote { margin-left:12px; }
.module ul, .module ol { margin-left:1.5em; }

View File

@ -4,7 +4,7 @@
#header { width:100%; }
#content-main { float:left; width:100%; }
#content-related { float:right; width:18em; position:relative; margin-right:-19em; }
#footer { clear:both; padding:10px; }
#footer { clear:both; padding:10px; }
/* COLUMN TYPES */
.colMS { margin-right:20em !important; }
@ -16,14 +16,14 @@
.dashboard #content { width:500px; }
/* 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:hover { text-decoration:underline; }
#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; }
#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 */
#content-related h3 { font-size:12px; color:#666; margin-bottom:3px; }
#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 */
#user-tools { right:auto; left:0; text-align:left; }
#user-tools { right:auto; left:0; text-align:left; }
div.breadcrumbs { text-align:right; }
#content-main { float:right;}
#content-related { float:left; margin-left:-19em; margin-right:auto;}

View File

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

View File

@ -8,7 +8,9 @@ var DateTimeShortcuts = {
clockInputs: [],
calendarDivName1: 'calendarbox', // name of calendar <div> that gets toggled
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
clockLinkName: 'clocklink', // name of the link that is used to toggle
admin_media_prefix: '',
init: function() {
// 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')));
var clock_link = document.createElement('a');
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'));
shortcuts_span.appendChild(document.createTextNode('\240'));
shortcuts_span.appendChild(now_link);
@ -69,17 +72,6 @@ var DateTimeShortcuts = {
var clock_box = document.createElement('div');
clock_box.style.display = 'none';
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.setAttribute('id', DateTimeShortcuts.clockDivName + num);
document.body.appendChild(clock_box);
@ -98,7 +90,25 @@ var DateTimeShortcuts = {
quickElement('a', cancel_p, gettext('Cancel'), 'href', 'javascript:DateTimeShortcuts.dismissClock(' + 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; });
},
dismissClock: function(num) {
@ -123,6 +133,7 @@ var DateTimeShortcuts = {
today_link.appendChild(document.createTextNode(gettext('Today')));
var cal_link = document.createElement('a');
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'));
shortcuts_span.appendChild(document.createTextNode('\240'));
shortcuts_span.appendChild(today_link);
@ -149,18 +160,6 @@ var DateTimeShortcuts = {
var cal_box = document.createElement('div');
cal_box.style.display = 'none';
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.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num);
document.body.appendChild(cal_box);
@ -172,7 +171,6 @@ var DateTimeShortcuts = {
cal_nav_prev.className = 'calendarnav-previous';
var cal_nav_next = quickElement('a', cal_nav, '>', 'href', 'javascript:DateTimeShortcuts.drawNext('+num+');');
cal_nav_next.className = 'calendarnav-next';
cal_box.appendChild(cal_nav);
// main box
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 + ');');
},
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; });
},
dismissCalendar: function(num) {

View File

@ -11,7 +11,7 @@ function showRelatedObjectLookupPopup(triggeringLink) {
} else {
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();
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 %}
{% block extrastyle %}{% endblock %}
{% block extrahead %}{% endblock %}
{% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
</head>
{% load i18n %}
@ -20,13 +21,13 @@
<div id="branding">
{% block branding %}{% endblock %}
</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>
{% endif %}{% endif %}
{% endif %}
{% block nav-global %}{% endblock %}
</div>
<!-- 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 %}
{% if messages %}
@ -36,7 +37,7 @@
<!-- Content -->
<div id="content" class="{% block coltype %}colM{% 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 sidebar %}{% endblock %}
<br class="clear" />

View File

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

View File

@ -11,8 +11,8 @@
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
<a href="../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
{% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18"|escape }}{% endif %}
<a href="../">{{ opts.verbose_name_plural|capfirst|escape }}</a> &rsaquo;
{% if add %}{% trans "Add" %} {{ opts.verbose_name|escape }}{% else %}{{ original|truncatewords:"18"|escape }}{% endif %}
</div>
{% endif %}{% endblock %}
{% 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%}
</ul>
{% 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>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% 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 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 %}
{% 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 content %}
<div id="content-main">
{% 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 %}
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %}

View File

@ -1,10 +1,10 @@
{% if show %}
<div class="xfull">
<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 %}
<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 %}
</ul><br class="clear" />
</div>
{% endif %}
{% endif %}

View File

@ -4,21 +4,21 @@
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="../../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
<a href="../">{{ object|striptags|truncatewords:"18" }}</a> &rsaquo;
<a href="../../">{{ opts.verbose_name_plural|capfirst|escape }}</a> &rsaquo;
<a href="../">{{ object|escape|truncatewords:"18" }}</a> &rsaquo;
{% trans 'Delete' %}
</div>
{% endblock %}
{% block content %}
{% 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>
{% for obj in perms_lacking %}
<li>{{ obj }}</li>
<li>{{ obj|escape }}</li>
{% endfor %}
</ul>
{% 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>
<form action="" method="post">
<div>

View File

@ -1,7 +1,7 @@
{% load admin_modify %}
<fieldset class="module aligned">
{% 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 %}
<p><a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a></p>
{% endif %}{% endif %}

View File

@ -1,12 +1,13 @@
{% load admin_modify %}
<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>
{% for fw in bound_related_object.field_wrapper_list %}
{% 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 %}
{% endfor %}
</tr></thead>
{% for fcw in bound_related_object.form_field_collection_wrappers %}
{% if change %}{% if original_row_needed %}
{% if fcw.obj.original %}

View File

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

View File

@ -19,9 +19,9 @@
{% for model in app.models %}
<tr>
{% 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 %}
<th scope="row">{{ model.name }}</th>
<th scope="row">{{ model.name|escape }}</th>
{% endif %}
{% if model.perms.add %}
@ -58,7 +58,7 @@
{% else %}
<ul class="actionlist">
{% 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 %}
</ul>
{% endif %}

View File

@ -1,7 +1,7 @@
{% extends "admin/base_site.html" %}
{% 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 %}

View File

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

View File

@ -2,7 +2,7 @@
{% 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 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 %}
{% block content %}

View File

@ -6,6 +6,6 @@
{% paginator_number cl i %}
{% endfor %}
{% 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 %}
</p>

View File

@ -9,17 +9,17 @@
<h1>Documentation</h1>
<div id="content-main">
<h3><a href="tags/">Tags</a></h3>
<p>List of all the template tags and their functions.</p>
<h3><a href="tags/">Tags</a></h3>
<p>List of all the template tags and their functions.</p>
<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>
<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>
<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>
<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>
<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>
<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>
<h3><a href="bookmarklets/">Bookmarklets</a></h3>
<p>Tools for your browser to quickly access admin functionality.</p>

View File

@ -9,9 +9,9 @@
<h1>Documentation</h1>
<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>
{% endblock %}

View File

@ -9,13 +9,13 @@
</style>
{% 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 %}
<div id="content-main">
<h1>{{ summary }}</h1>
<h1>{{ summary|escape }}</h1>
{% if description %}
<p>{% filter escape|linebreaksbr %}{% trans description %}{% endfilter %}</p>

View File

@ -1,19 +1,19 @@
{% extends "admin/base_site.html" %}
{% 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 title %}Template: {{ name }}{% endblock %}
{% block title %}Template: {{ name|escape }}{% endblock %}
{% block content %}
<h1>Template: "{{ name }}"</h1>
<h1>Template: "{{ name|escape }}"</h1>
{% regroup templates|dictsort:"site_id" by site as 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>
{% 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 %}
</ol>
{% endfor %}

View File

@ -1,4 +1,4 @@
{% 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 %}
{% else %} {% output_all bound_field.form_fields %} {% endif %}

View File

@ -15,6 +15,6 @@
{{ bound_field.original_value }}
{% endif %}
{% 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 %}

View File

@ -1,2 +1,2 @@
{% 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.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 IS_POPUP_VAR, EMPTY_CHANGELIST_VALUE
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.utils import dateformat
@ -119,7 +117,7 @@ def items_for_result(cl, result):
if callable(attr):
attr = attr()
result_repr = str(attr)
except AttributeError, ObjectDoesNotExist:
except (AttributeError, ObjectDoesNotExist):
result_repr = EMPTY_CHANGELIST_VALUE
else:
# Strip HTML tags in the resulting text, except if the
@ -167,11 +165,12 @@ def items_for_result(cl, result):
result_repr = '&nbsp;'
# 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:
table_tag = {True:'th', False:'td'}[first]
first = False
url = cl.url_for_result(result)
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>' % \
(row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr))
yield ('<%s%s><a href="%s"%s>%s</a></%s>' % \
(table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr, table_tag))
else:
yield ('<td%s>%s</td>' % (row_class, result_repr))

View File

@ -1,9 +1,7 @@
from django import template
from django.contrib.admin.views.main import AdminBoundField
from django.template import loader
from django.utils.html import escape
from django.utils.text import capfirst
from django.utils.functional import curry
from django.db import models
from django.db.models.fields import Field
from django.db.models.related import BoundRelatedObject
@ -162,8 +160,10 @@ class EditInlineNode(template.Node):
context.push()
if relation.field.rel.edit_inline == models.TABULAR:
bound_related_object_class = TabularBoundRelatedObject
else:
elif relation.field.rel.edit_inline == models.STACKED:
bound_related_object_class = StackedBoundRelatedObject
else:
bound_related_object_class = relation.field.rel.edit_inline
original = context.get('original', None)
bound_related_object = relation.bind(context['form'], original, bound_related_object_class)
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:
return '<script type="text/javascript">addEvent(window, "load", function(e) {' \
' 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:
return ''
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/filters/$', 'django.contrib.admin.views.doc.template_filter_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/models/$', 'django.contrib.admin.views.doc.model_index'),
('^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/(?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
('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list'),
('^([^/]+)/([^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'),

View File

@ -3,7 +3,6 @@
import re
from email.Parser import HeaderParser
from email.Errors import HeaderParseError
from urlparse import urljoin
try:
import docutils.core
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.
"""
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.
if request.POST.has_key('post_data'):
# 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.
else:
if user.is_staff:
if user.is_active and user.is_staff:
login(request, user)
# TODO: set last_login with an event.
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.
admin_root = request.path[:-len('doc/bookmarklets/')]
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))
bookmarklets = staff_member_required(bookmarklets)
@ -43,11 +43,11 @@ def template_tag_index(request):
for tag_name, tag_func in library.tags.items():
title, body, metadata = utils.parse_docstring(tag_func.__doc__)
if title:
title = utils.parse_rst(title, 'tag', 'tag:' + tag_name)
title = utils.parse_rst(title, 'tag', _('tag:') + tag_name)
if body:
body = utils.parse_rst(body, 'tag', 'tag:' + tag_name)
body = utils.parse_rst(body, 'tag', _('tag:') + tag_name)
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:
tag_library = None
else:
@ -74,11 +74,11 @@ def template_filter_index(request):
for filter_name, filter_func in library.filters.items():
title, body, metadata = utils.parse_docstring(filter_func.__doc__)
if title:
title = utils.parse_rst(title, 'filter', 'filter:' + filter_name)
title = utils.parse_rst(title, 'filter', _('filter:') + filter_name)
if body:
body = utils.parse_rst(body, 'filter', 'filter:' + filter_name)
body = utils.parse_rst(body, 'filter', _('filter:') + filter_name)
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:
tag_library = None
else:
@ -132,11 +132,11 @@ def view_detail(request, view):
raise Http404
title, body, metadata = utils.parse_docstring(view_func.__doc__)
if title:
title = utils.parse_rst(title, 'view', 'view:' + view)
title = utils.parse_rst(title, 'view', _('view:') + view)
if body:
body = utils.parse_rst(body, 'view', 'view:' + view)
body = utils.parse_rst(body, 'view', _('view:') + view)
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', {
'name': view,
'summary': title,
@ -161,14 +161,14 @@ def model_detail(request, app_label, model_name):
try:
app_mod = models.get_app(app_label)
except ImproperlyConfigured:
raise Http404, "App %r not found" % app_label
raise Http404, _("App %r not found") % app_label
model = None
for m in models.get_models(app_mod):
if m._meta.object_name.lower() == model_name:
model = m
break
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
@ -180,7 +180,7 @@ def model_detail(request, app_label, model_name):
if isinstance(field, models.ForeignKey):
data_type = related_object_name = field.rel.to.__name__
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:
data_type = get_readable_field_data_type(field)
verbose = field.verbose_name
@ -202,7 +202,7 @@ def model_detail(request, app_label, model_name):
continue
verbose = func.__doc__
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({
'name': 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
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()
fields.append({
'name' : "%s.all" % accessor,
'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({
'name' : "%s.count" % accessor,
'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', {
'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__,
'fields': fields,
}, context_instance=RequestContext(request))
@ -328,15 +328,19 @@ def extract_views_from_urlpatterns(urlpatterns, base=''):
"""
views = []
for p in urlpatterns:
if hasattr(p, 'get_callback'):
if hasattr(p, '_get_callback'):
try:
views.append((p.get_callback(), base + p.regex.pattern))
views.append((p._get_callback(), base + p.regex.pattern))
except ViewDoesNotExist:
continue
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:
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
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.models.query import handle_legacy_orderlist, QuerySet
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.text import capfirst, get_text_list
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"
return HttpResponseRedirect(post_url_continue % pk_value)
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>' % \
(pk_value, str(new_object).replace('"', '\\"')))
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:
p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission())
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():
if related.opts in opts_seen:
continue
@ -714,10 +713,22 @@ class ChangeList(object):
qs = qs.order_by((self.order_type == 'desc' and '-' or '') + lookup_order_field)
# 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:
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)
if qs._select_related:
other_qs = other_qs.select_related()
other_qs = other_qs.filter(reduce(operator.or_, or_queries))
qs = qs & other_qs

View File

@ -22,7 +22,7 @@ def template_validator(request):
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
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', {
'title': 'Template validator',
'form': forms.FormWrapper(manipulator, new_data, errors),
@ -32,7 +32,7 @@ template_validator = staff_member_required(template_validator)
class TemplateValidator(forms.Manipulator):
def __init__(self, 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 = (
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]),

View File

@ -38,7 +38,7 @@ def authenticate(**credentials):
if user is None:
continue
# 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
def login(request, user):
@ -56,8 +56,14 @@ def logout(request):
"""
Remove the authenticated user's ID from the request.
"""
del request.session[SESSION_KEY]
del request.session[BACKEND_SESSION_KEY]
try:
del request.session[SESSION_KEY]
except KeyError:
pass
try:
del request.session[BACKEND_SESSION_KEY]
except KeyError:
pass
def get_user(request):
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:
"""

View File

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

View File

@ -13,14 +13,24 @@ def user_passes_test(test_func, login_url=LOGIN_URL):
if test_func(request.user):
return view_func(request, *args, **kwargs)
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, quote(request.get_full_path())))
_checklogin.__doc__ = view_func.__doc__
_checklogin.__dict__ = view_func.__dict__
return _checklogin
return _dec
login_required = user_passes_test(lambda u: not u.is_anonymous())
login_required = user_passes_test(lambda u: u.is_authenticated())
login_required.__doc__ = (
"""
Decorator for views that checks that the user is logged in, redirecting
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 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):
"""
Base class for authenticating users. Extend this to get a form that accepts
@ -59,9 +81,9 @@ class PasswordResetForm(forms.Manipulator):
try:
self.user_cache = User.objects.get(email__iexact=new_data)
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"
from django.core.mail import send_mail
new_pass = User.objects.make_random_password()
@ -73,7 +95,7 @@ class PasswordResetForm(forms.Manipulator):
domain = current_site.domain
else:
site_name = domain = domain_override
t = loader.get_template('registration/password_reset_email.html')
t = loader.get_template(email_template_name)
c = {
'new_password': new_pass,
'email': self.user_cache.email,
@ -91,14 +113,14 @@ class PasswordChangeForm(forms.Manipulator):
forms.PasswordField(field_name="old_password", length=30, maxlength=30, is_required=True,
validator_list=[self.isValidOldPassword]),
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),
)
def isValidOldPassword(self, new_data, all_data):
"Validates that the old_password field is correct."
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):
"Saves the new password."

View File

@ -22,6 +22,8 @@ def authenhandler(req, **kwargs):
os.environ['DJANGO_SETTINGS_MODULE'] = settings_module
from django.contrib.auth.models import User
from django import db
db.reset_queries()
# check that the username is valid
kwargs = {'username': req.user, 'is_active': True}
@ -30,18 +32,21 @@ def authenhandler(req, **kwargs):
if superuser_only:
kwargs['is_superuser'] = True
try:
user = User.objects.get(**kwargs)
except User.DoesNotExist:
return apache.HTTP_UNAUTHORIZED
# check the password and any permission given
if user.check_password(req.get_basic_auth_pw()):
if permission_name:
if user.has_perm(permission_name):
return apache.OK
try:
user = User.objects.get(**kwargs)
except User.DoesNotExist:
return apache.HTTP_UNAUTHORIZED
# check the password and any permission given
if user.check_password(req.get_basic_auth_pw()):
if permission_name:
if user.has_perm(permission_name):
return apache.OK
else:
return apache.HTTP_UNAUTHORIZED
else:
return apache.HTTP_UNAUTHORIZED
return apache.OK
else:
return apache.OK
else:
return apache.HTTP_UNAUTHORIZED
return apache.HTTP_UNAUTHORIZED
finally:
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)))
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.auth.models import Permission
app_models = get_models(app)
@ -27,13 +27,13 @@ def create_permissions(app, created_models):
for codename, name in _get_all_permissions(klass._meta):
p, created = Permission.objects.get_or_create(codename=codename, content_type__pk=ctype.id,
defaults={'name': name, 'content_type': ctype})
if created:
if created and verbosity >= 2:
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.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 " \
"any superusers defined.\nWould you like to create one now? (yes/no): "
confirm = raw_input(msg)

View File

@ -1,12 +1,9 @@
class LazyUser(object):
def __init__(self):
self._user = 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
self._user = get_user(request)
return self._user
request._cached_user = get_user(request)
return request._cached_user
class AuthenticationMiddleware(object):
def process_request(self, request):

View File

@ -1,4 +1,5 @@
from django.core import validators
from django.core.exceptions import ImproperlyConfigured
from django.db import backend, connection, models
from django.contrib.contenttypes.models import ContentType
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."
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)
content_type = models.ForeignKey(ContentType)
@ -91,9 +92,9 @@ class User(models.Model):
last_name = models.CharField(_('last name'), maxlength=30, blank=True)
email = models.EmailField(_('e-mail address'), blank=True)
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_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())
date_joined = models.DateTimeField(_('date joined'), default=models.LazyDate())
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."
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):
"Returns the first_name plus the last_name, with a space in between."
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):
"Returns True if the user has any permissions in the given app label."
if not self.is_active:
return False
if self.is_superuser:
return True
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):
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):
raise NotImplementedError
@ -293,3 +310,6 @@ class AnonymousUser(object):
def is_anonymous(self):
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.template import RequestContext
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 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'):
"Logs out the user and displays 'You are logged out' message."
from django.contrib.auth import logout
try:
logout(request)
except KeyError:
logout(request)
if next_page is None:
return render_to_response(template_name, {'title': _('Logged out')}, context_instance=RequestContext(request))
else:
# Redirect to this page until the session has been cleared.
@ -50,7 +49,8 @@ def redirect_to_login(next, login_url=LOGIN_URL):
"Redirects the user to the login page, passing the given 'next' page"
return HttpResponseRedirect('%s?%s=%s' % (login_url, REDIRECT_FIELD_NAME, next))
def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html'):
def password_reset(request, is_admin_site=False, template_name='registration/password_reset_form.html',
email_template_name='registration/password_reset_email.html'):
new_data, errors = {}, {}
form = PasswordResetForm()
if request.POST:
@ -58,9 +58,9 @@ def password_reset(request, is_admin_site=False, template_name='registration/pas
errors = form.get_validation_errors(new_data)
if not errors:
if is_admin_site:
form.save(request.META['HTTP_HOST'])
form.save(domain_override=request.META['HTTP_HOST'])
else:
form.save()
form.save(email_template_name=email_template_name)
return HttpResponseRedirect('%sdone/' % request.path)
return render_to_response(template_name, {'form': forms.FormWrapper(form, new_data, errors)},
context_instance=RequestContext(request))

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