Re: templates and Views

2019-02-19 Thread abdouramane mahamane
Thank you so much, for this reply that solves my problem :) Le lundi 18 février 2019 16:15:05 UTC+1, abdouramane mahamane a écrit : > > I'm trying to show in one template .html multiple results of my views.py > class. > But when i add an other {%block content2 %} in my base.html, i have an > er

Re: templates and Views

2019-02-19 Thread abdouramane mahamane
Thank you so much, for this reply that solves my problem :) Le lundi 18 février 2019 22:55:24 UTC+1, mohamed khaled a écrit : > > I think this link can help you > > https://www.google.com/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/12187751/django-pass-multiple-models-to-one

templates and Views

2019-02-18 Thread mohamed khaled
I think this link can help you https://www.google.com/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/12187751/django-pass-multiple-models-to-one-template&ved=2ahUKEwimi5aqosbgAhUJtRoKHaiCCYYQjjgwAHoECAcQAQ&usg=AOvVaw0pFQWtYwtjrd03LHLWZ8rz -- You received this message because y

templates and Views

2019-02-18 Thread abdouramane mahamane
I'm trying to show in one template .html multiple results of my views.py class. But when i add an other {%block content2 %} in my base.html, i have an error. Because i have the same url path('partenaire/', views.OffrePListView.as_view(), name='offreListP'), path('partenaire/', views.BaseViewP.a

Templates and views (accessing field from other model)

2012-07-09 Thread Soviet
I'm trying to access the Theme name and put it in my template. It's been working fine until I set the Theme.name as primary key. Did the primary_key=True break it? How can I use it in template? I need the primary key to make the DetailView. Or am I completely wrong about everything? #Template {

Re: easily getting all the admin functionality in your templates and views

2008-11-24 Thread dash86no
Andy, That is an awesome tip, already my site is looking 100x better. Many thanks, On Nov 24, 8:00 pm, AndyB <[EMAIL PROTECTED]> wrote: > The amount of customization that is now possible with the Admin app > really blurs the boundry between tweaking the admin itself and > replacing it entirely.

Re: easily getting all the admin functionality in your templates and views

2008-11-24 Thread AndyB
The amount of customization that is now possible with the Admin app really blurs the boundry between tweaking the admin itself and replacing it entirely. There is an entire spectrum between those two extremes and I've been surprised how far it's possible to take the customization while still falli

easily getting all the admin functionality in your templates and views

2008-11-23 Thread dash86no
ls.py, templates and views working such that I pretty much have a basic application up and running. Now i'm looking at what I built, and taking a look back at the Admin, and the admin is looking 1000 X better than the basic forms that I have managed to create. Here's a list of things I'

Re: i18n in templates and views

2008-10-08 Thread J
Thank you, Carl. I'll try this out. Carl Meyer wrote: > On Oct 8, 12:22 am, J <[EMAIL PROTECTED]> wrote: > >> How would I include the "date" field from the first model ("Post") in >> the queryset created from "PostI18N", using something similar to: >> >> queryset = >> PostI18N.objects.filter(l

Re: i18n in templates and views

2008-10-08 Thread Carl Meyer
On Oct 8, 12:22 am, J <[EMAIL PROTECTED]> wrote: > How would I include the "date" field from the first model ("Post") in > the queryset created from "PostI18N", using something similar to: > > queryset = > PostI18N.objects.filter(lang=get_language()).order_by('post__date') > > Would that date fiel

Re: i18n in templates and views

2008-10-07 Thread J
This is perfect! Thank you Malcolm. One more question--simpler this time: How would I include the "date" field from the first model ("Post") in the queryset created from "PostI18N", using something similar to: queryset = PostI18N.objects.filter(lang=get_language()).order_by('post__date') Would

Re: i18n in templates and views

2008-10-07 Thread Malcolm Tredinnick
On Tue, 2008-10-07 at 18:23 -0400, J wrote: > Hi everyone, > > I'm working on a bilingual website in django for which the visitor has > the option of choosing which language he/she prefers. All the > interface, as well as the content, will be available in Spanish and > English. The interface is

i18n in templates and views

2008-10-07 Thread J
Hi everyone, I'm working on a bilingual website in django for which the visitor has the option of choosing which language he/she prefers. All the interface, as well as the content, will be available in Spanish and English. The interface is set up to be handled by gettext and django's has excellent

Re: Templates and Views - what counts as "logic"?

2006-10-30 Thread sorrison
I had this proble too. Heres how i solved it. First i had a model method: def get_wordcount(self): return len(self.content.split()) (content is a TextField) Then in my template i used it like this: {{ object.content|truncatewords:60 }} {% load base_utils %} {% ifg

Re: Templates and Views - what counts as "logic"?

2006-10-29 Thread ringemup
That definitely looks feasible - thanks! --~--~-~--~~~---~--~~ 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 this group, send

Re: Templates and Views - what counts as "logic"?

2006-10-29 Thread Russell Keith-Magee
On 10/29/06, ringemup <[EMAIL PROTECTED]> wrote: > > Does that mean that this is really view logic? It seems a shame to > have to write a custom view function just to do something that's as > simple and as display-related as that. Is there any way to do this in > the template? You could split t

Templates and Views - what counts as "logic"?

2006-10-28 Thread ringemup
Hi all, I'm creating a blog as a first Django project, since that seems like a good way to get my feet wet. I've run into a problem displaying a list of post excerpts with "read more" links. Here's my code for the excerpts: {% for object in object_list %} {{ object.title }}