ou need to add the function name to the settings'
TEMPLATE_CONTEXT_PROCESSORS tuple.
HTH,
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
user = models.ForeignKey(User, related_name='favs')
class user_favs_mixin:
def best(self): ...
The ForeignRelatedObjectsDescriptor would the look for the innerclass
and add it to the list of superclases of its dynamic RelatedManager
cl
on. My point is: it is
the responsibility of the project which wants to get considered for
usage. Your (and James) point is, I think: if it was said once, it can
be found. That feels elite, IMHO.
I appreciate your opinion.
--
Stefan Matthias Aust
--~--~-~--~~~---~--~
a.html ;)
> It's not a "court".
Overstatement. See above.
> And, again, it's easy to find these things out if you're genuinely
> interested; the Trac timeline and the developers' list are both
> well-advertised and publicly available.
Let's agree that
ccurate.
> [...]
You explained my points much better than I could (in plain English at least ;)
Thanks.
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
James,
thanks for your details answer. Let me put it right here: I'm not
complaining about the lack of dedication or progress in the
development of Django. It's more about visibility and marketing.
2007/10/1, James Bennett <[EMAIL PROTECTED]>:
> On 10/1/07, Stefan Ma
one version. That would be useful
for others too, I hope, but I do not want to fork or split the
development. However, I need some patches applied for our own work
faster than in the official version.
I'd like to know whether others feel the same and would like to see
(and discuss) a focused roa
it seems that each time I ask a game for its fleets or
systems, a new database query is executed and I have to cache them
manually and reset the cache manually if I add new ships or systems.
I'm afraid, I over-bend Django's ORM here...
--
Stefan Matthias Aust
--~--~-~--~---
alue, arg):
try:
return value[:int(arg)]
except ValueError:
return value
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
id=id)
...
except: Foo.DoesNotExist:
foo = None
...
or
for foo in Foo.objects.filter(id=id)[:1]: ...
but I wonder whether it might be useful to add a method get_or_none()
and another exists() method to the objects object. What do you think?
--
Stefan Matthias
arguments. They must be variables,
numbers or constants in quotes. To special case the last element of a
list, do this:
{% for item in items %}
{% if forloop.last %} class="last" {% endif %}
...
{% endfor %}
--
Stefan Matthias Aust
--~--~-~--~~~---~--
ric solution that requires no code
changes in contributed modules?
--
Stefan Matthias Aust // Truth until paradox
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
Greg,
2007/7/22, Greg <[EMAIL PROTECTED]>:
> Does anybody know how I can get the list position so I can put it in
> the url?
Search for "forloop.counter0" on
http://www.djangoproject.com/documentation/templates/#for
--
y
@transaction.commit_manually
def test(foo):
foo.count += 1
transaction.rollback()
class Test(unittest.TestCase):
def test_transactions(self):
foo = Foo(count=1)
test(foo)
self.assertEqual(1, foo.count)
The above code will fail. The count isn't reset to 1. It doe
2007/7/21, Tim Chase <[EMAIL PROTECTED]>:
> I believe you're looking for the word "arbitrary".
Yes. Thanks. Geeks should however take into consideration that a
"random access file" isn't called an "arbitra
d dictionaries, that is mutable
sequences. At the same time, I like how Django expresses relations
between objects and automatically manages them. So I tried to come up
with some custom relation class - and failed so far ;(
--
Stefan Matthias Aust
--~--~-~--~~~---~-
cannot use that.
Additional question: Is there a way to store serialized (a.k.a.
pickled) Python objects?
Thanks,
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
py" file. A simple view method will simply spawn a new
editor. Because I don't really know what to return from that view, it
will work best with a bit of Ajax.
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are su
2007/7/21, Nis Jørgensen <[EMAIL PROTECTED]>:
>
> Stefan Matthias Aust skrev:
> >
> > Let's assume you have users who are allowed to assign nick names to
> > theirselves and still all thoses nick names must be different. This is
> > want I call a random
ick names must be different. This is
want I call a random ID.
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegro
write their own custom
blogging solution because it's so easy? I guess not :)
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
4
Oh, it's not creating the ID, my question was whether I can safely
assume that I will always get an IntegrityError (and nothing else) and
whether just inserting stuff and catching errors is the recommended
Pythonic way.
--
Stefan Matthias Aust // Truth until paradox
--~--~-~--
If it is so easy to create a blogging application with Django, then
this should be an argument for a standard application, not against it
IMHO.
At minimum, it could become a nice example application, either as part
of the django distribution or as a separate download. And if it is
still easy enou
place
:) What I know about Python so far, this should be possible,
shouldn't it? If you can load and display the source code, you must be
able to save a modified version to the same location...
And, well, syntax coloring would be nice... no just kidding...
--
Stefan Mat
file. ... Wait, I think, _save_FIELD_file()
will eventually save the file and yes, that while loop is obviously
not threadsafe! So I need to set the filename myself. But how?
--
Stefan Matthias Aust
--~--~-~--~~~---~--~~
You received this message because yo
25 matches
Mail list logo