Hi Derek,
> How and where can this be done?
I've recently been developing a project that uses MongoDB to audit
Django models. I've just published an early version of this work on
launchpad: https://launchpad.net/django-audit/ I haven't got around to
writing any documentation yet, but if you're ke
On May 1, 4:00 am, Dj Gilcrease wrote:
> Ya I saw the announcement on it the day I pushed my code to google,
> hence my remark about not being tied to a "NoSQL" solution. I had
> already created the project name by the time I saw the announcement so
> just went with it
This is all very well, but
On May 4, 11:21 am, Dj Gilcrease wrote:
> Google code wont let me change the project name without deleting and
> recreating the project so I just added a note to the top
That is quite annoying. I hope you can find a good solution to that
problem.
> "This is a fairly comprehensive Audit Trail App
Hi Chris,
First of all, I never had much luck writing reproducible tests for
Django models with the fixture system that comes built into Django as
I never got consistent results and found the XML a pain to maintain. I
came across Fixture - http://code.google.com/p/fixture/ We have this
running wit
I've found the best way to solve these problems is to use a
values_list queryset and inject the result of the into the outer
query. Django is smart and doesn't actually evaluate the values_list
query and instead injects that as a sub query in the SQL.
However in this case can't you simply do:
Use
Hi Tom,
Whilst Django annotation is great, it is rather simplistic in nature
and can only do very basic Count, Sum, Avg, etc. which do not allow
any filtering (i.e. a WHERE clause in the SQL).
Unless there are major differences in 1.2 (which I haven't seen) then
you won't be able to do what you w
Darren,
This seems like quite a complex problem and I'm not sure whether the
Django ORM would be up to it. I've had a lot of trouble when using
multiple annotations on Querysets when JOINs are involved as Django
does the wrong thing.
Have you considered using a schemaless DB like MongoDB for your
Hi,
Could you explain the situation in a little more detail as I don't
quite follow what you mean. As far as I'm aware if you have something
like the following:
>>> my_inst = MyModel(foo="bar", ...)
>>> my_inst.save()
You'll have the pk at this point even if the transaction hasn't been
committed
Yeah jQuery added this annoying "feature" in 1.4.
There's no "nice" way around it other than to recognise that any JS
arrays will have this suffix.
Euan
On 29 May, 05:33, pyfreak wrote:
> I accept this as normal now. I think, what I'll need to do if I'm
> against stripping off the two character
I would recommend using google charts. There are a couple of python
implementations for this. I've used GChartWrapper with some success,
but found it a little clunky in its implementation.
Euan
On Jun 2, 7:35 am, rahul jain wrote:
> Hi Django,
>
> I would like to represent my db/model content in
Hi,
I've done something similar to this using annotation. It is a bad
nasty, but should work.
Firstly annotate all the MyModel instances with the max value of the
pk of the MyOtherModel:
qs = MyModel.objects.annotate(last_pk=Max('myothermodel__pk'))
Then filter these based on the myString:
qs
This sounds like a path type issue and these sorts of things are a
PITA to sort out. Have you tried setting the settings path a bit more
explitly:
os.environ["DJANGO_SETTINGS_MODULE"]="django_project.settings"
I had some trouble with kind of thing in a project I was working on
(https://launchpad.
I'd just create a related model and use a many-to-many field.
Alternatively you could write your own field, but this would restrict
your application to postgres only.
Euan
On Jun 10, 1:03 pm, bjja wrote:
> Hi
>
> Psycopg2 supports array types but I can not find any evident
> information whether
It should be easy enough to write your own tag providing you're
expecting your input in the form . I've written
a bit of code that should do this:
import re
LABEL_RE = re.compile(r'^(\w+) (\d+)$')
def order_by_number(unordered_data):
tokenized_data = []
for item in unordered_data:
If you're worried about the data getting out of order use a counter in
JS and always ensure that you only update the page when you get the
correct (i.e. current) counter back.
I think what you're talking about isn't possible in normal HTTP. I
think you have a one request, one response situation.
As far as I know Django maintains a persistent connection to the
database server and restarting the server without restarting the
client isn't possible. We never restart our live database server in
production (we fail over to a secondary server so that the app is
essentially only vulnerable for a f
I agree with the previous poster - the title is misleading as the word
"method" is incorrect in both places.
It seems that the original poster is talking about denormalizing data.
However, this is unnecessary as the ORM allows for this type of data
to be retrieved any how, e.g.
Car.objects.all().s
Hi,
I've recently been working on an open source project to augment the
inheritance of models in Django. This project, called "djeneralize"
allows you to declare specializations on your models and then query
the general case model and get back the specialized instances. A
simple example of the mod
write the package was just to augment Django's model inheritance which
did almost everything we needed.
Thanks again for the link.
Euan
On Jan 25, 2:26 pm, Tom Evans wrote:
> On Tue, Jan 25, 2011 at 11:43 AM, Euan Goddard wrote:
> > Hi,
>
> > I've recently bee
can't you do self.model.main?
On Jan 25, 3:34 pm, kmpm wrote:
> I have some issues with getting hold of the instance of a Model to which a
> RelatedManager got contributed to.
> Is that at all possible and if so, how?
>
> From *my_method* below I can get hold of the model *RelatedStuff* by callin
20 matches
Mail list logo