Re: DEFAULT Django Session is still using File in /tmp (Can't read from directory)

2021-06-13 Thread Ryan Nowakowski
You probably don't want to use file-based sessions if you're load balancing your application across multiple nodes. If your session gets created on one application node, how will the other application nodes have access to it? This might work if you have access to each file-based session on every

Django Project

2021-06-13 Thread Duncan Jerry
Hi guys.. Am a software developer here in Nigeria building appliations on the fly. currently i have a project i want to excecute (mobile app), it requires a backend django developer, those who want to try their hand out on something great. I currently have four engineers on the job, Two fronte

Re: Initial data doesn't go complelely in the modelformset

2021-06-13 Thread VISHESH MANGLA
In line 58 you can see me adding "print_report_check":True, my form class PrintReportModelForm(ModelForm): print_report_check = forms.BooleanField(widget=forms.CheckboxInput(), required=False) class Meta: fields = ["PAN_ID", "print_report_check"] model = User

Initial data doesn't go complelely in the modelformset

2021-06-13 Thread VISHESH MANGLA
in line 38 i have that print statement, it's output is at the top , I dont know why that initial data is not going into that model formset. actually one data the PAN_ID actually went into the modelform, but the checkbox's "checked" didnt. You can see the html of the formset and the checkbox fie

How can i start to learn django?

2021-06-13 Thread ENJOY
I am begginer in python. how can i start to learn django from begginners to adance. please help me. -- 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-u

Re: CHOICES

2021-06-13 Thread Nikeet NA
from django.db.models import Sum, DecimalField from django.db.models.functions import Cast Model.objects.annotate(deci_con_factor=Cast('conversion_factor', DecimalField()).aggregate(sum=Sum('deci_con_factor')).get('sum') You need to change your char type to decimal type , you can use CAST opera

Re: Make permissions according branch id

2021-06-13 Thread Nikeet NA
What you are trying to do is called object-level permission in Django, normally people use is model-level permission, you can use this module Django guardian . On Sunday, 13 June 2021 at 10:33:06 UTC+5:30 waelmuh...@gmail.com wrote: > Did any o

Re: CHOICES

2021-06-13 Thread Sebastian Jung
Hello, i think this is the right answer: from django.db.models import Sum ModelName.objects.filter(field_name__isnull=True).aggregate(Sum('field_name'))# returns {'field_name__sum': 1000} for example Am So., 13. Juni 2021 um 12:04 Uhr schrieb www.forum-gh.com < ladamo...@gmail.com>: > Hello f

CHOICES

2021-06-13 Thread www.forum-gh.com
Hello friends please i have: conversion_fqctor = models.charfield(choices=FACTOR) i want to sum the conversion_factor inside my view.py how do i convert it to a decimal and use the Sum() -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs