Re: What do you do with large project and forms?

2022-08-30 Thread Paul serubombwe
You need to work with model forms, but not forms, in your templates implement crispy forms to avoid over coding On Wed, Aug 31, 2022, 03:03 Mike Dewhirst wrote: > 1. Create a forms directory > 2. Create ../forms/__init__.py > 3. Move your forms.py into the forms directory > 4. In ./__init__.py

Re: e

2022-08-30 Thread Kennedy Saavedra
What problem do you have ? Try with a update in the console with your environment actived. sudo apt update upgrade Else: You can try install: pip install Django==3.2 Install this version with your environment actived. El lun., 29 de agosto de 2022 9:06 a. m., Samuel Alie Mansaray < mansar

RE: What do you do with large project and forms?

2022-08-30 Thread Mike Dewhirst
1. Create a forms directory2. Create ../forms/__init__.py3. Move your forms.py into the forms directory4. In ./__init__.py write from .forms import (  FormThis,  FormThat,  EtcForm,)This gives you unchanged forms calling from wherever ... from appname.forms import etc5. When all that is working

Re: What do you do with large project and forms?

2022-08-30 Thread Danish Nagori
Yes On Tue, 30 Aug 2022, 10:41 pm Julio Cojom, wrote: > I have a large project and forms.py per app is bigger than I thought with > 3k+ lines in each file, I'm looking for options to make a good scalation > structure, does anyone have experience with this? What do you do to > organize your forms

What do you do with large project and forms?

2022-08-30 Thread Julio Cojom
I have a large project and forms.py per app is bigger than I thought with 3k+ lines in each file, I'm looking for options to make a good scalation structure, does anyone have experience with this? What do you do to organize your forms in your projects? -- You received this message because you are

Re: What Programming Language should i learn

2022-08-30 Thread 'Steven D. Wolk' via Django users
Very good advice.. On Tue, Aug 30, 2022, 10:59 AM Shailesh Yadav wrote: > LOL, You mean you learned Django without first learning Python?. > > It depends but My suggestion would be to learn Python and later learn C++ > (So then you will get much clarity on what is the difference between these >

Re: What Programming Language should i learn

2022-08-30 Thread 'Kasper Laudrup' via Django users
On 30/08/2022 16.35, fawemimo olawale wrote: Which of these  programming language should i learn Please I need counselling on this two language though i have prior knowledge on Python Web Framework (Django) as a beginner's but i want Backend Language JAVA or ASP.Net ASP.net isn't a progra

Re: What Programming Language should i learn

2022-08-30 Thread 'Steven D. Wolk' via Django users
I dislike asp.net but it's popular and in demand. I prefer JSP and Java. On Tue, Aug 30, 2022, 10:35 AM fawemimo olawale wrote: > Which of these programming language should i learn > > Please I need counselling on this two language though i have prior > knowledge on Python Web Framework (Django

Re: Negative Stock Prevention

2022-08-30 Thread Thomas Couch
I don't see where you define the quantity variable, should that be instance.quantity? Also, presumably you want to check if quantity is greater than or equal to qu rather than 0. Try changing `if quantity > 0` to `if instance.quantity >= qu` On Tuesday, August 30, 2022 at 3:44:51 PM UTC+1 Ryan

Re: What Programming Language should i learn

2022-08-30 Thread Shailesh Yadav
LOL, You mean you learned Django without first learning Python?. It depends but My suggestion would be to learn Python and later learn C++ (So then you will get much clarity on what is the difference between these two languages). Then after that, you can learn Data structure and Algorithms. Than

Re: Negative Stock Prevention

2022-08-30 Thread Ryan Nowakowski
On Mon, Aug 29, 2022 at 05:18:39PM +0300, tech george wrote: > Please help crack the below code, I want to prevent negative stock, and if > the stock is == 0, deduct it from reorder_level instead. > Currently, the stock goes negative. > > models.py > > class Stock(models.Model): > quantity =

Re: What Programming Language should i learn

2022-08-30 Thread Ryan Nowakowski
On Tue, Aug 30, 2022 at 03:35:26PM +0100, fawemimo olawale wrote: > Which of these programming language should i learn > > Please I need counselling on this two language though i have prior > knowledge on Python Web Framework (Django) as a beginner's but i want > Backend Language > > JAVA or ASP

What Programming Language should i learn

2022-08-30 Thread fawemimo olawale
Which of these programming language should i learn Please I need counselling on this two language though i have prior knowledge on Python Web Framework (Django) as a beginner's but i want Backend Language JAVA or ASP.Net -- You received this message because you are subscribed to the Google Gro

Re: Negative Stock Prevention

2022-08-30 Thread Derek
As a start, the logic checks for the model should not be in views.py but rather with the model object (in models.py). You can extend the save() method, for example, and add the checks there. See: * https://docs.djangoproject.com/en/4.1/ref/models/instances/#saving-objects * https://docs.djang

Re: hello guys I need help

2022-08-30 Thread Rotimi Michael james
my name is engr rotimi michael james , i think i can help you please just make the model one to one relations , that is one user to a page and a page to one user, hope it help. On Mon, Aug 29, 2022 at 3:06 PM ISTEEN ISAC wrote: > I am beginner , how to redirect different types of pages to dif

Re: hello guys I need help

2022-08-30 Thread Baber Ibrar
Please share your query On Monday, August 29, 2022 at 9:02:05 PM UTC+5 bod...@gmail.com wrote: > please I'm a starter on python and django, i need some to help me with an > online class training. > > Thank > Moses > > On Monday, August 29, 2022 at 3:06:26 PM UTC+1 istee...@gmail.com wrote: > >

Re: hello guys I need help

2022-08-30 Thread Joshua Oriakhi
Hello Bode. When you say different types of pages what do you mean? Do you mean you want users to see pages specific to them? For instance, if my name is Joshua, you want me to see a page with my name and if your name is Bode, you want me to see a page with your name. Is this what you mean? On M