My web app hits the database up to 3k per page because it has to retrieve
data from lots of related models. It has a fairly normalised database with
a structure similar to:
- one project has many contracts
- one project has many tenders (a tender is put forward by a contractor)
- one contract h
> in your case:
>
> class Event(models.Model):
> name = models.CharField(.)
> description = models.CharField()
> tw_start = models.DateTimeField()
> tw_finish= models.DateTimeField()
> timewindow = TimeWindowField(tw_start, tw_finish)
>
> and getDuration() is a me
data consistency.
However, it doesn't really make much sense to incur the cost of this
(through joins) if the object that is being modelled is a value object.
So does anyone have any experience with this problem/trade-off in the
Django world?
On Saturday, 29 December 2012 18:53:05 UTC+11,
Hi,
I'm stuck on the best way of implementing design by composition in Django,
and was wondering if anyone had any suggestions/pointers/past experiences.
Say you're designing an event management program. Each event has a name,
occurs in a suburb, and has a start time and end time. Say you want
ould be in a normal view. In that case:
>
> return HttpResponse(json_data, mimetype="application/json")
>
>
> On Thu, Jun 21, 2012 at 6:54 AM, Taras_96 wrote:
>
>> Does anyone have opinions on the best way of having middleware catch
>> exceptions, and instead
Does anyone have opinions on the best way of having middleware catch
exceptions, and instead of rendering the error into a HTML template, to
return a JSON object? Currently I have the middleware below that catches
exceptions, and if it can find an extra user error message, puts that onto
the
Hi,
I've just upgraded to Django 1.4, and I was getting a
'builtin_function_or_method' object has no attribute 'split' error
being thrown. I traced this down to an erroneous use of distinct, I
had:
X.objects.distinct(id)
Which had previously worked, but was now throwing. I've removed the
'id' p
7 matches
Mail list logo