Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread UJJWAL AGRAWAL
Dear Patel Druvish , I have tried with that one Its showing such kind of error when trying to css file Failed to load resource: the server responded with a status of 404 (Not Found) extension.js:24 onMessage extension ial.js:450 Clean the cache of the scraper (new onComplete event) style.css'%%7D

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread UJJWAL AGRAWAL
Dear patel dhruvish """ Django settings for mypro project. Generated by 'django-admin startproject' using Django 3.2.4. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.co

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread UJJWAL AGRAWAL
Dear patel DHRUVISH urls.py code is: from django.urls import path from . import views urlpatterns = [ path('',views.home, name='home'), ] On Wed, Jun 30, 2021 at 1:01 PM UJJWAL AGRAWAL wrote: > Dear patel dhruvish > > """ > Django settings for mypro project. > > Generated by 'django-adm

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread jasdeep singh
{% load static %} Give space in % and load On Wed, Jun 30, 2021, 9:47 AM UJJWAL AGRAWAL wrote: > Dear all I am facing one problem. > When I am writing {%load static%} rather than getting executed it is > getting displayed as simple text on the HTML output screen > > Please provide me the solut

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread shaik sufiyan
Please import os in the settings.py file On Wed, 30 Jun, 2021, 1:02 pm UJJWAL AGRAWAL, wrote: > Dear patel dhruvish > > """ > Django settings for mypro project. > > Generated by 'django-admin startproject' using Django 3.2.4. > > For more information on this file, see > https://docs.djangoprojec

Re: ImproperlyConfigured:

2021-06-30 Thread Abdoulaye Koumaré
You need to install psycopg2 to use PostgreSQL run the command below from your terminal pip install psycopg2 On Tuesday, 29 June 2021 at 12:35:23 UTC ypa...@sapat.com wrote: > Watching for file changes with StatReloader > Exception in thread django-main-thread: > Traceback (most recent call las

In django you can either obtain a `csrftoken` from a cookie or the form can generate a nonce `csrftoken`. How does django validate both?

2021-06-30 Thread Patrice Chaula
In django you can either obtain a `csrftoken` from a cookie. Or the form can generate a nonce `csrftoken`. How does django validate both and where are they stored on the server. Are they stored as part of the session? -- You received this message because you are subscribed to the Google Groups

Re: In django you can either obtain a `csrftoken` from a cookie or the form can generate a nonce `csrftoken`. How does django validate both?

2021-06-30 Thread Antonis Christofides
Django does not store csrftoken on the server. Django provides the csrftoken in two places: 1) The cookie; 2) A hidden form field. When the browser makes a POST request, then: 1. It sends back the cookie anyway (that's what cookies do) 2. It submits the csrftoken as a form field (or as the X-C

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread pritam bhutada
try ---> {% load staticfiles %} On Wednesday, June 30, 2021 at 9:47:46 AM UTC+5:30 ujjwal...@gmail.com wrote: > Dear all I am facing one problem. > When I am writing {%load static%} rather than getting executed it is > getting displayed as simple text on the HTML output screen > > Please provi

Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-30 Thread Saad Olamilekan
load your static by putting space in between the percent and load and after static before percent eg. {% load static %}. On Wed, Jun 30, 2021, 2:56 PM pritam bhutada try ---> {% load staticfiles %} > > On Wednesday, June 30, 2021 at 9:47:46 AM UTC+5:30 ujjwal...@gmail.com > wrote: > >> Dear all

return json value as char/text instead of json

2021-06-30 Thread Campbell McKilligan
I'm using Concat of some annotated json fields (from .values("data__somefield", "data__someotherfield") The values are being returned as json, so the concatenation ends up with a hot mess of double quotes: "somevalue" "someothervalue" I can see in the query that Django is using the "->" operat

Re: In django you can either obtain a `csrftoken` from a cookie or the form can generate a nonce `csrftoken`. How does django validate both?

2021-06-30 Thread Patrice Chaula
What if I can copy that cookie (samesite) in developer tools from legitimate-site.com and create a new cookie for malicious-site.com using developer tools. After I do that I make a request. Will it be successful? On Wed, Jun 30, 2021, 3:43 PM Antonis Christofides < anto...@antonischristofides.com

Re: MODEL CONSTRAINT (based on two dates)

2021-06-30 Thread Simon Charette
Short answer is that you can't; constraints cannot spans across JOINs. You might be able to use database triggers to emulate though. Le lundi 28 juin 2021 à 08:08:27 UTC-4, ngal...@gmail.com a écrit : > I have two models like this > > How can I make models constraint based on the dates as shows

Re: In django you can either obtain a `csrftoken` from a cookie or the form can generate a nonce `csrftoken`. How does django validate both?

2021-06-30 Thread Antonis Christofides
What if I can copy that cookie (samesite)  in developer tools from legitimate-site.com and create a new cookie for malicious-site.com using developer tools. After I do that I make a request. Will it be successful? I think it would probably

Sorting price and discount price (urgent)

2021-06-30 Thread Aritra Ray
I am facing a problem in including the discount_price into consideration when sorting price through the products. Kindly help me to do so. The below attached files are filters.py, views.py and models.py. Regards, Aritra class ProductFilter(django_filters.FilterSet): sort = OrderingFilter(