Michael Radziej wrote:
> d) make the database wrapper accept both unicode and bytestrings in
> the models, but always pass unicode strings to the database backend.
>
> Details:
>
> For #952 to work, the name of the character encoding has to be
> translated from python naming conventions to these
On 1/31/07, Marc Fargas Esteve <[EMAIL PROTECTED]> wrote:
>
> Hi,
> inline
>
> On 1/31/07, Matthew Flanagan <[EMAIL PROTECTED]> wrote:
> > The Django buildbot slave is currently running inside a Solaris 10
> > zone so it is virtualized...kind of.
> >
> > Let me clarify that testing python 2.3 and
James Bennett wrote:
> On 1/31/07, Joseph Perla <[EMAIL PROTECTED]> wrote:
>
>> Along the lines of get_or_create(), does it make sense to implement a
>> get_or_set() function for quick caches?
>>
>
> I'm not sure I see the use case here; it only works when the code to
> calculate the expen
On 1/31/07, Joseph Perla <[EMAIL PROTECTED]> wrote:
> Along the lines of get_or_create(), does it make sense to implement a
> get_or_set() function for quick caches?
I'm not sure I see the use case here; it only works when the code to
calculate the expensive value can be fit into a single stateme
Along the lines of get_or_create(), does it make sense to implement a
get_or_set() function for quick caches?
It can be used in this way:
from django.core.cache import cache
...
big_list = cache.get_or_set('big_list', lambda: BigItems.objects.all(),
60 * 60)
to retrieve from cache or
Rob Hudson wrote:
> But it's just a model name... Django doesn't break if you have an app
> with a model name of "Car", and another app with a model name of "Car".
> It's pretty good at keeping the models separated by app. I took at look
> at django.db.models.loading from the shell and it's keep
> Keep in mind that django.contrib.contenttypes gets installed by
> default, and is used by the comments app, the auth app, the admin app
> and the generic relations framework.
>
> It's hard to escape it :)
I quickly grepped the docs directory and it's not mentioned that you
can't have a model n
On 2/1/07, Frankie Robertson <[EMAIL PROTECTED]> wrote:
>
> On 29/01/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
> > Am a latecomer to newforms, loving it. I have minor issue with the way
> > prefixes are handled:
> > http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/t
On 1/31/07, Brian Beck <[EMAIL PROTECTED]> wrote:
> I agree; if your app isn't using the bundled ContentType, why should Django
> complain if you make your own?
Keep in mind that django.contrib.contenttypes gets installed by
default, and is used by the comments app, the auth app, the admin app
an
On 29/01/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote:
> Am a latecomer to newforms, loving it. I have minor issue with the way
> prefixes are handled:
> http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py#L2648
>
> The prefix is prepended to the form names, whic
Rob Hudson wrote:
>> Django has a builtin type called "ContentType",
>> http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
>>
>> I'd just rename yours to something else and be done with it.
>
> As a workaround, sure. I've already worked around the issue.
>
> But I don't t
On 1/31/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> > Django has a builtin type called "ContentType",
> > http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
> >
> > I'd just rename yours to something else and be done with it.
>
> As a workaround, sure. I've already worked
I don't see that as a limitation, think of it as a reserved word! you
can use MyContentType. Or maybe a core-dev can think more on this and
provide a better solution to allow gaving duplicate names (but I'm not
sure if this problem applies to models on different apps or just on
"some" models that
> Django has a builtin type called "ContentType",
> http://code.djangoproject.com/browser/django/trunk/django/contrib/con...
>
> I'd just rename yours to something else and be done with it.
As a workaround, sure. I've already worked around the issue.
But I don't think Django would want this typ
Dear Djangoists,
the company I work for is looking for a new contractor to work on a
"phase 2" of a django app now in production. You are the captain of
the ship but will be working alongside a team of pythonists and
rubyists, a handful of whom will be available to conduct code reviews.
_
Compa
On 1/30/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> I'm getting a weird bug here and this is what I've deduced...
>
> I've got a "Page" model and a "Content" model. Content has a FK to
> Page. I also have a "ContentType" model and Content has a FK to
> ContentType. This is where I tell it if
Ah, ok.. I understand a little better now what you are trying to do.
I definitely agree that a solution to this would be a useful addition;
I would only advocate for considering the "request.stem" method
instead. As with your patch, it is completely backwards-compatible
and works with nested incl
Hi,
Adrian, can you give us a bit of guidance on how to use newforms
with "funky characters" and unicode, please? We're getting quite a
few tickets on this, and I really don't know what the expected
behaviour is and what not.
Some specific questions that come to my mind:
- Should you use unicod
Well, Matt and Adrian closed the ticket with some similar argument.
But I respectfuly disagree :-)
In muramas example above, (r'^news/', 'myproject.apps.news.urls',
{'stem':'news'}) this does not solve my problem, because in my case
(assuming that this pattern is in an included urls.py) the stem
Hi,
A few days ago, I wrote:
> I see three ways to fix the problem in #3370:
>
> a) newforms stops passing unicode strings to the Database API and uses
> bytestrings.
>
> b) the database wrapper in Django sets connection.charset (but needs to
> translate the charset name since the databases don
I actually wrote a patch yesterday to solve the same problem, but for
different reasons (and using a different method). From my
perspective, the larger problem that access to the URL 'stem' can
solve is to decouple apps from projects, making it much easier to
write relocatable, "drop-in" applicat
Hi,
inline
On 1/31/07, Matthew Flanagan <[EMAIL PROTECTED]> wrote:
> The Django buildbot slave is currently running inside a Solaris 10
> zone so it is virtualized...kind of.
>
> Let me clarify that testing python 2.3 and 2.4 would require a
> separate buildbot master than pybots unless you can t
Hi,
see ticket
http://code.djangoproject.com/ticket/3257
it conatins a ModelChoiceField, that does a bit more - it also returns
a valid object, not just the ID
the ticket has been accepted I am only waiting for decision on whether
to prepend an empty choice ("", "--") or any suggestion on ot
23 matches
Mail list logo