Anonymous
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
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
Yash
Professor
Anonymous
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
Professor
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
Anonymous
Anonymous
Yes
what is your Model name? is your settings.py contains this -> settings.AUTH_USER_MODEL
Anonymous
Anonymous
Yes, but it commented
if you use custom model for User you must define AUTH_USER_MODEL to make your session works.
Anonymous
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
Gopal
Can any one share the list of best practise in writing API calls in Django for mobile app.?
Anonymous
George
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
Anonymous
George
well, that's important
Anonymous
I removed it
_auth_user_id is still None
George
Anonymous
Anonymous
@hyunlee1o
Which column is assigned to AUTH_USER_MODEL when specifics the model
George
Anonymous
??????
In setting I assign the model to AUTH_USER_MODEL
In this which column is considered
George
George
Also put ALL THE CLASS because we need context
Anonymous
Ok
Dhruva
How to schedule mail
sm
George
Dhruva
George
George
George
EVERYTHING you need is in that tutorial
sm
sravan
Any one have good tutorials about Django logging?
Mirco
Gil
sagir
Anonymous
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