I am new in Django. I am trying to add a feature in my project that enables user to reset his password through given email. These configurations are in development and not production. This is my configuration in settings.py I tried these but nothing seems to be working. I enabled IMAP from gmail settings as well. Can you please help
Tag: django
Django change wrong column name in DB
in my Database (psql) I’ve got a table named offers_offer and inside that there is an column named offer_name, which is wrong, because it should actually be just name. I don’t know why it has this name, but due to this I can’t load any fixtures or create a new object, because I always receive the error that name wasn’t
How to register inherited sub class in admin.py file in django?
Project Name : fusion App Name : admin_lte Python 3.7 Django 2 MySql Question is “I want to register sub model in django admin-panel”,when i write code for model registration in admin.py file that time occurred below error. django.core.exceptions.ImproperlyConfigured: The model Device is abstract, so it cannot be registered with admin. NOTE : I used multiple separated model file. device.py
How to tell if user’s email address has been verified using Django, allauth, rest-auth and a custom user
I’m using Django 2.0.10 with rest-framework, rest-auth and allauth. I have a custom user model. I’ve got email verification working by using the allauth view. The verification email is sent when a user registers. If I click the link in the email, I’m taken to a page with a button to click to verify the email. This all works without
How to send file from Mayan EDMS to external api?
I’m still learning Django and there is still a lot of unknown to me. The problem is that I can’t pull the .pdf (or any other format) to be sent by ajax post method to external API. So on the reciving side I only get the string location of the file not the actual file. I have put the following
How to add a comment to post? PostDetailVew, Django 2.1.5
I want add comment to post on his page (“post detail” page). I was find answer, but it create comment on other page. I want create comment on page of “post detail”. urls.py models.py forms.py views.py comment_form.html post_detail.html I think, “comment_form” need to redirect to “post_detail”, not generate new page for comment form. And сould you tell, which parameters has
What does format=None do in Django rest full API
Recently when I read Django rest full API document I faced this code : this code is work fine but I look for format=None and I cant find out what does it do. is any body know what is it and why its important to be? Answer The django rest framework (drf) documentation explains it here. The gist of it
Make User email unique django
How can I make a Django User email unique when a user is signing up? forms.py I’m using the from django.contrib.auth.models User. Do I need to override the User in the model. Currently the model doesn’t make a reference to User. views.py Answer The best answer is to use CustomUser by subclassing the AbstractUser and put the unique email address
Querying the database in a Django unit test
I am creating a web application which has a POST endpoint, that does two things: Saves the POSTed data (a university review) in the database. Redirects the user to an overview page. Here is the code for it: I haven’t yet implemented passing the user data to the endpoint, and that’s why I’m saving everything under the user with pk=1.
“OperationalError: no such table: django_site” when running makemigrations with empty database when using Django-todo
I have inherited a Django 1.11.6 application from another developer. Now after I have made a lot of changes to the code and data model, I want to re-create the sqlite database from scratch. But when I run manage.py makemigrations in the project directory (no migration files and database present), I am getting the following error message: ‘django.contrib.sites’ is present