Re: format date output in mail form

2009-12-21 Thread rvandam
gt; > > Hello, > > > can you show how date is being printed? Maybe if you try to create an > > "template" using {{ date|date:"j N \d\e Y" }} (or what else format you > > want) and just call render passing an context with the datetime > > objec

Re: format date output in mail form

2009-12-21 Thread rvandam
? On 18 dec, 11:21, rvandam wrote: > I saw a solution on the list to format a datefield in a template. > Unfortunately i didnt find any solution for formatting a datefield in > a mailform. I have this in my model: > >   Aankomst = forms.DateField(('%d/%m/%Y',), widget=form

format date output in mail form

2009-12-18 Thread rvandam
I saw a solution on the list to format a datefield in a template. Unfortunately i didnt find any solution for formatting a datefield in a mailform. I have this in my model: Aankomst = forms.DateField(('%d/%m/%Y',), widget=forms.DateTimeInput (format='%d/%m/%Y', attrs={ 'c

Re: browser input and strings

2009-12-07 Thread rvandam
>         browse_lijst = Nl.objects.filter(lijst__slug=browse) > > Does that solve your problem? > -- > DR. Yes Thanks a lot :-) Rob -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googleg

Re: browser input and strings

2009-12-07 Thread rvandam
Sorry for the confusion. Here are both complete models: class Nl(models.Model): publiceren = models.BooleanField() titel = models.CharField(max_length=60) tekst = models.TextField() prijs = models.CharField(max_length=12) #tekst_html = models.TextField(edita

Re: browser input and strings

2009-12-07 Thread rvandam
I cut the model down too much this one is missing: lijst = models.ForeignKey('Menu_nl') this is the Menu_nl model: class Menu_nl(models.Model): categorie = models.CharField(max_length=50) order = models.IntegerField() slug = models.SlugField() def __unicode__(self)

Re: browser input and strings

2009-12-07 Thread rvandam
Hi Shawn thanks for your reply. I have some categories, with multiple items per category. If a user enters http://mysite.com/items-from-100-to-1000 I want a short description of all items in that category listed. I have done this so far with: {% for x in browse_lijst %} {% ifequal x.lijst.__s

browser input and strings

2009-12-07 Thread rvandam
I have an application that generates a list of items in a category. Therefore i have this in my urls.py: (r'^categorie/(.*)/$', browse_page), This is my view..py: def browse_page(request, browse): browse_lijst = Nl.objects.all() menu = Menu_nl.objects.all().order_by('order')

Re: how to handle menu links in a template

2009-10-18 Thread rvandam
Thanks a lot for your help! In case someone is struggling with the same here is a link how to handle custom context processors: http://stackoverflow.com/questions/433162/can-i-access-constants-in-settings-py-from-templates-in-django --~--~-~--~~~---~--~~ You receiv

how to handle menu links in a template

2009-10-17 Thread rvandam
I started with a parent template with a menu included. The links in the menu are relative. This works fine for statical template pages, but things go wrong when i add dynamic pages. For example a page with forms only works from a subdirectory like /forms/ and al my relative links dont work anymore

Re: dilemma with urls and templates

2009-10-13 Thread rvandam
I had to use {{ MEDIA_URL }} instead of {% MEDIA_URL %} (gave me a template error) Adding a template context processor was not option for me because for the static part i have no views/models defined. Thanks for the answer! I didnt think of solving it this way. Rob --~--~-~--~~-

dilemma with urls and templates

2009-10-13 Thread rvandam
I am working on a site with a static part (i use the Djano tempate system to separate menu's and header from the content), and a dynamic part. For the static part i have a directory structure like: index.html page1.html page2.html request for / will load index.html A part of my urls.py: (r

Re: reduce the amount of classes shown in the admin panel

2009-07-23 Thread rvandam
Oh no, how stupid of me. First i register the models in admin.py, and then i ask how to get rid of them :/ Thank you for your answer. I think its time for a break. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

reduce the amount of classes shown in the admin panel

2009-07-23 Thread rvandam
I got a bit lost in the documentation. The Django admin panel (1.0.2) shows every model class from my app.I have 10 classes, and I want to reduce the classes shown to 2. I can modify the other classes because the use of ForeignKeys What is the best way to accomplish this? --~--~-~--~---