magic-removal: Merged to [1872]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-09 00:55:23 +00:00
parent 49fa5cbf1f
commit 5df59f478e
12 changed files with 108 additions and 59 deletions

View File

@ -95,6 +95,7 @@ answer newbie questions, and generally made Django that much better:
Rachel Willmer <http://www.willmer.com/kb/>
wojtek
ye7cakf02@sneakemail.com
Cheng Zhang
A big THANK YOU goes to:

View File

@ -31,49 +31,49 @@ msgstr "
#: contrib/comments/models/comments.py:11
msgid "rating #1"
msgstr ""
msgstr "рейтинг #1"
#: contrib/comments/models/comments.py:12
msgid "rating #2"
msgstr ""
msgstr "рейтинг #2"
#: contrib/comments/models/comments.py:13
msgid "rating #3"
msgstr ""
msgstr "рейтинг #3"
#: contrib/comments/models/comments.py:14
msgid "rating #4"
msgstr ""
msgstr "рейтинг #4"
#: contrib/comments/models/comments.py:15
msgid "rating #5"
msgstr ""
msgstr "рейтинг #5"
#: contrib/comments/models/comments.py:16
msgid "rating #6"
msgstr ""
msgstr "рейтинг #6"
#: contrib/comments/models/comments.py:17
msgid "rating #7"
msgstr ""
msgstr "рейтинг #7"
#: contrib/comments/models/comments.py:18
msgid "rating #8"
msgstr ""
msgstr "рейтинг #8"
#: contrib/comments/models/comments.py:23
msgid "is valid rating"
msgstr ""
msgstr "доступный рейтинг"
#: contrib/comments/models/comments.py:24
#: contrib/comments/models/comments.py:164
msgid "date/time submitted"
msgstr ""
msgstr "дата/время добавления"
#: contrib/comments/models/comments.py:25
#: contrib/comments/models/comments.py:165
msgid "is public"
msgstr ""
msgstr "публичный"
#: contrib/comments/models/comments.py:26 contrib/admin/views/doc.py:256
msgid "IP address"
@ -139,11 +139,11 @@ msgstr "
#: contrib/comments/models/comments.py:209
msgid "score"
msgstr ""
msgstr "счёт"
#: contrib/comments/models/comments.py:210
msgid "score date"
msgstr ""
msgstr "счёт времени"
#: contrib/comments/models/comments.py:213
msgid "Karma score"
@ -163,19 +163,17 @@ msgid "flag date"
msgstr ""
#: contrib/comments/models/comments.py:251
#, fuzzy
msgid "User flag"
msgstr "鹣特谙琢耘特"
msgstr "Признак пользователя"
#: contrib/comments/models/comments.py:252
#, fuzzy
msgid "User flags"
msgstr "鹣特谙琢耘特"
msgstr "Признаки ользователя"
#: contrib/comments/models/comments.py:256
#, python-format
msgid "Flag by %r"
msgstr ""
msgstr "Отмечен %r"
#: contrib/comments/models/comments.py:271
#, python-format
@ -184,6 +182,9 @@ msgid ""
"\n"
"%(text)s"
msgstr ""
"Этот комментарий был отмечен %(user)s:\n"
"\n"
"%(text)s"
#: contrib/comments/models/comments.py:278
msgid "deletion date"
@ -966,18 +967,16 @@ msgid "Date:"
msgstr ""
#: contrib/admin/templates/widget/date_time.html:4
#, fuzzy
msgid "Time:"
msgstr "饕磐<EFBFBD>"
msgstr "Время:"
#: contrib/admin/templates/widget/file.html:2
msgid "Currently:"
msgstr ""
msgstr "Современно:"
#: contrib/admin/templates/widget/file.html:3
#, fuzzy
msgid "Change:"
msgstr "橼团紊载"
msgstr "Изменить:"
#: contrib/redirects/models/redirects.py:7
msgid "redirect from"
@ -1009,7 +1008,7 @@ msgstr "
#: contrib/redirects/models/redirects.py:13
msgid "redirects"
msgstr "信遗瘟幸献膛紊<EFBFBD>"
msgstr "перенаправления"
#: contrib/flatpages/models/flatpages.py:7
msgid ""
@ -1045,7 +1044,7 @@ msgstr "
#: contrib/flatpages/models/flatpages.py:13
msgid "If this is checked, only logged-in users will be able to view the page."
msgstr "逵躺 显团夼蜗, 韵特讼 紫叟嫩膳 邢特谙琢耘躺 油锨赵 咨呐载 釉伊紊谜"
msgstr "Если отмечено, только вошедшие пользователи смогут видеть страницу."
#: contrib/flatpages/models/flatpages.py:17
msgid "flat page"
@ -1776,7 +1775,7 @@ msgstr[1] ""
#: core/template/defaultfilters.py:371
msgid "yes,no,maybe"
msgstr ""
msgstr "да,нет,может быть"
#: parts/auth/formfields.py:27
msgid ""

