Wednesday, January 29, 2025

RE: File handling in Django

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, <joshuaagarjj@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 <mayankprajapati1399@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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-users/75091646-157a-4b2e-8aa0-0c05b2d50b0fn%40googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-users/CALHJg5%2BRzLrFE0%3DAro_ByQe3nJixBMLObdfVQNsBoeTsRibLhQ%40mail.gmail.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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/django-users/CAEn_UdWRSHSvBVtvpQ3QfENwbFtX7zA2i2p4z9_ye2vNd4Mqhg%40mail.gmail.com.


Virus-free.www.avg.com

No comments:

Post a Comment