I haven't seen any definition for user within ur function, so
Change this
post.is_liked = post.likes.filter(user=user).exists()
To this
post.is_liked = post.likes.filter(user=request.user).exists()
Le mer. 13 mai 2020 à 19:22, Ahmed Khairy a
écrit :
> Hi There,
>
> I have rewritten the get_co
in CBVs the request is an attribute of the main view class you are
inheriting from it.
so to fix your issue, change this :
- request.method == "POST"
- self.request.method == "POST"
another thing i've noticed in those lines:
post=Post.objects.all()
comments=Comment.objects.filter(*post=post*)
Yo
Interested
Le sam. 6 juin 2020 à 17:09, maninder singh Kumar <
maninder.s.ku...@gmail.com> a écrit :
> Dear all,
>
> We require python django developers for a HR project. Please answer to
> maninder.s.ku...@gmail.com if interested.
>
> regards
> Willy
>
> --
> You received this message because y
Django channels, they have a great tutorial within the docs.
Le lun. 8 juin 2020 à 09:53, Agnese Camellini
a écrit :
> it's enough that you google django chat system that everything will come
> to you magically.
>
> On Mon, 8 Jun 2020 at 08:24, Tobi DEGNON wrote:
>
>> Make research about Django
That can be achieved by an onclick listener on your button using
JavaScript, that's not a Django related question.
Le lun. 8 juin 2020 à 20:12, _M_A_Y_A_N_K_ a
écrit :
> Do you already have a python code for StopWatch...? If so then you can
> directly use that python code in your django view and
You can have both forms in a formset and handle both of them in a single
url, and you can handle your initial validations using HTML and javascript.
docs.djangoproject.com/en/3.0/topics/forms/formsets/
Le lun. 8 juin 2020 à 14:24, Rupesh Dahal a écrit :
> You can save the data to a session but I
There's many ways to solve it. My favorable approach will be to override
the save method in the targeted form.
Le mar. 9 juin 2020 à 14:35, The Sha a écrit :
> Hi
>
> I hava a problem in django, i have to models one is a CustomUser Model and
> the other is a Address model.
>
> The problem is tha
It's pretty straight forward, just search about overload save function for
update view, that will make u create a save function in your form, do the
necessary actions on your instance, and voula
Le mar. 9 juin 2020 à 16:24, The Sha a écrit :
> Ok intressant, i cant find any good exemplen. Thank
There's plotting library in Django.
But if I were u, I would send the data needs plotting to the template, and
plot it using a JavaScript library like chart js for small plots or d3 J's
for more professional ones.
Le mer. 1 juil. 2020 à 06:44, ratnadeep ray a écrit :
> Hi all,
>
> I have wrote a
Even though that question don't belong here.
but i guess you should think abt three things:
1 - get and show the data you need to/after processing " birthdays -
matchers"
2 - condition on matching "Which horoscope matches with the other"
3 - how to store the data and the business rule " where to st
Premièrement tu peux copier l'erreur dans Google, c'est un import erreur
dans votre virtual environment du python.
He pense que la solution serra quelque chose comme "pip install "
Le lun. 27 juil. 2020 à 06:00, MUGOYA DIHFAHSIH a
écrit :
> if you could translate the error in Enl=glish, may
Try sql alchemy, if you need a full access with many functionality. Other
than that, u can connect directly to the database through python. The exact
implementation will depend on the database type
Le dim. 26 juil. 2020 à 18:15, Gurmeet Kaur
a écrit :
> you could try using connection and cursor
12 matches
Mail list logo