View File

@ -19,7 +19,7 @@ msgstr ""
#: contrib/admin/media/js/SelectFilter2.js:33
#, perl-format
msgid "Available %s"
msgstr "δΟΣΤΥΠΕΞ %s"
msgstr "δΟΣΤΥΠΞΩΕ %s"
#: contrib/admin/media/js/SelectFilter2.js:41
msgid "Choose all"
@ -36,7 +36,7 @@ msgstr "
#: contrib/admin/media/js/SelectFilter2.js:53
#, perl-format
msgid "Chosen %s"
msgstr "χΩΒ<CEA9>ΑΞ %s"
msgstr "χΩΒ<CEA9>ΑΞΞΩΕ %s"
#: contrib/admin/media/js/SelectFilter2.js:54
msgid "Select your choice(s) and click "
@ -51,7 +51,8 @@ msgstr "
msgid ""
"January February March April May June July August September October November "
"December"
msgstr "ρΞΧΑ<CEA7>Ψ ζΕΧ<CE95>ΑΜΨ νΑ<CEBD>Τ αΠ<CEB1>ΕΜΨ νΑΚ ιΐΞΨ ιΐΜΨ αΧΗΥΣΤ σΕΞΤΡΒ<CEA1>Ψ οΛΤΡΒ<CEA1>Ψ ξΟΡΒ<CEA1>Ψ "
msgstr ""
"ρΞΧΑ<CEA7>Ψ ζΕΧ<CE95>ΑΜΨ νΑ<CEBD>Τ αΠ<CEB1>ΕΜΨ νΑΚ ιΐΞΨ ιΐΜΨ αΧΗΥΣΤ σΕΞΤΡΒ<CEA1>Ψ οΛΤΡΒ<CEA1>Ψ ξΟΡΒ<CEA1>Ψ "
"äÅËÁÂÒØ"
#: contrib/admin/media/js/dateparse.js:27

View File

