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
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
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
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
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
{
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.
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
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'
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
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
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
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
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
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
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
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
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 }}
17 matches
Mail list logo