Anonymous
nope, same result
Wait for someone else
Anonymous
okay
Are you from Karnataka?
Shubham
Anonymous
Anonymous
Why we use secret_key in our settings.py file and from where to get that secret_key ❓
Anonymous
How to do email verification in Django Rest Framework?
Anonymous
Why we use secret_key in our settings.py file and from where to get that secret_key ❓
and thats for security purposes. don't push a production ready app with the key in the settings file. create .env file and place it there then read it the setting file. try django-environ or django-env
Анвар
how to display all users in template?
Анвар
user = get_user_model() user.objects.all() did not help
Matheus
how to display all users in template?
send a context variable to template. Example: in a view on get_context_data create a variable, like context['users'] = User.objects.all() then, on template, you need iterate on variable users. {{users}}
Matheus
kkk nice. resolved?
Matheus
nice 👏🏼👏🏼
Анвар
Is there any way to not allow user to access logout page if he was not logged in before?
Денис
There was no link! No link at all!
Денис
This is the second hit by mistake
Денис
But I don’t remember where to import it
Анвар
A login_required decorator will do.
thanks, but it is not what I want
Денис
thanks, but it is not what I want
Then just return redirect in the view
Денис
If request.user is None
ֆ33ʏ377
How to fix cyclic dependency for django model ??
Chiranjeev
anyone need assistance related to django projects happy to help
ֆ33ʏ377
Extend user model
Денис
pastebin.com
ֆ33ʏ377
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Rupesh
Hi everyone,
Rupesh
I am new to django, I am a Full stack Js developer, Now trying python django for
Rupesh
web
Rupesh
I am getting this error, I tried a lot but can not undersatnd how to fix it Can anyone plz help
cj
Rupesh wanted to post this long code: https://hastebin.com/orobetexih
Денис
like cj did
Rupesh
post your models.py on hastebin
@tor_gash Here is my models.py, its very small
Rupesh
from django.db import models # Create your models here. class Lead(models.Model): name: models.CharField(max_length=100) email: models.EmailField(max_length=100, unique=True) message: models.Model(max_length=100, blank=True) # created_at: models.DateField(auto_now_add=True)
Rupesh
use =, not : to assign
oh wtf ! , Thanks buddy. I wasted an hour for this. But can not see that.
Rupesh
models.Model is not the field class you probably want to use. If this is a text, use models.TextField()
Hey can you plz tell me which book should I follow for full stack django with js frontend frameworks
Денис
Rupesh
@tor_gash I am still getting same error when doing python manage.py makemigrations <my-app-name>
Rupesh
from django.db import models # Create your models here. class Lead(models.Model): name = models.TextField(max_length=100) email = models.EmailField(max_length=100, unique=True) message = models.Model(max_length=100, blank=True) created_at = models.DateField(auto_now_add=True)
Денис
btw, CharField suits more for name field
Rupesh
I mean your message = models.Model(...)
Yeah got that. Thanks, I am really confused with django, Just started today, learning practically, so doing these mistakes
Денис
yeah doing that.
Django documentation in the part of Model Field Reference is clear as water
Rupesh
Django documentation in the part of Model Field Reference is clear as water
Yeah, it's documentation is good as compared to other stacks.
Денис
Reading source code is dangerous. It' s hard to stand and not to change something in it. Like I did with dateutil
cj
Reading source code is dangerous. It' s hard to stand and not to change something in it. Like I did with dateutil
lol, I just try not to change upstream source code, I tie my hands in the chair
cj
me neither, I forked it :)
Django v2.2-tor_gash-3
Rupesh
great @c0x6A , You have gone into depth of it. Its really nice, but its dangerous too as @tor_gash said, its really tough to play with that
am π
How to pass a CSV of 30k Quora question CSV file into test set while CNN text classification is trained on 20 newsgroup dataset of general category of data in .txt file . I.e how do i pass a different file format into test set onto model and label it with specifc topics . someone capable enough to help out .
Mikhail
hey guys , how its fast to implement phone -registration ?
Mikhail
on python
Mikhail
i mean, what services
Mikhail
and how i can do this , i need some push in this direction
Mikhail
i`m kinda new in it
Mikhail
i use django framework
Mikhail
but how i can implement phone -registration ?
cj
i mean, what services
you have to use a service to send SMS to your users, something like twilio
Mikhail
oh , well , is it take a long time as for junior or some1 lower ?
Mikhail
who did this already ?