wrote:
>
> Probably not it, but try:
>
> ...(RestaurantType, default = lambda: (RestaurantType.objects.all()[0]))
>
> And note that your alternate will fail if RestaurantType object with id==1
> is ever deleted.
>
>
> On Tue, Nov 26, 2013 at 7:31 AM, Philippe Raoult
>
&
I ran into a strange issue today when trying to use a lambda function for
the default value of a ForeignKey.
my original code was this, and I expected it would look for RestaurantType
instances whenever I would try to create a Restaurant:
type_of_restaurant = models.ForeignKey(RestaurantType, d
012 7:38:27 AM UTC+2, Jani Tiainen wrote:
>
> 19.9.2012 16:13, Philippe Raoult kirjoitti:
> > Hello all,
> >
> > I'm using django templates to generate pdf listings in my app. After
> > running render() on the template, reportlab is called to create the pdf.
>
Hello all,
I'm using django templates to generate pdf listings in my app. After
running render() on the template, reportlab is called to create the pdf.
My issue is that those listings can get quite big (hundreds of pages, with
images) and thus take very long to render. Reportlab has progress
I'll only reply to (2): Django is very suitable for web apps. I'm
building one and I've never felt limited in any way. Django lets you
write your own templates, so adding heavy ajax interfaces is painless.
I can't give you pointers because it's a custom in-house thing, but
it's close to 30k lines
Hi Sam,
I've read your description and it doesn't mention how often your data
changes. If it's not too often, you might want to consider simply
caching the whole results or parts of it. You'll then have to add a
bit of code to regenerate the cache every time the data changes. It
looks to me like y
I don't know what you mean by mid-sized but I deployed exactly what
you're describing in a 45-strong company. We have occasional browser
incompatibilities with ajax but overall django was very much the right
tool for the job. As a bonus the company's clients can now access a
restricted part of the
Strike all that, I made a mistake which is very clear on the test case
but wasn't so in the original code.
Philippe
On 9 juin, 18:00, Philippe Raoult wrote:
> Hello all,
>
> I've been hunting for a bug in my generic search form and it boils
> down to this: I (wrongly) ex
Hello all,
I've been hunting for a bug in my generic search form and it boils
down to this: I (wrongly) expected chained filters to behave as if
they were AND'd and they sometimes behave as OR'd. That was a bit
puzzling for me since the documentation seems to indicate that AND
would be the logica
Hi,
I started my project with a similar workflow but I soon ran into
troubles so I adopted the following one:
- svn repository has a production branch and a trunk
- my dev is done on trunk, on various machines (desktop, laptop, test
server)
- whenever I want to push something to the production s
pening but not closing).
Last but not least, it seems my arguments now arrive url-quoted (ie
%20 instead of space) to my view while this used not to be the case in
0.96. Maybe I was doing something wrong back then (?).
Philippe
On Oct 27, 5:37 pm, Philippe Raoult <[EMAIL PROTECTED]> wrote:
>
:
NoReverseMatch: Reverse for '' with arguments '(56650L, u'blah/blih')' and keyword
arguments '{}' not found.
Has anyone managed to use accented caracters in urls with 1.0.X ?
Regards,
Philippe
On Oct 18, 1:58 pm, "Russell Keith-Magee" <[EMAIL PRO
Hello all,
I've starting porting my little app (20k loc) from 0.96 to 1.0 and
I've been hitting a wall of reverse/url errors. I haven't seen
anything in the porting wiki page so I'm wondering if anyone has
already encountered similar issues ?
I'm seeing stuff like: Reverse for '' with arguments
13 matches
Mail list logo