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
?
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
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
> 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
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
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)
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
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')
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
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
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
--~--~-~--~~-
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
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
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?
--~--~-~--~---
14 matches
Mail list logo