Re: Manager is not accessible via model instances

2009-09-18 Thread Tiago Serafim
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

Re: Design question: User vs. UserProfile

2009-09-18 Thread Tiago Serafim
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

Re: Embedding A List in urlpatterns

2009-09-17 Thread Tiago Serafim
ssing 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 all results for the list. > > I hope this makes some sense. I tried to be verbose as I'm new to the > framework. Thanks for any assistan

Re: How to get cms like features in Django

2009-09-15 Thread Tiago Serafim
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

Re: Getting fields in a user profile

2009-09-15 Thread Tiago Serafim
>>> g1.modify_dt > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'QuerySet' object has no attribute 'modify_dt' > > > -- Tiago Serafim --~--~-~--~~~---~--~~ You received this message because yo

Re: Getting fields in a user profile

2009-09-15 Thread Tiago Serafim
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

Re: path depth problem

2009-09-15 Thread Tiago Serafim
onstructive 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 su

Re: When did Paul join the Beatles?

2009-09-14 Thread Tiago Serafim
abase > call? > > -- Tiago Serafim --~--~-~--~~~---~--~~ 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 unsubscribe from th

Re: When did Paul join the Beatles?

2009-09-14 Thread Tiago Serafim
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

Re: Development and deployment wit Git

2009-09-14 Thread Tiago Serafim
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

Re: render a table

2009-09-14 Thread Tiago Serafim
{m.nome_fil}} > {{m.lungh}} > > {% endfor %} > > > can you help me to write it > > Thanks Luca > > > -- Tiago Serafim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Newbie: How to use object related to dropdown selection in django/javascript spaguetti code?

2009-09-13 Thread Tiago Serafim
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 =

Re: redirect after post caches anchor?

2009-09-12 Thread Tiago Serafim
like it would be a problem that > others have as well. > > Margie > > -- Tiago Serafim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: docstring format documentation for the admin doc contrib?

2009-09-12 Thread Tiago Serafim
"yeah,no,maybe"`` ``maybe`` >``None````"yeah,no"`` ``"no"`` (converts None to > False >if no mapping for None is > given. >== == > =====

Re: redirect after post caches anchor?

2009-09-12 Thread Tiago Serafim
; 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 > > > > > > > -- Tia

Re: Return something specific on 404's on a particular path

2009-09-11 Thread Tiago Serafim
ow can return a 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 --~--~-~--~~~-

Re: Couple of basic Django questions

2009-09-11 Thread Tiago Serafim
n 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 --~--~-~--~~---

Re: Javascript working on development, not apache

2009-09-11 Thread Tiago Serafim
ut why would it work in the 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. >