Re: Two models one form, or use generic CreateView

2020-06-09 Thread chaitanya orakala
Hi Sha, I like your template CSS styling and formatting. Could you please post your index HTML and CSS style if you don't mind. Thanks in Advance On Tue, Jun 9, 2020 at 4:18 PM Yamen Gamal Eldin wrote: > It's pretty straight forward, just search about overload save function for > update view, th

Re: How to get Dependent Dropdown Feilds in Django ModelForms. Please answer : Important

2020-06-09 Thread chaitanya orakala
sure, I will do it by tomorrow On Tue, Jun 9, 2020 at 2:35 AM Balaji Shetty wrote: > Nice > > Can you please share sample code on git link. > > This is very common requirement in every project > > > > On Tuesday, June 9, 2020, chaitanya orakala > wrote: > >> Thank You, Amine Aziz. I tried jque

Re: Django CSRF protection and AJAX calls

2020-06-09 Thread Allan Rafael
Você pode criar um arquivo js chamado *ajax_post_config.js* e nele inserir o seguinte código: function csrfSafeMethod(method) { // these HTTP methods do not require CSRF protection return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method)); } function getCookie(name) { var cookieValue

autocomplete django in visual studio code

2020-06-09 Thread THAKUR SINGH
INSTALL WINDOWS 10 THEN INSTALL YOUR SOFTWARES -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussio

autocomplete django in visual studio code

2020-06-09 Thread cosmos multi
I am having a problem and it is that since I have a new laptop I reinstalled arch linux and visual studio code, but when I reinstalled the software the visual studio code autocomplete for django does not work for me, for python it does without problems but When working with django, the framewor

Django-Firebase cloudstore ORM

2020-06-09 Thread sparsh goil
Hey, Does anyone know how to perfectly use Firebase with Django? I am using Django-Firebase-ORM which automatically maps my models to cloud firestore database but I am getting error. Model.py from firebase_orm import models # Create your models here. class Article(models.Model): headline =

Re: Django 1.11 security backports

2020-06-09 Thread carlos
i think no! On Tue, Jun 9, 2020 at 10:21 AM Nikolas J. Nyby wrote: > Is anyone maintaining an unofficial Django 1.11 security backports branch? > > I'm migrating to Django 2.2 as soon as possible, but I was just curious if > anyone has a branch with the recent security fixes ported in to Django

Re: Two models one form, or use generic CreateView

2020-06-09 Thread Yamen Gamal Eldin
It's pretty straight forward, just search about overload save function for update view, that will make u create a save function in your form, do the necessary actions on your instance, and voula Le mar. 9 juin 2020 à 16:24, The Sha a écrit : > Ok intressant, i cant find any good exemplen. Thank

Re: Python 3.8 Installed, yet Django 1.11 is Automatically Being Installed on Mac

2020-06-09 Thread arhoon io
Thank you all - I downloaded Django 3.0 using Anaconda. On Tuesday, June 9, 2020 at 2:35:04 PM UTC-5, Clive Bruton wrote: > > You have to use the correct python install: > > python3 -m pip install django > > You can test your versions and locations: > > which python3 >

Re: Changing name of file in FileField field

2020-06-09 Thread Chetan Ganji
Hi, I had come across a similar issue last year. Filename would change after the upload. It been time and I am not sure why it happened then. But, i think it happened because a file with the same name was already present the given location. And the django/drf code would make the name of the file un

Re: Python 3.8 Installed, yet Django 1.11 is Automatically Being Installed on Mac

2020-06-09 Thread Clive Bruton
You have to use the correct python install: python3 -m pip install django You can test your versions and locations: which python3 which python python3 -V python -V When you are running the development server: python3 manage.py runserver You ca

Re: How to get a full path of web page to my views.py?

2020-06-09 Thread Sergei Sokov
Thank you вторник, 9 июня 2020 г., 15:37:39 UTC+2 пользователь RyuCoder написал: > > https://docs.djangoproject.com/en/3.0/ref/request-response/ > > > On Tue, Jun 9, 2020,

Changing name of file in FileField field

2020-06-09 Thread Matthew Pava
Good day, I have been struggling with this issue for weeks, and I can't figure out what I'm doing wrong. I have a model with a FileField with a custom upload_to function. It seems to work fine when I'm doing runserver. Problems arise during my tests. My assertion error fails: AssertionError: 'R

Understanding timezone with queryset day lookups

2020-06-09 Thread Ryan Causey
I ran into what I consider somewhat surprising behavior the other day when using the `__date` lookup to compare a datetime to a date in a queryset. It appears according to these docs that the Queryset will convert the datetime value in the DateTimeField to the current timezone before comparing.

Django 1.11 security backports

2020-06-09 Thread Nikolas J. Nyby
Is anyone maintaining an unofficial Django 1.11 security backports branch? I'm migrating to Django 2.2 as soon as possible, but I was just curious if anyone has a branch with the recent security fixes ported in to Django 1.11. -- You received this message because you are subscribed to the Googl

Re: Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Ok intressant, i cant find any good exemplen. Thank you for the reply. Im new to django can you maybe be more specific with som examples or point me in the right direktion? thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri

Re: Two models one form, or use generic CreateView

2020-06-09 Thread Yamen Gamal Eldin
There's many ways to solve it. My favorable approach will be to override the save method in the targeted form. Le mar. 9 juin 2020 à 14:35, The Sha a écrit : > Hi > > I hava a problem in django, i have to models one is a CustomUser Model and > the other is a Address model. > > The problem is tha

Re: How to get a full path of web page to my views.py?

2020-06-09 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.0/ref/request-response/ On Tue, Jun 9, 2020, 6:41 PM Sergei Sokov wrote: > I would like to use a current url path in my views.py > > по

Re: How to get a full path of web page to my views.py?

2020-06-09 Thread Sergei Sokov
I would like to use a current url path in my views.py понедельник, 8 июня 2020 г., 14:25:25 UTC+2 пользователь Rupesh Dahal написал: > > Can you please elaborate your problem. > > On Monday, June 8, 2020 at 12:26:12 AM UTC+5:45, Sergei Sokov wrote: >> >> I have the path in the web browser like th

Re: Custom template tags - instance.templatetag

2020-06-09 Thread The Sha
Den tisdag 2 juni 2020 kl. 22:53:06 UTC+2 skrev Jan Gregorczyk: > > Hi! How to change my template tag? > from django import template > > register = template.Library() > > @register.simple_tag > def votes_up_exists(answer, user_id): > pass > > how I use it - {% votes_up_exists answer request.user.

Re: FilterSelectMultiple Widget's right list box does not render

2020-06-09 Thread Zanii Mirzaa
i have same problem i cant figure out the solution i am new to django and web programming also My console error is : VM328 SelectFilter2.js:246 Uncaught ReferenceError: grp is not defined at VM328 SelectFilter2.js:246 (anonymous) @ VM328 SelectFilter2.js:246 SelectBox.js:144 Uncaught Refe

Two models one form, or use generic CreateView

2020-06-09 Thread The Sha
Hi I hava a problem in django, i have to models one is a CustomUser Model and the other is a Address model. The problem is that when i create a generic CreateView for the Address model and use a pk: url the address form wont get the instance of the users PK for adding a new address. my mode

Re: Possible Django bug I am considering raising

2020-06-09 Thread 'OwlHoot' via Django users
On Thursday, 4 June 2020 16:25:09 UTC+1, OwlHoot wrote: > > > I believe the issue I have enquired about on the following Stack Exchange > page : > > > https://stackoverflow.com/questions/62162288/baffling-error-filtering-django-objects-of-derived-class-by-values-in-foreign-ke > By adding some d

Re: I need help

2020-06-09 Thread Devender Kumar
For that you need to create a api and use ajax on javascript side to. Use this api to push that variable either periodically or as per req On Tue, 9 Jun, 2020, 10:24 am meera gangani, wrote: > I have a html file in which i have implementing stopwatch and i have to > that variable stored in djan

Demande d'aide

2020-06-09 Thread Dino P.Russe
ValueError at /cart/ Field 'id' expected a number but got 'product_id'. cart.py from decimal import Decimal from django.conf import settings from shop.models import Product class Cart(object): def __init__(self, request): """ Initialize the cart. """ sel

Bridge between two users

2020-06-09 Thread Soumen Khatua
Hi Folks, I have one Follower system and here I want to check those are following to me, we have a mutual connection or not. If they are following to me and I'm not following to them, I want to set in frontend follow back. Inside the views I'm fetching the data and sending them to serializer bu

How to allow users tag a post when making new post

2020-06-09 Thread sunday honesty
Hello Django devs! It's been a while and I hope you all are fine? In the forum (blog) am making, I want a functionnlaity to allow users who want to make a post to tag other posts they created before or others created that is similar to the ones they're making. I learnt about the Django taggit bu