Hello
On Tue, May 12, 2020, 3:06 PM Ravindra Patil wrote:
> hi eveyone
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@google
Hi,
There are a couple of errors in your code:
1. You are using a ListView and then trying to get an individual post? That
is really strange
2. In your get_context_data method - you first get the context data, update
it and then you set it to a new dict, so everything is reset in the dict.
3. you
Hi Andréas Kühne,
Regarding the first error
I have a list of posts in the listView and want to add the like button to
each post so how should I fix it?
Thank you
On Wednesday, May 13, 2020 at 6:08:31 AM UTC-4, Andréas Kühne wrote:
>
> Hi,
>
> There are a couple of errors in your code:
>
> 1.
you can use javascript it is good
On Wed, May 13, 2020 at 3:13 AM Anubhav Madhav
wrote:
> My problem is, that I've made a beautiful 'Sign Up' and 'Login' Page using
> HTML and CSS. Later on, in my project, I had to use 'forms' for
> registration and login.
> Is there any way to display the forms
On 12 May 2020, at 22:41, Anubhav Madhav wrote:
Is there any way to display the forms with my HTML CSS files.
Use {% include %} (https://docs.djangoproject.com/en/3.0/ref/
templates/builtins/#include) in your HTML template files for an
embedded style sheet, or just use a link in the head
Hey, everyone. Please help me in this problem, i'm trying to test the
get_success_url method, but didn't got success.
https://stackoverflow.com/questions/61745172/how-to-test-get-success-url-in-classbasedview-for-django
--
You received this message because you are subscribed to the Google Group
On 13/05/2020 06.17, Bighnesh Pradhan wrote:
you can use javascript it is good
Oh yes, we all love javascript:
https://www.destroyallsoftware.com/talks/wat
:-)
Seriously though, javascript has nothing to do with using static CSS in
django templates.
--
You received this message becaus
in your code data is json.dumps(request.data), which is a string
representation of the json dictionary
so data is a str and then you are trying to do item assignment to it
On Wed, May 13, 2020 at 8:05 AM ola neat wrote:
> good day guys, please i need help with my signup api, when the user click
Try https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
Cheers
On Saturday, May 9, 2020 at 10:24:56 PM UTC+5:30, Anselme SERI wrote:
>
> [image: nscreen.jpg]
> Hello, I have been struggling for a few days wanting to install Microsoft
> visual C ++ 14.0 to be able to use mysqlclient in my Dja
I am using django-allauth for a user registration/log-in system. I
have this working, however, as a general question, I would like to
understand how one can view the functions/variables available on a
given template.
For example I see that in some templates these are included:
{% user_disp
Which version of django are you using?
On Saturday, 9 May 2020 19:21:53 UTC+5:30, Sunday Iyanu Ajayi wrote:
>
> I have but I still get error
>
> [image: image.png]
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunne...@gmail.com *
>
>
>
> On Sat, May 9, 2020 at 1:50 PM ola neat >
> wrote:
>
>> Halo,
If using django3.0.0, please down grade the django.VERSION to django==2.2
On Wednesday, 13 May 2020 20:46:17 UTC+5:30, Akshat Zala wrote:
>
> Which version of django are you using?
>
> On Saturday, 9 May 2020 19:21:53 UTC+5:30, Sunday Iyanu Ajayi wrote:
>>
>> I have but I still get error
>>
>> [i
Its not clear why you need JS at all. The app can load content from
directories on the server side (back-end) and write these to a DB. Django
could then load these from the DB and show in the normal way. Page
generation can be done via normal views (Django/Python code).
(PS Both react and ang
Hi again,
Bare with me - this is just written in this email - so:
1. Your listview is paginated by 5, so it will only show 5 posts - that's
good for this exercise and how I would solve it.
2. Rewrite your get_context_data method to iterate over the posts:
def get_context_data(self, **kwargs):
Hi There,
I have rewritten the get_context_data method to be like this but I am
getting name 'user' is not defined:
class PostListView(ListView):
model = Post
template_name = "score.html"
ordering = ['-date_posted']
context_object_name = 'posts'
paginate_by = 5
def get
hello everyone
i am trying to make a blog where i am trying to customize password reset
forms.
here is my bloggapp/urls.py:
from django.contrib import admin
from django.urls import path, include
from django.views.generic.base import TemplateView
from django.contrib.auth import views as auth_vi
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
Django 3.0.5
*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *
On Wed, May 13, 2020 at 4:17 PM Akshat Zala wrote:
> Which version of django are you using?
>
> On Saturday, 9 May 2020 19:21:53 UTC+5:30, Sunday Iyanu Ajayi wrote:
>>
>> I have but I still get error
>>
>> [image: image.
Hi I need help, I'm hosting a django app on linode, the app is running on
Ubuntu 18.04 LTS with gunicorn, nginx a postgresql database, and I'm using
let's encrypt for SSL certificate, the issue is when I fill a form (login
or signup) I get a timeout error but I don't have that issue on the admin
still showing the same error
On Wednesday, May 13, 2020 at 2:34:03 PM UTC-4, Yamen Gamal Eldin wrote:
>
> 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=req
Hi,
I have the following context and I am trying to write it correctly in a
function
This is context data :
def post_view(request):
qs= Post.objects.all()
user= request.user
context= {
'qs':qs,
'user':user,
}
I am trying to define it in a class PostListView(L
Hello, i am beginner to django, i am sending values and checked status
from the front end using checkboxesnow i do not no how to write frame
work in the django, can i get any help on these
--
You received this message because you are subscribed to the Google Groups
"Django users" grou
If possible, please downgrade DJ version to 2.2 LTS and try again to execute
the code.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@
If possible, please downgrade the django version to django2.2 LTS and try
again...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@goog
dude the error is staring at you. have you read the logs? just update the
whitenoise library. django.utils.six is deprecated. if you want to use six
you have to import it independently.
On Thu, May 14, 2020 at 8:28 AM Akshat Zala wrote:
> If possible, please downgrade the django version to djang
Hi,
We are trying to insert the data from a text file '*some_category_list.txt*''
into a table in Postgres database using the highlighted query in our
functions.py
file = open(str(a)+'_category_list.txt', 'r')
> file_content = file.read()
> print(file_content)
> file.close()
> from django.db imp
Hi,
We can't solve all of your problems for you :) But that being said - in the
get_context_data you don't have a parameter for the request, however in all
CBV you get the request as a variable on the CBV itself - so change:
post.is_liked = post.likes.filter(user=request.user).exists()
To:
pos
27 matches
Mail list logo