Try this:
def get_active_members(self):
return return self.get_query_set().filter(is_active=True)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
I`d go with the first. It`s easier to get the current logged in user and all
other pluggable apps use User, so it's a common thing to do and you can
integrate things easily .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
rong path
> here. The above comes back with a TypeError saying "unhashable type:
> 'list'" ... I'm guessing that you can't put a list in place of the raw
> string that the patterns method expects. So, my question is... how do
> I get patterns to match al
If it's simple enough, check FlatPages. Comes bundled with django, so you
have it running within minutes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
ck (most recent call last):
> File "", line 1, in
> AttributeError: 'QuerySet' object has no attribute 'modify_dt'
>
>
>
--
Tiago Serafim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Hi,
filter returns a list, with zero or more elements. To fix what you showed,
you should call "get" instead of "filter". "get" either return a object or
throws an Exception. Check the docs for more info.
--~--~-~--~~~---~--~~
You received this message because you
e advice about my coding style, you get
> bonus points for heaven and I love you till the end of my life. :-D
>
> Thanks in advance,
> nick
>
> >
>
--
Tiago Serafim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Yes, it's inefficient. Yes, there's a way to do what you want:
memberships = Membership.objects.all().select_related('group', 'person')
;-)
On Mon, Sep 14, 2009 at 5:27 PM, W.P. McNeill wrote:
>
> Is this inefficient? Is there a way to do this with a si
You should query Membership like you do with any other model.
paul = Person.objects.get(...)
beatles = Group.objects.get(...)
membership = Membership.objects.get(person=paul, group=beatles)
print membership.join_date
--~--~-~--~~~---~--~~
You received this message
I recommend http://repositoryhosting.com/ . I needed the support a couple of
times and they were *very* responsive. The service is great and the price is
very fair.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
>
> {% endfor %}
>
>
> can you help me to write it
>
> Thanks Luca
> >
>
--
Tiago Serafim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
Hi,
First you should have an attribute "name" on your select. It's needed to
pass the value when the form is submitted.
If your select's name is "foos_combo", then your code you'll look like this:
def foo_relatory(request):
if request.method == 'POST':
foos_combo = request.POST['foo
IE, tell the
> client to act as it would act if the client had initiated a new GET?
>
> Where would I find documentation on this? Or not necessarily doc but
> just something that discusses this problem. My googling didn't turn
> up much of anything but it seems like it
o"`` ``"no"`` (converts None to
> False
>if no mapping for None is
> given.
>== ==
> ======
>"""
>
> I would like to document my own
k/12/ HTTP/1.1" 302
> 0
> [12/Sep/2009 18:16:52] "GET /taskmanager/edit_task/12/ HTTP/1.1" 200
> 50904
>
> So the #comment_101 is not there, yet it still appears in my firefox
> browser. Anyone know why this is?
>
> Thanks,
> Margie
>
>
>
>
specific image when there is a 404 error for an image on a
> path?
> I can also resort to showing nothing, but that could make styling harder.
> If there's is a way to do this, I'd like to.
>
> >
>
--
Tiago Serafim
--~--~-~--~~~---~--~--
ch been used on
open source apps.
> 2. Does Django have dynamic loading of stylesheet and javascript files
> (as rails)?
>
>
You have to load yourself. You can use the MEDIA_URL context variable to
help you to not hardcode paths. Like this:
HTH.
--
Tiago Serafim
--~--~-~-
he development server and
> not Apache?
>
> Most of my js is linked. Oh, maybe I should make it local and see what
> that does. I will try that and if it works, I will respond to my own
> problem, if not, I will leave this open.
>
&
18 matches
Mail list logo