Hi, When changing the model, you will need to migrate.

Rather update the past_date field with the newdate etc..

 

 

Johannes

 

 

From: django-users@googlegroups.com <django-users@googlegroups.com> On Behalf 
Of Mayank Prajapati
Sent: Wednesday, January 29, 2025 12:34 PM
To: django-users@googlegroups.com
Subject: Re: File handling in Django

 

I am making train ticket booking project in which I have to keep record of 
number of tickets booked and remaining seats for 60 days from today. So as the 
day passes , passed date field have to be removed and new date after 59 days 
from today has to be added.

 

On Wed, 29 Jan 2025, 12:24 pm Agar Joshua, <joshuaaga...@gmail.com 
<mailto:joshuaaga...@gmail.com> > wrote:

This is an interesting implementation. I am curious, what are you trying to 
achieve that necessitates adding and removing fields? And wouldnt that be 
solved better with some table relationship instead?

 

On Tue, Jan 28, 2025 at 1:33 AM Mayank Prajapati <mayankprajapati1...@gmail.com 
<mailto:mayankprajapati1...@gmail.com> > wrote:

I am making a full stack project with JavaScript and react for front end , 
Postgre SQL for database and Django for backend and Django rest framework for 
APIs. So in models.py file there's one field which is to be removed and another 
field is to be added at the end. This process has to be done once daily at 
specific time. For example, assume there are five fields in my models i.e. 
A,B,C,D and E. At some specific time field B will be removed and new field E 
will be added after D, again same process will repeat next day field C will be 
removed and new field F will be added after E. I can implement this process 
through python file handling and "with" method. 

 

So my question is, should i implement this process in my Django project? Will 
this process work efficiently in production environment?

-- 
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 
<mailto:django-users+unsubscr...@googlegroups.com> .
To view this discussion visit 
https://groups.google.com/d/msgid/django-users/75091646-157a-4b2e-8aa0-0c05b2d50b0fn%40googlegroups.com
 
<https://groups.google.com/d/msgid/django-users/75091646-157a-4b2e-8aa0-0c05b2d50b0fn%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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 
<mailto:django-users+unsubscr...@googlegroups.com> .
To view this discussion visit 
https://groups.google.com/d/msgid/django-users/CALHJg5%2BRzLrFE0%3DAro_ByQe3nJixBMLObdfVQNsBoeTsRibLhQ%40mail.gmail.com
 
<https://groups.google.com/d/msgid/django-users/CALHJg5%2BRzLrFE0%3DAro_ByQe3nJixBMLObdfVQNsBoeTsRibLhQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .

-- 
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 
<mailto:django-users+unsubscr...@googlegroups.com> .
To view this discussion visit 
https://groups.google.com/d/msgid/django-users/CAEn_UdWRSHSvBVtvpQ3QfENwbFtX7zA2i2p4z9_ye2vNd4Mqhg%40mail.gmail.com
 
<https://groups.google.com/d/msgid/django-users/CAEn_UdWRSHSvBVtvpQ3QfENwbFtX7zA2i2p4z9_ye2vNd4Mqhg%40mail.gmail.com?utm_medium=email&utm_source=footer>
 .



-- 
This email has been checked for viruses by AVG antivirus software.
www.avg.com

-- 
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 discussion visit 
https://groups.google.com/d/msgid/django-users/001f01db725e%2406e20690%2414a613b0%24%40gmail.com.

Reply via email to