passing a parameter through CreateView to a be an initial value in a form

2020-02-19 Thread Sam Hefer
Hey Patric, Have a look at stackoverflow. https://stackoverflow.com/a/60273100/7063031 I used form_valid in the createview to get the form instance field, passed the pk through the URL to the template, then used get_context in the view so the template can get the pk from the URL. You’ll

Re: [ANN] copernic v0.0.0

2020-02-19 Thread Amirouche Boubekki
On Monday, February 17, 2020 at 11:13:38 PM UTC+1, Amirouche Boubekki wrote: > > I am very pleased to announce that I will work on porting my work on a > versioned database (read: scalable wikidata) to Python and Django. > > If you want to know more and follow the development watch this: >

passing a parameter through CreateView to a be an initial value in a form

2020-02-19 Thread Patrick Carra
Hello I am trying to pass a value from a link into CreateView and use that value as an inital value in a form. I am not having much success and am not sure that I am doing this correctly. Here is what I have so far: Link: Circuit Ref: {{ record.id1 }} urls.py path('addXC//',

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread mohamed alisaleh...@gmail.com
بتاريخ الأربعاء، 19 فبراير، 2020 10:51:53 م UTC+3، كتب Ricardo H: > Hi Simon,  > > > It was ok on 2.2.6, only on 3.0.3 it fails. > > > I use BigIntegerField because I use it for some calculations after that, but > even if I try with DurationField it doens't assert right. > > > Definitely

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
Hello Ricardo, I suggest you follow these docs to submit your bug report and link to this thread. https://docs.djangoproject.com/en/3.0/internals/contributing/bugs-and-features/#reporting-bugs I'd mention that the issue is also present if you use `output_field=DurationField` as

Re: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

2020-02-19 Thread DHRUVA
How can I do ImageField and FileField in crispy forms On Thu, 20 Feb, 2020, 12:53 AM , wrote: > > > Yaa did that still facing issue > > > > *From: *onlinejudge95 > *Sent: *Thursday, February 20, 2020 12:32 AM > *To: *django-users@googlegroups.com > *Subject: *Re: Re: I am filling up the form

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Ricardo H
Hi Simon, It was ok on 2.2.6, only on 3.0.3 it fails. I use BigIntegerField because I use it for some calculations after that, but even if I try with DurationField it doens't assert right. Definitely must be caused by this patch, if I can't find another solution, where and how should I

Django: ManyToManyField appears as empty on my template

2020-02-19 Thread Sergio Madueño
I'm having an issue displaying a ManyToManyField in a character profile template using Django. The template has to show an avatar, alongside some information about the character, including a list of guilds this character had joined. But, when I try to display that list, it appears as if it is

Re: How to store a boolean expression (parse tree) in a model?

2020-02-19 Thread Simon Charette
Could you simply make the connector field nullable to express that? Simon Le mercredi 19 février 2020 12:15:32 UTC-5, test a écrit : > > thanks, do you know how i can create custom leaf nodes when using MPTT or > treebeard? > > My parent nodes should have connector types such as AND/OR but the

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
Hello Ricardo, This could be a regression caused by a patch addressing a regression in 3.0.3[0]. Did you also notice this behaviour on Django 2.2.x or was this project started from Django 3.0? >From what I can see though I find it strange that the ExpressionWrapper of end_total_time have an

RE: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

2020-02-19 Thread dhruvashah1221999
 Yaa did that still facing issue From: onlinejudge95Sent: Thursday, February 20, 2020 12:32 AMTo: django-users@googlegroups.comSubject: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working The template file  

Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

2020-02-19 Thread onlinejudge95
On Wed, Feb 19, 2020 at 11:31 PM wrote: > The template file > > > > > > <*form **method**="post" **novalidate*> > > No action attribute defined here. Where do you expect the data to be sent? > > {% csrf_token %} > > <*div **class**="form-group col-md-4 mb-0"*> > {{

Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Ricardo H
Hello, after I updated django from 3.0.2 to 3.0.3 the result of the following code has changed when using a MySQL database. It produces a wrong sql query and also the wrong result for "*end_total_time"* attribute. Is this a bug ? also is there any other way to get the wright result using 3.0.3

RE: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

2020-02-19 Thread dhruvashah1221999
The template file      {% csrf_token %} 
    {{ form.name|as_crispy_field }}  div> 
    {{ form.email|as_crispy_field }}  div> 
RE: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working
 import os# Build paths inside the project like this: os.path.join(BASE_DIR, ...)BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))# Quick-start development settings - unsuitable for production# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/# SECURITY

Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

The session must be activated in the settings file check that it should work smoothly. On the insert can u share the template file mostly .It is to do with post requests not reaching back end. You can try to print the post request before your save to model to see if all inputs are coming

I am filling up the form but my filled out items are not rendering into database and also the session is not working

views.py from django.views.generic import FormView, TemplateView from django.shortcuts import render,redirect from .models import modelstep1,modelstep2,modelstep3,modelstep4,modelstep5,modelstep6,modelstep7,modelstep8,modelstep9,modelstep10 from .forms import

Re: How to store a boolean expression (parse tree) in a model?

thanks, do you know how i can create custom leaf nodes when using MPTT or treebeard? My parent nodes should have connector types such as AND/OR but the child should not On Tuesday, February 18, 2020 at 11:30:40 PM UTC-5, Simon Charette wrote: > > I suggest you have a look at the "Trees and

Re: NoReverseMatch() error while learning Python

On Wed, Feb 19, 2020 at 4:47 AM DamnGeniuses' Squad < andhikaravelen...@gmail.com> wrote: > NoReverseMatch at /polls/1/ > > Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: > ['polls/(?P[0-9]+)/vote/$'] > > Request Method: GET > Request URL: http://127.0.0.1:8000/polls/1/

NoReverseMatch at /sitemap.xml

When i'm loading sitemap.xml for my site i'm getting this error Reverse for 'blog-detail' with arguments '('This is my title slug', '2020', '2', '19')' not found. 1 pattern(s) tried: ['blog\\/(?P[0-9]+)\\/(?P[0-9]+)\\/(?P[0-9]+)\\/(?P[-a-zA-Z0-9_]+)$'] sitemap.py class

djoser and custom user model

Hello team, I need help with understanding how djoser and custom user model works better. Problem breakdown First, I’m trying to manage my system users. I want to implement customers, employees, and admin as users in the system. I want to know if I should create a separate table in my DB for

Help on passing model field as function argument

Hi All, *Views.py :* class DASDataViewSet(viewsets.ModelViewSet): queryset = DASData.objects.all() serializer_class = DASDataSerializer def create(self, request, *args, **kwargs): try: das_data = { 'patient': request.data['patient'],

NoReverseMatch() error while learning Python

NoReverseMatch at /polls/1/ Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: ['polls/(?P[0-9]+)/vote/$'] Request Method: GET Request URL: http://127.0.0.1:8000/polls/1/ Django Version: 3.0.3 Exception Type: NoReverseMatch Exception Value: Reverse for 'vote' with

Re: using Django to create/build enterprise e-commerce system

Hello, saw your reply and i was wishing to a favour, i am a young django programer and i need some help, working on some projects and with guide from people like you will be of great help, so i wantedt could mentor me please On Saturday, February 1, 2020 at 6:13:29 PM UTC+1, Henry Udoye wrote:

Error while learn by Django Tutorial Chapter 4

NoReverseMatch at /polls/1/ Reverse for 'vote' with arguments '('',)' not found. 1 pattern(s) tried: ['polls/(?P[0-9]+)/vote/$'] Request Method: GET Request URL: http://127.0.0.1:8000/polls/1/ Django Version: 3.0.3 Exception Type: NoReverseMatch Exception Value: Reverse for 'vote' with