Re: Howto not delete record after X days?

2009-07-28 Thread Dan Radez
How about pass in a context variable? render the template with something like conext = { ...snip 'editable': form.entered <= date -3, ... snip ... } then in your template do {% if editable %} HTML Delete button {% endif %} On 07/28/2009 11:16 AM, Keith Pettit wrote: > I need to be a

Re: import a variable form views to forms

2009-06-29 Thread Dan Radez
On 06/29/2009 10:48 AM, ariest wrote: > Sorry, this is the actual code: > > views.py > > def parent(request): > user = request.user > key = user.get_profile().link > p = Parent.objects.get(pk = key) > children = p.children.all() > if request.method == 'POST': > fo

Yet another schema managing idea

2009-06-25 Thread Dan Radez
I have been looking for a way to apply and manage my model changes to my db schema. This came out of a brainstorm yesterday afternoon. Just wanted to pass the idea through the community to see where it fits, if anywhere, upstream. The general idea is to save sqlall output from manage.py. You t