Category "django"

how do I make a page only to be accessed through redirection from a stripe checkout session page, in django?

I want a page (view) to be only accessed through redirection from stripe checkout session page, and not accessible in any other way. Here is the page that I wan

Bootstrap-ui Modal is coming up blank when set inside angular-gantt

I am having difficulties trying to get my modal to come up. I am not sure if it is because modal is not compatible with angular-gantt or if I have the code wron

Django. ''The `actions` argument must be provided when calling `.as_view()` '' when I try to allow DELETE, PUT, ETC

I have to allow delete and update requests from front for my objects of some model. I wish to delete instance and appropriate row in DB. I tryed to use info fr

Django version downgraded when I install third party Django package

When we upgrade Django version this two packages prompted incompatible Installing collected packages: django Attempting uninstall: django Found existing i

django settings default time zone

here is a question i can use django time zone for utc and it worked fine but when i switch the default time zone to 'Asia/Tehran' it wont work and i get the err

How to deal with django migration postgres deadlock?

So, I was deploying the django app to production and then the infamous postgres deadlock situation happened. This happens during the django migration. Django ve

ImportError: cannot import name 'ProductDetails' from 'pages.views'

I have written test case for views for details page. Here is below code I have written, When I am running Pytest in terminal it raising these error. My project

"Cannot import ASGI_APPLICATION module %r" % path channels problem

I got this error: ImproperlyConfigured("Cannot import ASGI_APPLICATION module %r" % path) Here is my routing.py: from channels.routing import ProtocolTypeRouter

Why static files are not loading? | Django

I'm trying to load static files, but it's showing following error: GET http://127.0.0.1:8000/static/css/user/style.css net::ERR_ABORTED 404 (Not Found) - home:2

Default value in Django Model

I have a model named "Product" and it has an attribute like price, quantity, and remarks. Thru the models.py, if remarks has a property of "null=True", it will

How to add a calculated field to a django admin inline

I am trying to add a calculated field to a Django Admin Inline. Consider this set of classes: models.py: class MyGroup(models.Model): group_name = models.Cha

How to change the `frontend_domain` port in `GRAPHQL_AUTH` in the verification mail?

I'm working on a Docker-Django-Graphene-React stack where Django is the backend which receive GraphQL queries through Graphene from React which acts as the fron

Django - Is there any way to get the current logged user in the signals.py file of my proyect?

I am trying to create an instance of a relationship model(intermédiate table many-to-many) automatically with signals when one of the independent models

Can OR-clauses be combined with distance filters in Haystack for Django?

I've been using a distance filter using regular django query filters within an OR-clause: # either it's within the preset distance of the location # OR it's not

Connecting to MSSQL from django 1.8 on Ubuntu

I need to connect to MSSQL database from Django 1.8 and preserve Django 1.8 (not upgrade to newer version od Django). I installed pip install django-mssql . ENG

Django Dependent/Chained Dropdown List in a filter

I am using Django to implement my web page; in this page I have a classic item list that I manage with a for loop. I also implement a filter as a form (with sea

API takes longer to load first time opening my webpage

I have a Django app configured on AWS Lambda with zappa. In this app I created some basic APIs with DRF. On the otherside I have a ReactJS frontend that makes

Create Dynamically table and save data in database on django

if i'm Create Dynamically table using jquery this is working This is my .html file code. <!DOCTYPE html> <html> <head> <title>test

Django: Getting the page an object is on

Let's say I have a class Foo. I want to know what page a particular instance of Foo will be on: eg: api.myapp.com/foos/?page=25. Given an object: Foo.objects.ge

How to use django-jalali calendar in tempates?

Im new to Django and im trying to use django in a Persian app, therefore I need users pick i a date(jalali date) and send it to server. I've used django-jalali