Hi.
This is probably trivial, but I've not managed to find the solution.
How do I filter objects based on the count of a ManyToManyField?
My example:
I have two classes -- Blog and Submission:
class Blog( models.Model ):
entries = models.ManyToManyField( Submission )
class Submission( mod
Hi Daniel,
On Sun, 2006-07-16 at 09:07 +, [EMAIL PROTECTED] wrote:
> Hi.
>
> This is probably trivial, but I've not managed to find the solution.
> How do I filter objects based on the count of a ManyToManyField?
>
> My example:
>
> I have two classes -- Blog and Submission:
>
> class Blo
nice. didn“t see that.
Am 15.07.2006 um 18:29 schrieb [EMAIL PROTECTED]:
>
> There is:
> http://code.djangoproject.com/wiki/FormField
>
> Chris
>
>
> >
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users
On Sun, 2006-07-16 at 19:24 +1000, Malcolm Tredinnick wrote:
> Hi Daniel,
>
> On Sun, 2006-07-16 at 09:07 +, [EMAIL PROTECTED] wrote:
> > Hi.
> >
> > This is probably trivial, but I've not managed to find the solution.
> > How do I filter objects based on the count of a ManyToManyField?
> >
Hi.
Malcolm Tredinnick wrote:
> I'll agree this one isn't too obvious (until you see the answer):
>
> Blog.objects.filter(entries__isnull = False)
>
> will do what you want (have a look at the underlying SQL query is you
> are interested in seeing that it really works as advertised).
I'm
On Sun, 2006-07-16 at 09:33 +, [EMAIL PROTECTED] wrote:
> Hi.
>
> Malcolm Tredinnick wrote:
> > I'll agree this one isn't too obvious (until you see the answer):
> >
> > Blog.objects.filter(entries__isnull = False)
> >
> > will do what you want (have a look at the underlying SQL query
Hi.
I'm pretty sure I didn't rename anything after creating the DB.
The error message I got was that the column
"m2m_models_blog__entries.entries" doesn't exist. I get the same error
when executing the SQL in psql directly.
I hadn't seen that the m2m stuff was in the "AS" clause. OK, so
m2m_mod
Martin,You mean if I access the model? I tried looking up a close() method for the DB api but couldn't find anything.Could you be more specific, maybe give an example, so I can write it down in case I ever need it.
Currently trying to learn django, so I have a lot of newbie questions.-nick parrinOn
On Sun, 2006-07-16 at 10:09 +, [EMAIL PROTECTED] wrote:
> Hi.
>
> I'm pretty sure I didn't rename anything after creating the DB.
>
> The error message I got was that the column
> "m2m_models_blog__entries.entries" doesn't exist. I get the same error
> when executing the SQL in psql directly
Can you give some more details on how to implement this in django, how
to use it with the admin interface?
mamcxyz wrote:
> I don't think my code is usefull for you... I build the tree from a
> list like:
>
> ['uno\dos\tres','dos\tres\cuatro','pepe\papa\pepa']
>
> However the API of elementree e
I'm trying to come up with a way of writing re-useable code for certain
common features on two-point-oh-y sites. This might become a long post,
so apologies in advance.
Say your building the standard blog application. It's conceivable that
you'd want your users to add comments, add tags, and rate
On Sun, 2006-07-16 at 12:37 +, Paul wrote:
> I'm trying to come up with a way of writing re-useable code for certain
> common features on two-point-oh-y sites. This might become a long post,
> so apologies in advance.
>
> Say your building the standard blog application. It's conceivable that
Thanks Malcolm, I thought people must have solved this problem. I just
didn't realise what the ContentType field was.
I also found Luke Plant's tagging app
(http://groups.google.com/group/django-users/browse_thread/thread/a7cbd4fd843583be)
in which he has a GenericForeignKey, but I'll investigate
I've done some httperf testing og the django server. I've used Arch
Linux (i686) on a Acer Aspire 5002 WLMi Laptop (AMD Turion 1,6GHz,
512MB DDR RAM) from text mode (no X running) I've tested a working
django server with:
httperf --server=localhost --port=8080 --uri=/test/ --num-conns=7000
--num-
The core version was built using Luke Plant's work and Ian Holsman's
work, kind of the best of both worlds.
Cheers,
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group
Hi,
I am trying to figure out the best way to deal with object/user centric
object creation. I am building a site that lets users create objects
tied to their identities, for e.g. having users posting news entries,
etc.
Currently one can make a wrapper to deal with checking a user's access
for v
I have built a menu structure, using the category data model,
http://code.djangoproject.com/wiki/CookBookCategoryDataModelPostMagic
So, every category is a menu item, and can be a parent of multiple
categories. In the admin, everything works fine, but now i'm building
my templates.
The problem is,
I am currently working on putting together a project plan (for my grad
project) to create training on how to use web 2.0 frameworks
(specifically Django). Does anyone think there is a need for such
training? The training would include video and consist of interactive
modules. The training would be
On Jul 16, 2006, at 8:45 AM, [EMAIL PROTECTED] wrote:
> I've done some httperf testing og the django server. I've used Arch
> Linux (i686) on a Acer Aspire 5002 WLMi Laptop (AMD Turion 1,6GHz,
> 512MB DDR RAM) from text mode (no X running)
Interesting stuff -- thanks for the benchmarks.
I'd note
The test django page used no DB and the test itself didn't do much I/O
operations and the system didn't go into swap. As for errors I get this
from the running server (in console):
###
Traceback (most recent call last):
File
"/home/piotr/nowe/pytho
On 7/16/06, bobj <[EMAIL PROTECTED]> wrote:
>
> I am currently working on putting together a project plan (for my grad
> project) to create training on how to use web 2.0 frameworks
> (specifically Django). Does anyone think there is a need for such
> training?
I think that'd be great. One of th
Sorry Nick,
but the comment about the database access wasn't mine.. so I cannot
help you here
Martin
On 7/16/06, Nick <[EMAIL PROTECTED]> wrote:
> Martin,
>
> You mean if I access the model? I tried looking up a close() method for the
> DB api but couldn't find anything.
> Could you be more
heck yes, django is scary for non-programmers. training would be
great, I'll be your first trainee.
On 7/16/06, bobj <[EMAIL PROTECTED]> wrote:
>
> I am currently working on putting together a project plan (for my grad
> project) to create training on how to use web 2.0 frameworks
> (specifically
Nick wrote:
> Martin,
Well, not exactly :-)
> You mean if I access the model?
Yes. By the time your response iterator starts working Django has
already closed the database connection used in the request. If you try
to access a model a connection will be automatically opened again but
never c
a nice overview of the test (django and pylons) can be found here:
http://www.cms.rk.edu.pl/benchmark.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to d
On 7/16/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
Nick wrote:> Martin,Well, not exactly :-)Haha, shouldn't post with my eyes closed while waking up.
> You mean if I access the model?Yes. By the time your response iterator starts working Django hasalready closed the database connection used in th
> Well... A tag (or rather a filter) choosing one of three forms would be
> very simple. In fact I've heard gettext already has such functionality
> but I'm not very familliar with it. What is required in Django itself is
> some mechanism choosing the right pluralization plugin based on page
> lan
is this a test of django vs pylons or a test of mod_python vs wsgi ?
a pre-test showing a serving a simple static page through both of
them (also 15k) would highlight
if django's templating engine is indeed faster than pylons.
(and it might convince the pylons team to use mod-python instead of
Is there any way to specify a user-friendly name for fields when
creating a Form object?
I have a change password view, and right now I'm getting error
messages like
This field must match the 'new_password' field.
Obviously, I'd prefer something like the field's label, rather than
the fie
django vs pylons - their servers showing a page which uses a template
with 5 variables (values returned by the view/controller)
no mod_python, apache or any other.
I'll test X + lighttp/apache soon (I need to read the docs ;) )
--~--~-~--~~~---~--~~
You received
I've checked out the latest SVN version of Django, but when I try
'python manage.py shell' I get the standard shell, not IPython. But I
have IPython installed on my computer. At the shell's command prompt I
can just type 'import IPython' without a problem. I have IPython
installed with readline, c
Sorry, I had an old version of Django installed which caused the
problems.
--~--~-~--~~~---~--~~
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@googlegroups.com
To
Thanks for your reply. I'm trying what you said but I can't get it to
work. If I put class "City" first, "Place" doesn't work, and if I put
another class first, other classes get errors. Not sure what is wrong
with the order.
from django.db import models
class City(models.Model):
CITIES =
On Sun, 2006-07-16 at 15:46 -0700, webd0012 wrote:
> Thanks for your reply. I'm trying what you said but I can't get it to
> work. If I put class "City" first, "Place" doesn't work, and if I put
> another class first, other classes get errors. Not sure what is wrong
> with the order.
>
> from
Ivan Sagalaev wrote:
> Russell Keith-Magee wrote:
> > This should be fairly easy to extend to a 1,2,3,4,... case; in your
> > dolphin case, something like delfin{{ num_delfinov|pluralize:",a,i,ov"}}
> >
> > (excuse my Slovenian if I've messed up your example :-)
>
> The problem is that it's not 1,
On Sun, 2006-07-16 at 17:46 -0400, Todd O'Bryan wrote:
> Is there any way to specify a user-friendly name for fields when
> creating a Form object?
>
> I have a change password view, and right now I'm getting error
> messages like
>
> This field must match the 'new_password' field.
>
> Obvi
On Jul 16, 2006, at 7:38 PM, Malcolm Tredinnick wrote:
>
> On Sun, 2006-07-16 at 17:46 -0400, Todd O'Bryan wrote:
>> Is there any way to specify a user-friendly name for fields when
>> creating a Form object?
>>
>> I have a change password view, and right now I'm getting error
>> messages like
>
carlito556 wrote:
> Free video of the Jenna Jameson
>
> at http://www.rosapink.net
Jenna Jameson and Django Reindhardt, who knew?
Those jazz players are always trouble ... ; )
Iain
"I'm all in favour of grants for jazz musicians. Or any other brand of
scotch" -- Eddie Condon
--~--~-~
On Jul 16, 2006, at 7:51 PM, Todd O'Bryan wrote:
>
>
> On Jul 16, 2006, at 7:38 PM, Malcolm Tredinnick wrote:
>
>>
>> On Sun, 2006-07-16 at 17:46 -0400, Todd O'Bryan wrote:
>>> Is there any way to specify a user-friendly name for fields when
>>> creating a Form object?
>>>
>>> I have a change pa
On 17-Jul-06, at 12:47 AM, Leon wrote:
> heck yes, django is scary for non-programmers. training would be
> great, I'll be your first trainee.
it is not meant for non programmers
--
regards
kg
http://lawgon.livejournal.com
http://avsap.org.in
--~--~-~--~~~---~-
i meant non-programmers as in people who are programming literate, but
don't consider themselves the programmer or spend their life in code.
On 7/16/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
>
> On 17-Jul-06, at 12:47 AM, Leon wrote:
>
> > heck yes, django is scary for non-programmers. t
/utils/feedgenerator.py has code to add the 'comments' field to
feeds but it seems contrib.syndication.views.feed doesn't deal with it
if I use it on my child Feed class.
Am I doing something wrong? Is this intended? The docs don't mention
item_comments()...
I would like to use it, if it's
Free video of the Jenna Jameson
at http://www.rosapink.net
Tell your friends it's free !!
--~--~-~--~~~---~--~~
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@g
43 matches
Mail list logo