Re: url styling

2007-08-10 Thread Lucky B
I think the second is better because you're being consistent in your hierarchy order. IE you're going from least specific to most specific: domain -> object -> instance ->action Instead, in the first one you're going: domain -> action -> object -> instance Then again, it's purely preference.

Re: Textile causing UnicodeDecodeError

2007-08-05 Thread Lucky B
from here: http://64.233.169.104/search?q=cache:bswtnEOJ33QJ:douglasjarquin.com/blog/2007/07/13/unicode-django-and-textile/+textile+unicode=en=clnk=3=us=firefox-a try textile.textile(str(self.source)) On Aug 5, 12:34 pm, Martin Gilday <[EMAIL PROTECTED]> wrote: > I have added textile.py to my

Re: age in years calculation

2007-08-03 Thread Lucky B
how about surrounding the statement with a try and work the leap year to regular year case with the exception? On Aug 3, 10:16 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Jonathan Buchanan wrote: > > > > > >http://toys.jacobian.org/presentations/2007/oscon/tutorial/ > > > Slide 14,

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
God, 0/2, just do what John proposed, I am not thinking straight right now, what I would give for an edit capability on my emails, I'll spend all of tonight removing my foot from my mouth. On Aug 2, 10:49 pm, Lucky B <[EMAIL PROTECTED]> wrote: > Ok, I've thought about it some more, an

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
the middle-man model. I am pretty sure that's the only way to do it, but I could be wrong. On Aug 2, 10:29 pm, Lucky B <[EMAIL PROTECTED]> wrote: > ack, I missed a few things, the ingredient-quantity measure. not sure > how to do that. ignore my previous message. > > On Aug 2, 10:27 p

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
ack, I missed a few things, the ingredient-quantity measure. not sure how to do that. ignore my previous message. On Aug 2, 10:27 pm, Lucky B <[EMAIL PROTECTED]> wrote: > You're missing just: > ingredients = models.ManyToManyField(Ingredient) > > In your recipe model. > &

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
You're missing just: ingredients = models.ManyToManyField(Ingredient) In your recipe model. If you want a pretty interface in admin (if you're not using newforms- admin) then: ingredients = models.ManyToManyField('Ingredient', filter_interface=models.HORIZONTAL) On Aug 2, 10:13 pm, "Shane

Re: how to handle forms with more than submit button

2007-08-02 Thread Lucky B
create different URLs (and thus different views) for the different buttons and then redirect to wherever you want to go. On Aug 2, 10:13 pm, james_027 <[EMAIL PROTECTED]> wrote: > Hi, > > How do I handle this situation wherein I want different submit button > to call different method on the

Re: Queryset of instances bound to particular ForeignKey

2007-08-02 Thread Lucky B
If I gather correctly you want to see every ModelA that's bound to a particular ModelB b? ModelA.objects.filter(modelBs=b) That gives you what you want. On Aug 2, 7:20 pm, Benjamin Goldenberg <[EMAIL PROTECTED]> wrote: > Hi everyone, > I asked about this earlier today on IRC and no one knew of

Re: Admin and ManyToManyField

2007-08-02 Thread Lucky B
null=True only affects the database representation, you need to set blank=True. The reason you can do it in the command line is that you can bypass admin's validators through the command line. On Aug 2, 11:08 am, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I have a model that has a

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Lucky B
I think you should be using form_for_instance on the dvd instance instead of the generic form contructor. http://www.djangoproject.com/documentation/newforms/#form-for-instance On Aug 2, 11:14 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > No ideas anyone? :-/

Re: Something like a mini Crystal Reports with Django

2007-08-02 Thread Lucky B
You could try Eclipse BIRT for a WYSIWYG interface. But otherwise you can create a view however you want to report your data doing whatever manipulation you wanted. I don't see what else you would need other than to create a view. On Aug 2, 5:17 am, Mir Nazim <[EMAIL PROTECTED]> wrote: > Anybody

Re: Do I have to send shopping cart data to every template in my app?

2007-08-02 Thread Lucky B
You can create a custom tag, I've never done it myself, but it's in the docs: http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags I am sure you can get more help if you need it, but this should get you started. On Aug 2, 12:51 am, Greg <[EMAIL PROTECTED]>

Re: something I really don't know in using manage.py shell

2007-08-02 Thread Lucky B
You should be doing >>> p = Profile.objects.get(id=1)#or .get(1) or one of the many other >>> posibilities filter returns a list of the results, in the case of id=# it probably returns only one, but it's still a list of one member. So in your case it would work if you did this: >>>p=

Re: How to display all my post data

2007-07-23 Thread Lucky B
You could also throw an exception, if you have debug on it'll have everything including the post data. On Jul 22, 11:34 pm, Doug B <[EMAIL PROTECTED]> wrote: > Assuming you just want to debug and are using the dev server you can > just do "print request.POST" and it will show up on the dev