@ -786,7 +786,7 @@ class DateField(TextField):
class TimeField(TextField):
"""A FormField that automatically converts its data to a datetime.time object.
The data should be in the format HH:MM:SS."""
The data should be in the format HH:MM:SS or HH:MM:SS.mmmmmm."""
def __init__(self, field_name, is_required=False, validator_list=[]):
validator_list = [self.isValidTime] + validator_list
TextField.__init__(self, field_name, length=8, maxlength=8,
@ -802,11 +802,15 @@ class TimeField(TextField):
"Converts the field into a datetime.time object"
import time, datetime
try:
part_list = data.split('.')
try:
time_tuple = time.strptime(data, '%H:%M:%S')
time_tuple = time.strptime(part_list[0], '%H:%M:%S')
except ValueError: # seconds weren't provided
time_tuple = time.strptime(data, '%H:%M')
return datetime.time(*time_tuple[3:6])
time_tuple = time.strptime(part_list[0], '%H:%M')
t = datetime.time(*time_tuple[3:6])
if (len(part_list) == 2):
t = t.replace(microsecond=int(part_list[1]))
return t
except (ValueError, TypeError):
return None
html2python = staticmethod(html2python)

View File

@ -786,7 +786,7 @@ def get_validation_errors(outfile):
try:
from PIL import Image
except ImportError:
e.add(opts, '"%s" field: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .')
e.add(opts, '"%s" field: To use ImageFields, you need to install the Python Imaging Library. Get it at http://www.pythonware.com/products/pil/ .' % f.name)
if f.prepopulate_from is not None and type(f.prepopulate_from) not in (list, tuple):
e.add(opts, '"%s" field: prepopulate_from should be a list or tuple.' % f.name)
if f.choices:

View File

@ -17,9 +17,10 @@ of the community, so there are many ways you can help Django's development:
* Submit patches for new and/or fixed behavior. Please read `Submitting
patches`_, below, for details on how to submit a patch.
* Join the `django-dev`_ mailing list and share your ideas for how to improve
Django. We're always open to suggestions, although we're likely to be skeptical
of large-scale suggestions without some code to back it up.
* Join the `django-developers`_ mailing list and share your ideas for how
to improve Django. We're always open to suggestions, although we're
likely to be skeptical of large-scale suggestions without some code to
back it up.
That's all you need to know if you'd like to join the Django development
community. The rest of this document describes the details of how our community
@ -50,16 +51,16 @@ particular:
`django-users`_ list, or the `#django`_ IRC channel for that.
* **Don't** use the ticket system to make large-scale feature requests.
We like to discuss any big changes to Django's core on the `django-dev`_
We like to discuss any big changes to Django's core on the `django-developers`_
list before actually working on them.
* **Don't** reopen issues that have been marked "wontfix". This mark means
that the decision has been made that we can't or won't fix this particular
issue. If you're not sure why, please ask on `django-dev`_.
issue. If you're not sure why, please ask on `django-developers`_.
* **Don't** use the ticket tracker for lengthy discussions, because they're
likely to get lost. If a particular ticket is controversial, please move
discussion to `django-dev`_.
discussion to `django-developers`_.
Reporting security issues
=========================
@ -167,14 +168,57 @@ Please follow these coding standards when writing code for inclusion in Django:
{{foo}}
Committing code
===============
Please follow these guidelines when committing code to Django's Subversion
repository:
* For any medium-to-big changes, where "medium-to-big" is according to your
judgment, please bring things up on the `django-developers`_ mailing list
before making the change.
* Write detailed commit messages in the past tense, not present tense.
* Good: "Fixed Unicode bug in RSS API."
* Bad: "Fixes Unicode bug in RSS API."
* Bad: "Fixing Unicode bug in RSS API."
* For commits to a branch, prefix the commit message with the branch name.
For example: "magic-removal: Added support for mind reading."
* Limit commits to the most granular change that makes sense. This means,
use frequent small commits rather than infrequent large commits. For
example, if implementing feature X requires a small change to library Y,
first commit the change to library Y, then commit feature X in a separate
commit. This goes a *long way* in helping all core Django developers
follow your changes.
* If your commit closes a ticket in the Django `ticket tracker`_, begin
your commit message with the text "Fixed #abc", where "abc" is the number
of the ticket your commit fixes. Example: "Fixed #123 -- Added support
for foo". We've rigged Subversion and Trac so that any commit message
in that format will automatically close the referenced ticket and post a
comment to it with the full commit message.
If your commit closes a ticket and is in a branch, use the branch name
first, then the "Fixed #abc." For example:
"magic-removal: Fixed #123 -- Added whizbang feature."
* If your commit references a ticket in the Django `ticket tracker`_ but
does *not* close the ticket, include the phrase "Refs #abc", where "abc"
is the number of the ticket your commit references. We've rigged
Subversion and Trac so that any commit message in that format will
automatically post a comment to the appropriate ticket.
Requesting features
===================
We're always trying to make Django better, and your feature requests are a key
part of that. Here are some tips on how to most effectively make a request:
* Request the feature on `django-dev`_, not in the ticket tracker; it'll get
read more closely if it's on the mailing list.
* Request the feature on `django-developers`_, not in the ticket tracker;
it'll get read more closely if it's on the mailing list.
* Describe clearly and concisely what the missing feature is and how you'd
like to see it implemented. Include example code (non-functional is OK)
@ -201,9 +245,9 @@ trunk at any time.
Thus, large architectural changes -- that is, changes too large to be
encapsulated in a single patch, or changes that need multiple eyes on them --
will have dedicated branches. See, for example, the `i18n branch`_. If you
have a change of this nature that you'd like to work on, ask on `django-dev`_ for
a branch to be created for you. We'll create a branch for pretty much any kind of
experimenting you'd like to do.
have a change of this nature that you'd like to work on, ask on
`django-developers`_ for a branch to be created for you. We'll create a branch
for pretty much any kind of experimenting you'd like to do.
We will only branch entire copies of the Django tree, even if work is only
happening on part of that tree. This makes it painless to switch to a branch.
@ -213,7 +257,7 @@ into the branch. Please merge at least once a week. Every time you merge from
the trunk, note the merge and revision numbers in the commit message.
Once the branch is stable and ready to be merged into the trunk, alert
`django-dev`_.
`django-developers`_.
After a branch has been merged, it should be considered "dead"; write access to
it will be disabled, and old branches will be periodically "trimmed." To keep
@ -285,9 +329,9 @@ Once a feature's been requested and discussed, eventually we'll have a decision
about whether to include the feature or drop it.
Whenever possible, we strive for a rough consensus. To that end, we'll often
have informal votes on django-dev about a feature. In these votes we follow the
voting style invented by Apache and used on Python itself, where votes are given
as +1, +0, -0, or -1. Roughly translated, these votes mean:
have informal votes on `django-developers`_ about a feature. In these votes we
follow the voting style invented by Apache and used on Python itself, where
votes are given as +1, +0, -0, or -1. Roughly translated, these votes mean:
* +1: "I love the idea and I'm strongly committed to it."
@ -298,7 +342,7 @@ as +1, +0, -0, or -1. Roughly translated, these votes mean:
* -1: "I strongly disagree and would be very unhappy to see the idea turn
into reality."
Although these votes on django-dev are informal, they'll be taken very
Although these votes on django-developers are informal, they'll be taken very
seriously. After a suitable voting period, if an obvious consensus arises
we'll follow the votes.
@ -337,7 +381,7 @@ requests for commit access are potential flame-war starters, and will be ignored
.. _community page: http://www.djangoproject.com/community/
.. _ticket tracker: http://code.djangoproject.com/newticket
.. _django-dev: http://groups.google.com/group/django-developers
.. _django-developers: http://groups.google.com/group/django-developers
.. _FAQ: http://www.djangoproject.com/documentation/faq/
.. _search the tracker: http://code.djangoproject.com/search
.. _django-users: http://groups.google.com/group/django-users

View File

@ -312,7 +312,7 @@ method. For example::
the_place = meta.OneToOneField(places.Place)
In the above example, each ``Place`` will have a ``get_restaurant()`` method,
and each ``Restaurant`` will have a ``get_theplace()`` method.
and each ``Restaurant`` will have a ``get_the_place()`` method.
Many-to-one relations
---------------------

View File

@ -26,11 +26,11 @@ this document, we'll be working with the following model, a "place" object::
)
class Place(meta.Model):
name = meta.CharField(maxlength=100),
address = meta.CharField(maxlength=100, blank=True),
city = meta.CharField(maxlength=50, blank=True),
state = meta.USStateField(),
zip_code = meta.CharField(maxlength=5, blank=True),
name = meta.CharField(maxlength=100)
address = meta.CharField(maxlength=100, blank=True)
city = meta.CharField(maxlength=50, blank=True)
state = meta.USStateField()
zip_code = meta.CharField(maxlength=5, blank=True)
place_type = meta.IntegerField(choices=PLACE_TYPES)
class Meta:
admin = meta.Admin()

View File

@ -149,7 +149,7 @@ subclass of dictionary. Exceptions are outlined here:
* ``__setitem__(key, value)`` -- Sets the given key to ``[value]``
(a Python list whose single element is ``value``). Note that this, as
other dictionary functions that have side effects, can only be called on
an immutable ``QueryDict`` (one that was created via ``copy()``).
a mutable ``QueryDict`` (one that was created via ``copy()``).
* ``__contains__(key)`` -- **New in Django development version.** Returns
``True`` if the given key is set. This lets you do, e.g.,

View File

@ -471,7 +471,7 @@ a template loader. Here are the built-in template loaders:
directories, in this order:
* ``/path/to/myproject/polls/templates/foo.html``
* ``/path/to/myproject/music/templates/music.html``
* ``/path/to/myproject/music/templates/foo.html``
Note that the loader performs an optimization when it is first imported:
It caches a list of which ``INSTALLED_APPS`` packages have a ``templates``