Okay. Is it possible to load the csv file one time do the POST or any request multiple times without loading the same file.Of course If it is in same class??
On Mon, Feb 17, 2020 at 7:14 PM Kasper Laudrup <laud...@stacktrace.dk> wrote: > Hi Soumen, > > On 17/02/2020 14.31, Soumen Khatua wrote: > > Hi Folks, > > Actually I want to load the csv file for first time only afterwards I > > don't want to load the csv files,but everytime when i'm calling the url > > the same csv fie is loading for the same operation.How I can restrict it > > for multiple loadings? > > As a quick and dirty solution, you could probably use a class variable: > > > https://docs.python.org/3/tutorial/classes.html#class-and-instance-variables > > But a nicer way would be to have some kind of service or similar that > the view could call or perhaps abstract the CSV file as a Django model. > > Kind regards, > > Kasper Laudrup > > -- > 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 on the web visit > https://groups.google.com/d/msgid/django-users/cdb81c92-9cd9-7401-ef86-67c9fc643000%40stacktrace.dk > . > -- 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 on the web visit https://groups.google.com/d/msgid/django-users/CAPUw6WYG5y459D54Y6KmdyfbsvztEb43On_N1g4mhDVyS9jyFQ%40mail.gmail.com.