Shubham
I am trying to create a user from admin panel and its showing an error
Shubham
socket.gaierror: [Errno -3] Temporary failure in name resolution
Rahulraj
Iam using a custom model for user
Rahulraj
But when i try to authenticate user it shows last_login field is not found
Rahulraj
Tried with writing a custom auth backend but still same eror
Rahulraj
Any fixes
Anonymous
Hi, I need a help, 1. How to logout from all devices when password is reset for an account. 2. Manually I delete sessionid in database, when I refresh the page instead of logout it regenerates the sessionid. Plz help me
­
Hello everyone, I'm fighting this error for the third day. I can't figure it out, please help me. This is an urgent matter(
­
formfield_for_dbfield() takes 2 positional arguments but 3 were given
Adan
Please check out my django boilerplate project and give me your views on how effective it is for use as a django project setup template and which improvements to make, https://github.com/Abdi-Adan/django_boilerplate
Anonymous
Hi, I need a help, 1. How to logout from all devices when password is reset for an account. 2. Manually I delete sessionid in database, when I refresh the page instead of logout it regenerates the sessionid. Plz help me
from django.contrib.sessions.models import Session from django.contrib.auth.models import User # grab the user in question user = User.objects.get(username='johndoe') [s.delete() for s in Session.objects.all() if s.get_decoded().get('_auth_user_id') == user.id]
Gio
hi everyone, is there a way to make a queryset in UTC when the USE_TZ=True?
Professor
Hey guys I got problem in django web framework help me out plz if u knw I've a csv file in which I've 4 diff col and one of them is date and I want to dele the rows If I got 2dates are alike dele the entire data of that row if 2 dates are same
Professor
Try finding in this pandas library
any idea using django only?
Yash
any idea using django only?
Try traversing date column and for each date search the date which matches with the one you selected and then delete both rows. two for loops will required for traversing
Anonymous
Anonymous
Can you share your user and session model?
Sorry I can't share it, How to relate a custom table to session table?
Anonymous
it depends. how you custom your User model?
Aneesh
path('^(?P<id>\d+)') ) is not working Bt Url('^(?P<id>\d+)') ) is working Anyone know why is it
Anonymous
it depends. how you custom your User model?
Separate table for user not a custom one
Anonymous
Separate table for user not a custom one
Do you use default django session engine?
Anonymous
Yes
what is your Model name? is your settings.py contains this -> settings.AUTH_USER_MODEL
Anonymous
Yes, but it commented
if you use custom model for User you must define AUTH_USER_MODEL to make your session works.
Anonymous
then you can use this ```from django.contrib.sessions.models import Session from django.contrib.auth.models import User # grab the user in question user = User.objects.get(username='johndoe') [s.delete() for s in Session.objects.all() if s.get_decoded().get('_auth_user_id') == user.id]``` change the User model to your custom model
Kushal
Data virtualization in django?
Kushal
How to visualize in django
Mirco
it's a frontend stuff
Anonymous
if you use custom model for User you must define AUTH_USER_MODEL to make your session works.
I did this , it ask for REQUIRED_FIELDS and USERNAME_FIELD I assigned them But got an error Modelname object has no attribute is_anonymous
Anonymous
I did this , it ask for REQUIRED_FIELDS and USERNAME_FIELD I assigned them But got an error Modelname object has no attribute is_anonymous
from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.base_user import AbstractBaseUser class YourCustomUserModel(AbstractBaseUser, PermissionsMixin):
Gopal
Can any one share the list of best practise in writing API calls in Django for mobile app.?
Anonymous
from django.contrib.auth.models import PermissionsMixin from django.contrib.auth.base_user import AbstractBaseUser class YourCustomUserModel(AbstractBaseUser, PermissionsMixin):
Got this error TypeError: cannot create a consistent method resolution order (MRO) for bases Model, AbstractBaseUser, PermissionsMixin
blank_
Hello, I have issue, I want to save same data in different table concurrently.
blank_
Please help
gamer_boy
app/urls.py url(r'^quiz/(?P<quiz_id>\d+)/(?P<question_id>\d+)/$', views.question_detail, name='question_detail'), --------------------------------------------------------------------------------- views.py def quiz_detail(request,quiz_id): try: quizs = Quiz.objects.get(pk = quiz_id) except Quiz.DoesNotExist: raise Http404("Quiz Does Not exist") return render(request,'app/question_list.html',{'quizs':quizs}) --------------------------------------------------------------------------------- question_list.html {% for quizs in quizs.question_set.all %} <h1><a href="{% url 'question_detail' question_id=quizs.id %}">{{quizs.question}} - {{quizs.pk}}</a></h1> <br> {% endfor%}
gamer_boy
error :-
gamer_boy
Reverse for 'question_detail' with keyword arguments '{'question_id': 3}' not found. 1 pattern(s) tried: ['quiz/(?P<quiz_id>\\d+)/(?P<question_id>\\d+)/$']
gamer_boy
i dont know what i doing wrong
gamer_boy
please help me
Anonymous
Did you put something inside
Yes I put model.model
George
Yes I put model.model
inside your class lmao
George
well, that's important
Anonymous
I removed it _auth_user_id is still None
Anonymous
well, that's important
What make it act differently
Anonymous
@hyunlee1o Which column is assigned to AUTH_USER_MODEL when specifics the model
Anonymous
??????
In setting I assign the model to AUTH_USER_MODEL In this which column is considered
George
Also put ALL THE CLASS because we need context
Anonymous
Ok
Dhruva
How to schedule mail
Dhruva
sm
Are you following the django tut?
No, actually i building quiz app actually there is no tutorials for quiz app
Doragonsureiyā
No, actually i building quiz app actually there is no tutorials for quiz app
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
George
EVERYTHING you need is in that tutorial
sravan
Any one have good tutorials about Django logging?
Anonymous
How to organize multiple sites (in the front will be learn.domain, blog.domain etc)? I have some apps, and some of then are part of the different site, for example, for "blog.mydomain.com" (that will be served by react app), i have articles and comments apps, and for "learn.mydomain.com", i have courses, lectures apps. Actually i'm using this structure: ls blog comments home __init__.py posts pycache replies and for learn: ls learn comments courses __init__.py lectures modules pycache replies i.e, instead the app living in the root dir, he live in named dir that represent the front-end subdomains. This is the best way to organize the apps?
Hari
Not translating this
Hari
ugettext_lazy('District') not trans lating
Hari
can any one help here
Lelouch
No module named FB How to fix this errror