My idea was to fix this in a very straight way - change ForeignKey
behavior (the piece of code that generates many_set method) - so it
doesn't take into account null.
Let me explain a bit more. If foreign key is null - then there's no
link between Many and One object. So it many_set should return
Dear Django developers!
Please, look at the table auth_persissions - it has following
structure (and data - trimmed):
Here's a small piece of data:
{{{
+-+---
+-++
| id | name
As far as I see, reversing url is getting URL for a view. Then, if
view has only one route, there's no need to provide HTTP method. But
if there are > 0 routes to the same view, we can add optional METHOD
option.
Examples:
{# typical usage: #}
Goods
{# exclusive usage, many routes t
IMHO, we should move typical logic of switching actual view according
to request HTTP method from views to urls.py. Dispatching URLs using
info from request is a job for urls.py, not for views itself.
I think following code is inefficient and does the same as urls.py
does with URL of requests:
#
OK. If the decision is made (forbid newlines in comments), then
newlines should be _really_ forbidden (currently not).
Opened a ticket for it - http://code.djangoproject.com/ticket/4171
On 27 апр, 00:46, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 4/26/07, tonnzor <[E
> We already have multiline comments. They are written as {% comment %}
> and {% endcomment %}.
This inconveniently to use. Short variant {##} is much better and very
similar to C /* */.
> > So why can't we enable newlines for {##} only?
>
> This tag is parsed just as normal tags, so introducing
> > 2. If we want to enable multi-line comments, we need to allow newlines
> > in tag's content:
>
> We don't want to allow newlines in tags. That decision has already been
> made and reaffirmed a number of times.
Comments are not actually a tag, it's a special case. And it is very
useful to have
I reviewed templates engine and found the problem. Here are the
patches:
1. template.Lexer incorrectly recognizes ALL tokens - it check only
the beginning of the token, ignoring the end of it.
Example:
{{ my_var }} {{ other_var ## : variable other_var will be printed
Current code (template/__i
Short templates comments {# #} are odd if used incorrectly - it eats
text.
This template (invalid comments):
Hello
{# this
comment
has
newlines #} World! {{ "some more text" }}
Now produce this output (text "World!" is eaten):
Hello
some more text
Yes, the comments are invalid, but in this ca
I think that short template comments should allow multi-line comments
- it is much easier to use {# #} instead of {% comment %} {%
endcomment %}
Now short comments do not allow newlines in them, so following
template is invalid:
{# very long
many-lines
comment #}
It seems odd that this code do
10 matches
Mail list logo