RE: sorting issue

2021-09-11 Thread dupakoor kannan
Hello everyone, I have a model that contains alphanumeric protein names e.g. ('Ypp1Aa100"). I have to properly sort it when returning the contents to the html. I found some fantastic sorting examples from this blog post https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/. I have

inline formset data not save

2021-09-11 Thread Anirban Singha
models.py class product_list(models.Model): date=models.DateTimeField(auto_now_add=True,null=True) deal=models.ForeignKey(dealForm, null=True, blank=True , on_delete =models.CASCADE) pro_name=models.ForeignKey(wareForm, null=True, on_delete=models.CASCADE)

Re: What is the work of instance & filename which is passing as parameter?

2021-09-11 Thread Hella thor
For Chinese programmers,it's money Tanjina Sharmin 于2021年9月3日周五 下午8:25写道: > def path_and_renamecsv(instance, filename): > upload_to = 'attendancesheet' > ext = filename.split('.')[-1] > # get filename > if instance.pk: > filename = '{}.{}'.format(instance.pk, ext) > else: > # set filename as