Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django atomic block for create with an unique field
I have a model similar to the following: Class MyModel(models.Model): my_field = models.CharField(max_length=30, default='', unique = True) And the following code to create new instances of the model: with transaction.atomic(): try: instance, _ = MyModel.objects.select_for_update().get_or_create( my_field=value) except (IntegrityError, OperationalError): pass return instance As of my understanding, the entire table is locked by the select_for_update. Another alternative would be catching the UniqueConstraintError after it occurs. Is there any way, to avoid having an UniqueConstraintError, without locking the entire table? -
Connection Refused Error: [Errno 111] Connection refused - Getting error for Mailtrap SMTP
I am trying to register user which should send activation code to the dummy server. But while sending the post request from the Insomnia getting 500 internal error. And using Djoser for the email communication (authentication and authorization) Checked telnet to the smtp server telnet sandbox.smtp.mailtrap.io 2525 Trying 54.158.84.126... Connected to mailsend-smtp-classic-f3a4534c019a3e96.elb.us-east-1.amazonaws.com. Escape character is '^]'. 220 smtp.mailtrap.io ESMTP ready Backend settings EMAIL_HOST=sandbox.smtp.mailtrap.io EMAIL_PORT=2525 EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL = env("EMAIL_HOST") EMAIL_USE_TLS = True EMAIL_PORT = env("EMAIL_PORT") EMAIL_HOST_USER = env("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = env("EMAIL_HOST_PASSWORD") DAFAULT_FROM_EMAIL = "XXXX" DOMAIN = env("DOMAIN") SITE_NAME = "XXXX" DJOSER = { "LOGIN_FIELD": "email", "USER_CREATE_PASSWORD_RETYPE": True, "USERNAME_CHANGED_EMAIL_CONFIRMATION": True, "PASSWORD_CHANGED_EMAIL_CONFIRMATION": True, "SEND_CONFIRMATION_EMAIL": True, "PASSWORD_RESET_CONFIRM_URL": "password/reset/confirm/{uid}/{token}", "SET_PASSWORD_RETYPE": True, "PASSWORD_RESET_CONFIRM_RETYPE": True, "USERNAME_RESET_CONFIRM_URL": "email/confirm/{uid}/{token}", "ACTIVATION_URL":"activate/{uid}/{token}", "SEND_ACTIVATION_EMAIL": True, } Not sure what is missing piece. -
Can't use custom hostname for Django app with runserver_plus
I'm running a Django application from a Docker container using docker compose. My goal is to run the application from a custom hostname, which I'll call myapp.com. Here are the steps I've taken thus far: Added 127.0.0.1 myapp.com to my /etc/hosts file Added a local CA using mkcert -install Created cert and key files using mkcert -cert-file cert.pem -key-file key.pem myapp.com 127.0.0.1 Added 'django_extensions' to the INSTALLED_APPS list in settings.py Added 'myapp.com' to the ALLOWED_HOSTS list in settings.py Set the startup command in docker-compose.yaml to python manage.py runserver_plus --cert-file cert.pem --key-file key.pem myapp.com:8000 When I start up the project with docker compose up, the server boots up successfully and the console claims that it's running with no issues at https://myapp.com:8000. However, attempting to actually access my application by visiting that URL does not work, giving an error page that says this: This site can't be reached myapp.com unexpectedly closed the connection. Attempting to curl that URL from my machine's command line also fails with this message, no matter what flags I use: curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed However, running the curl command from within the docker container gives a different message (below) and running the … -
How to secure API server deployed in a DigitalOcean's droplet using HTTPS?
I have a project hosted on DigitalOcean and at the moment I have these clusters: My webpage (hosted in the wordpress droplet) is already secured through a SSL certificate and I can publicly access it via https://www.domain_name.it. However, my mobile application interacts with my Python Django API server that is deployed in the docker-ubuntu-droplet. An example of API resource that the mobile app uses is http://docker_droplet_IP:/api/get-customers/ I would like to secure API calls, such that the mobile application can use HTTPS protocol to safely transfer data (i.e. https://docker_droplet_IP:/api/get-customers/) but I am struggling finding out a way to do this, considering that the API server is called directly using the IP address. Can someone explain me how to proceed (and which steps should I make) to secure my Django API server? Thank you in advance. -
Python Geopy Library: Receiving 403 Error when Using Nominatim Geocoding Service – How to Resolve?
from geopy.geocoders import Nominatim def get_country(param): geolocator = Nominatim(user_agent="StampOcrApp") location = geolocator.geocode(param) place_entity = locationtagger.find_locations(text=location[0]) return check_entity(place_entity.countries) I m using get_country function and it throug 403 when this function is execute. Sometimes it work or sometimes it didn't work -
Dynamically add field to a Django Modelform
I have read all previous posts regarding this, but none of the solutions work for me, maybe its because Django has changed something? I want to add fields dynamically to my modelform, in the future it will be based of fetching some information from the backend to populate the fields, but right now I just want to show a field added in the init of the model form like so: class PackageFileInlineForm(forms.ModelForm): class Meta: model = File exclude = [] def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self._meta.fields += self._meta.fields + ('test2',) self.fields['test2'] = forms.CharField() However the field is not shown when rendering the form. Why? -
autocomplete_fields wont work on ForeignKey from another app
I am new to Django I am using autocomplete_fields, Here is the Case. I have an app named Contacts where I am getting contact information and there is another app named school where I am Enrolling Contacts as person from my Contact app #models.py class FacultyRegistration(models.Model): role = models.ForeignKey(Roles, on_delete=models.CASCADE, null=True, verbose_name="Faculty Role") contact = models.ForeignKey('Contacts.Contact', related_name='faculty_Contact', on_delete=models.CASCADE) reference = models.ForeignKey('Contacts.Contact', on_delete=models.CASCADE, related_name='faculty_reference', ) Here I am registering person and using my Contact app for it #admin.py @admin.register(FacultyRegistration) class PersonRegistrationAdmin(admin.ModelAdmin): list_display = ('id', 'role', 'contact', 'reference') list_filter = ('role',) list_display_links = ('id', 'role', 'contact', 'reference', 'contact',) autocomplete_fields = ["role", 'contact', 'reference'] search_fields = ['role__person_role', 'contact__first_name', 'contact__middle_name', 'contact__last_name', 'reference__first_name', 'reference__middle_name', 'reference__last_name'] the issue is when I go to my admin panel I get searchable drop downs as expected but when I start typing to search my contact it wont fetch contacts enter image description here and it gives this error in console django.core.exceptions.FieldError: Unsupported lookup ‘icontains’ for ForeignKey or join on the field not permitted. [22/Jan/2024 12:33:08] “GET /autocomplete/?term=stu&app_label=school_app&model_name=facultyregistration&field_name=contact HTTP/1.1” 500 191958 however it works fine with my roles, maybe bcz roles are in same application -
DRF and GraphQL Mesh Integration using OpenAPI method?
I am relatively new to graphql-mesh and trying to understand. I have connected my graphql version of DRF to mesh and it worked but when I am trying to connect it using OpenAPI I get errors like graphql-mesh configuration package.json { "name": "graphql-mesh", "private": true, "scripts": { "dev": "mesh dev" }, "dependencies": { "@graphql-mesh/cli": "^0.88.5", "@graphql-mesh/graphql": "^0.96.3", "@graphql-mesh/openapi": "^0.97.5", "@graphql-mesh/runtime": "^0.97.4", "graphql": "^16.8.1" } } .meshrc.yml sources: - name: DeveloperGround handler: openapi: source: http://localhost:8000/swagger.json baseurl: http://localhost:8000 DRF configuration project/settings.py INSTALLED_APPS = [ ... 'drf_yasg', 'graphene_django', ] project/urls.py from graphene_django.views import GraphQLView schema_view = get_schema_view( openapi.Info( title="Snippets API", default_version='v1', description="Check description", ), public=True, permission_classes=(permissions.AllowAny,), ) urlpatterns = [ path('admin/', admin.site.urls), path('category/', include('mobiledeveloper.urls')), path('swagger<format>/', schema_view.without_ui(cache_timeout=0), name='schema-json'), path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), path('graphql/', csrf_exempt(GraphQLView.as_view(graphiql=True))), path( "openapi<format>", drf_schema_view( title="Project", description="OpenAPI", version="1.0.0" ), name="openapi-schema", ), ] If I use graphql configuration for the mesh then it is working but not when using OpenAPI. There is no any authentication or authorization used. All the API request are AllowAny kind. And I have used OpenAPI of Stripe and it worked fine, so I am guessing here that my backend requires more work but i cannot figure out what kind of work is required. So … -
In Django tests, can I capture SQL from separate threads?
I have a lot of Django tests (using unittest) that capture the SQL queries of some operation and make various assertions against them. I'm now refactoring my code to introduce a threading.Timer, which executes some of the business logic in a callback after a certain amount of time. In my tests, I can force this callback to run instantly via, for example: def test_foobar(self): with self.CaptureQueriesContext(self.connection) as captured: foo = MyServiceWithATimer() foo.execute() foo.timer.finished.set() # force the timer to complete immediately # make various assertions here The problem is that CaptureQueriesContext now does not capture any of the SQL that ran in the Timer's callback. I've thought about alternative approaches such as not using threading.Timer at all, but these seem to require some sort of blocking while True event loop. Is there a way to make CaptureQueriesContext capture the SQL from child threads? -
How to sends custom status messages to the front end when the endpoint has some heavy process time, if I am using Django as backend?
this is a very general question. I was trying to look for something but here I might have a better start point. I am working with a python tool which is still on progress but the UI was done previously with PYQT5. What I wanted to do is creating some web front end (NextJs) and connecting with Django as backend and the calculations will be done on the local server we have. What I wanted to check is how I can send real time updates to the front end about the process that is happening on the backend. lets say if there is a loop, so sending the 1/10,2/10 and so on. Is this a socket thing (?) like streaming messages while is inside the http request. Thank you! I am still on the looking for options stage, what I have though is that this can be possible with sockets and emit messages from the backend to the front. -
I'm having trouble accessing Swagger; it shows 'The current path, swagger/, didn't match any of these' when I run the server
Error image I want to configure swagger with my project but. When i tried it throwing me error when ever I try I to run and i have configured properly everything in urls.py, file as shown in internet tutorial but don't know why I'm getting the current path is doesn't matching any of this. -
Can't open django admin from my live website in cPanel [too many redirects]
I am trying to open https://mywebsite.org/admin but it's responsing "This page isn’t working, mywebsite.org redirected you too many times. Try deleting your cookies. ERR_TOO_MANY_REDIRECTS." everything is working perfect in my local server. I'm facing this only on the live server in cPanel. All other tasks are working fine without the admin page. I am stuck for last 2 days on the same issue. I have tried most of the solutions available online . ensured static files transfered collect_static's admin folder to the public_html folder of cPanel checked all my urls used ADMIN_MEDIA_PREFIX = '/static/admin/' in the settings.py used whitenoise I am using deafult sqlite3 database of django. is that the issue? -
make sure that requests to my server come from my site and as a result of user interaction with it
I made a small react app that sends the following request to my server: const formData = new FormData(); formData.append('file', pdfFileSelected); formData.append('password', pdfPassword.current); formData.append('selected_pages', selectedPages); formData.append('save_separate', saveSeparate.current.checked) fetch('https://mydomain/pdf-processing/split/', { method: 'POST', body: formData }).then(response => response.json()) .then(data => console.log(data)); I have the server part on Django. But the problem is that someone can programmatically send such requests to my server. I know about the origin header in requests, but it can be modified in CLI scripts. I also tried the csrf token, but you can take it from the cookies of your browser and insert it into the form in your script. Are there any methods to verify that the request came from my domain and as a result of user interaction with the site? And if there are no such countermeasures to limit third-party requests to my server, then is it possible to simply limit the number of requests per day by IP? -
Programmatically create more workers at run-time by using Django_rq
I want to increase the number of workers in Django project by using Django_rq(Redis Queue) the problem is that I have to manually start each worker to complete the process in short time is their any way I can increase the number of workers or their number of process at the run time by using Django_rq? The problem is that queue which has large data takes time more even after optimization of code and cannot allow the other ids to processed until its queue with large data complete . It puts other ids in queue until large queue with data is completed. -
Nâng mũi cấu trúc bao lâu thì đẹp
Thường thường, quá trình ổn định và lên form đẹp của mũi sau phẫu thuật nâng mũi mất khoảng 1-3 tháng. Tuy nhiên, do nhiều yếu tố khác nhau, có những trường hợp mà việc đạt được đường nét dáng mũi mong muốn có thể kéo dài từ 3-6 tháng. Không có thời gian cụ thể để xác định khi nào mũi sẽ đạt đến hình dạng tự nhiên và đẹp mắt sau khi thực hiện phẫu thuật nâng mũi. Sau khi thực hiện phẫu thuật nâng mũi, thời gian cần để đạt được kết quả đẹp là một điều mà những người quan tâm đến thẩm mỹ mũi thường đặt ra. Tuy nhiên, để có cái nhìn toàn diện về vấn đề này, chúng ta cần hiểu rõ về các yếu tố liên quan và tác động trực tiếp lên quá trình hồi phục trước, trong và sau phẫu thuật. -
Django admin save_model
i'm new to django, please help me in below scenoria, when i save the order inn admin panel the same_model function not working the order is saving with out a function. The requirement is when i add order in admin panel when the quantity of orderedproduct is graeter the actual quantity it should through an error else it should reduce the ordered quantity from the product. The order is working but save_model function is not working admin.py from django.contrib import admin from django.contrib import messages from django.utils.translation import ngettext from .models import Category, Product, Order, OrderItem from django.utils.html import format_html class OrderItemInline(admin.TabularInline): model = OrderItem extra = 1 class OrderAdmin(admin.ModelAdmin): inlines = [OrderItemInline] list_display = ('id', 'user', 'order_date') def save_model(self, request, obj, form, change): errors = [] super().save_model(request, obj, form, change) for order_item in obj.orderitem_set.all(): print(order_item.quantity) if order_item.quantity > order_item.product.quantity: errors.append( f"Order quantity ({order_item.quantity}) for {order_item.product.name} exceeds available quantity ({order_item.product.quantity})." ) else: order_item.product.quantity -= order_item.quantity order_item.product.save() if errors: # If there are errors, display a message and rollback the order creation message = ngettext( "The order was not saved due to the following error:", "The order was not saved due to the following errors:", len(errors), ) messages.error(request, f"{message} {', '.join(errors)}") … -
Manager isn't accessible via object instances on object.save()
I have the following model definition in models.py: from django.db import models # Create your models here. # this is the model for each user class UTJUser(models.Model): full_name = models.CharField(max_length=80, default=None) email = models.EmailField(default=None) password = models.CharField(max_length=200, default=None) verified = models.BooleanField(default=False) date_created = models.DateTimeField(auto_now_add=True) last_submission = models.DateTimeField(auto_now=True) def __str__(self): return self.full_name I have the following signup function definition in views.py: from django.http import HttpResponse # for development purpose exempt csrf protection from django.views.decorators.csrf import csrf_exempt from users.models import UTJUser # sign up function, use csrf exempt for development @csrf_exempt async def sign_up(request): try: full_name, email, password = request.POST['full_name'], request.POST['email'], request.POST['password'] new_user = UTJUser(full_name=full_name,email=email,password=password) await new_user.save() return HttpResponse("Sign up success!") except: return HttpResponse.status_code However, when I run the line new_user = UTJUser(full_name=full_name,email=email,password=password) an error occur in the objects attribute of new_user: 'Traceback (most recent call last):\n File "c:\Users\micha\.vscode\extensions\ms-python.python-2023.22.1\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_resolver.py", line 189, in _get_py_dictionary\n attr = getattr(var, name)\n ^^^^^^^^^^^^^^^^^^\n File "c:\Users\micha\Documents\UTJ\backend\UTJEnv\Lib\site-packages\django\db\models\manager.py", line 186, in get\n raise AttributeError(\nAttributeError: Manager isn't accessible via UTJUser instances\n' And the final error that is returned is: Traceback (most recent call last): File "c:\Users\micha\Documents\UTJ\backend\UTJEnv\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\micha\Documents\UTJ\backend\UTJEnv\Lib\site-packages\django\utils\deprecation.py", line 136, in call response = self.process_response(request, response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\micha\Documents\UTJ\backend\UTJEnv\Lib\site-packages\django\middleware\clickjacking.py", line 27, in process_response … -
Django: Login a user after a webhook event
i am making an ecommerce app giving users session based cart and allowing then to checkout and enter their email(required) there, where when stripe webhook ping about that checkout session i create that user based on his email or get them from database if it exists, and want to log them in and move to set password page, but in django i cant use login(request, user), because request arent user generated through i have the user object, how can i achieve this functionality. i am passing session key in webhook, so that i can gather the items in those cart and process and delete them after, and gets the user or create them in the webhook. -
Django run in docker with error "permission denied"
I got an error with python environment in docker when run my django project. The environment is: OS: linux Docker: 18.09.0 Docker base images: python3:latest Command: python3 manage.py runserver 0.0.0.0:8080 error log as below: eb-1 | Operations to perform: web-1 | Apply all migrations: AlarmTransServer, admin, auth, contenttypes, sessions web-1 | Running migrations: web-1 | No migrations to apply. web-1 | Current environment is dev web-1 | Traceback (most recent call last): web-1 | File "/app/AlarmTransServer/manage.py", line 22, in <module> web-1 | main() web-1 | File "/app/AlarmTransServer/manage.py", line 18, in main web-1 | execute_from_command_line(sys.argv) web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line web-1 | utility.execute() web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute web-1 | self.fetch_command(subcommand).run_from_argv(self.argv) web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv web-1 | self.execute(*args, **cmd_options) web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 74, in execute web-1 | super().execute(*args, **options) web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute web-1 | output = self.handle(*args, **options) web-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 111, in handle web-1 | self.run(**options) web-1 | File "/usr/local/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 118, in run web-1 | autoreload.run_with_reloader(self.inner_run, **options) web-1 | File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", line 673, in run_with_reloader web-1 | exit_code = restart_with_reloader() web-1 | ^^^^^^^^^^^^^^^^^^^^^^^ web-1 | File "/usr/local/lib/python3.12/site-packages/django/utils/autoreload.py", … -
How to Design Django models with optional fields for use with ModelForm validation?
I have some models which I want to use in ModelForm. There are some optional values in the model. Since in my use-case, blank value does not make sense for those fields, thus I set null=True but not blank=True on those fields. I suppose that makes sense from a data model perspective. Problem is, when you render a ModelForm, the nullable-but-not-blankable value will have required attribute set in the HTML form. I can unroll the form and write the fields myself - but I'd rather not (because I have to create many forms). Now guess my options are: Override optional fields in ModelForm, setting required=False, but this is tedious (I have many optional fields), violates DRY and I don't want to do that. Bite the bullet and set blank=True on these models. What's the idiomatic way to use Optional fields with a ModelForm? -
Django - Cannot resolve keyword 'Customer' into field
I am trying to display an Order of an Customer in Django. I think the error is mostlikely in that command: order, created = Order.objects.get_or_create(Customer=customer, complete=False).get() The following error occurs: FieldError at /cart/ Cannot resolve keyword 'Customer' into field. Choices are: complete, customUser, customUser_id, dateOrder, id, orderposition, shippingaddress, transactionID For that i created the class Customer in modely.py. enter image description here . I added "related_name = 'customer',related_query_name='customer'" but it did not fixed the issue. All the data is set in the database. From the Customer (i tried Customer as admin and without) to all products in my case cars are in the orderpositions of the order listed. Currently my def in views.py looks like this:enter image description here. When I try to open the cart this error appears: enter image description here. I can see that the Customer is listed as marked in img. Thx for your help! -
Exporting data of non-related with the model (Django Import-Export)
I'm using Django-import-export on django admin. I want to export the data that are not related. (Are related but it's weird..) Example: models.py class A(models.Model): name = models.CharField(default=False) size= models.CharField(default=True) class B(models.Model): relation = models.ForeignKey(A,on_delete=models.CASCADE) title = models.CharField(default=False) category = models.CharField(default=False) I want something like this: admin.py class export(resources.ModelResource): name = Field(column_name='something',attribute='name') category =Field(column_name='something_else',attribute='category') class Meta: model = A fields = ('name','category') class A_Admin(ExportActionMixin,admin.ModelAdmin): resource_class=export .... .... I need to get the data from model B that have a relation with A but A dont have relation with B... -
inspect.isfunction() in Python, is not working as intended
I was building a simple project in Django. Now inside an app, we have got the urls.py So out of curiosity, when I tried to find whether 'path' that I imported is a class or function, but everytime I got that its not a function. Everywhere (Stackoverflow post, or any other site) I am finding that the 'path' is a function. Can somebody explain this? Moreover, it is also printing 'False' for inspect.isclass(path) This is the content of 'urls.py' import inspect from django.urls import path print(inspect.isfunction(path)) It printed 'False', whereas it should have printed 'True', what happening actually? -
Django Raise Error When Slug Already Exist
I have a simple model like this: class MyModel(models.Model): title = models.CharField(max_length=255) slug = AutoSlugField(populate_from='title', unique=True, error_messages={'unique':"The slug of title has already been registered."}) I want to raise an error instead of creating a new slug whenever the slug already exist, but the error is not raised by the AutoSlugField I tried another way by override the save method of my model like this: def save(self, *args, **kwargs): self.slug = slugify(self.title) super(Competition, self).save(*args, **kwargs) and validate it in my serializer like this: class MyModelSerializer(serializers.ModelSerializer): class Meta: model = MyModel fields = '__all__' def validate_title(self, val): if MyModel.objects.filter(slug=slugify(val)).exists(): raise serializers.ValidationError('The slug of title has been registered.') return val This actually works fine while creating a new object but has a problem when updating the object, since if the slug remains the same it raises the error, but it should not because I am updating the same object. What is the most convenient way to do this? I really appreciate any help. Thank you... -
ConnectionRefusedError at /Contact-us/
When I tried to send an email in Django production, I got stuck with this error. ConnectionRefusedError at /Contact-us/ [Errno 111] Connection refused Request Method: POST Request URL: https://tigraygenocide.com/Contact-us/ Django Version: 5.0.1 Exception Type: ConnectionRefusedError Exception Value: [Errno 111] Connection refused Exception Location: /opt/alt/python311/lib64/python3.11/socket.py, line 836, in create_connection Raised during: App.views.Contact_us Python Executable: /home/ysu53cs929ka/virtualenv/public_html/tigray_genocide/3.11/bin/python3.11_bin Python Version: 3.11.5 Python Path: ['/home/ysu53cs929ka/public_html/tigray_genocide', '/opt/cpanel/ea-ruby27/root/usr/share/passenger/helper-scripts', '/opt/alt/python311/lib64/python311.zip', '/opt/alt/python311/lib64/python3.11', '/opt/alt/python311/lib64/python3.11/lib-dynload', '/home/ysu53cs929ka/virtualenv/public_html/tigray_genocide/3.11/lib64/python3.11/site-packages', '/home/ysu53cs929ka/virtualenv/public_html/tigray_genocide/3.11/lib/python3.11/site-packages'] Server time: Sun, 21 Jan 2024 15:45:21 +0000 this is my django email configuration. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtpout.secureserver.net' EMAIL_PORT = 465 EMAIL_HOST_USER = 'tigraygenocide@tigraygenocide.com' EMAIL_HOST_PASSWORD = 'tigraygenocide2013' EMAIL_USE_SSL = True I tried to send email from the Django website using the Godaddy webmail configuration.