Re: hi eveyone

2020-05-13 Thread Joshua Kayode
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Andréas Kühne
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Ahmed Khairy
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.

Re: CSS with Django forms

2020-05-13 Thread Bighnesh Pradhan
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

Re: CSS with Django forms

2020-05-13 Thread Clive Bruton
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

How to test get_success_url method in class based view

2020-05-13 Thread Sumit Kumar
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

Re: CSS with Django forms

2020-05-13 Thread Kasper Laudrup
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

Re: help with my signup api

2020-05-13 Thread Vijay Khemlani
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

Re: install Microsoft visual C ++ 14.0 to be able to use mysqlclient in my Django projects

2020-05-13 Thread Sundararajan Seshadri
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

Viewing available functions and variables

2020-05-13 Thread Clive Bruton
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

Re: Deploying Django Project on heroku

2020-05-13 Thread Akshat Zala
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,

Re: Deploying Django Project on heroku

2020-05-13 Thread Akshat Zala
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

Re: Can I use a JS Framework to display small JS tasks in a Django project?

2020-05-13 Thread Derek
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Andréas Kühne
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):

Re: How to over ride the get context data method in view

2020-05-13 Thread Ahmed Khairy
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

password reset pages are not showing customizing html file

2020-05-13 Thread Ali Ahammad
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Yamen Gamal Eldin
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

Re: Deploying Django Project on heroku

2020-05-13 Thread Sunday Iyanu Ajayi
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.

Gunicorn-wsgi-nginx-postgresql-django linode hosting

2020-05-13 Thread Tobi DEGNON
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Ahmed Khairy
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

How to write a Get_Context_method

2020-05-13 Thread Ahmed Khairy
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

how to save multiple checkbox values and checked status(true or false) in the django....

2020-05-13 Thread frontend developer
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

Re: Deploying Django Project on heroku

2020-05-13 Thread Akshat Zala
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...@

Re: Deploying Django Project on heroku

2020-05-13 Thread Akshat Zala
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

Re: Deploying Django Project on heroku

2020-05-13 Thread Shyam Acharjya
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

Inserting data from a text file is not working for Postgres database

2020-05-13 Thread Ram
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

Re: How to over ride the get context data method in view

2020-05-13 Thread Andréas Kühne
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