Re: Declarative mechanism for Django model rows

2021-12-08 Thread Thomas Lockhart
I may be completely misunderstanding your use case, but just in case… You can have different views in your application, and if you don’t want to expose the data as separate pages then you might consider django-rest-framework to provide data in various ways, including across models. You’ll end

Declarative mechanism for Django model rows

2021-12-08 Thread Alex Dehnert
With some frequency, I end up with models who contents are approximately constant. Are there good ways of handling this? For example, I might have a set of plans that users can sign up for, with various attributes -- ID, name, order in the list of plans, cost, whether the purchaser needs to

Re: Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-08 Thread Sencer Hamarat
Hi, I think this is not related with apache It seems like class object property is called as a method somehow. Unfortunately the error does not reveal the property name. Regards, Sencer HAMARAT On Wed, Dec 8, 2021 at 4:59 PM Kyle Paterson wrote: > Started a new project after not using

Re: How to filter and get all vendor details using category

2021-12-08 Thread Sencer Hamarat
Hi, You need to create a Category serializer an append it to VendorSerializer class CategorySerializer(serializers.ModelSerializer): class Meta: model = Category fields = ["category_name", ] class VendorSerializer(serializers.ModelSerializer): category =

How to filter and get all vendor details using category

2021-12-08 Thread Gautam Ankul
Here is my models class Vendor(models.Model): category_id = models.ForeignKey( Category, blank=True, null=True, verbose_name=u"Category id", on_delete=models.CASCADE, ) vendor_id = models.CharField( unique=True, max_length=50, blank=False, null=False, verbose_name=u"Vendor Id", ) vendor_name =

Why does django throw TypeError when sending requests through Apache WSGI?

2021-12-08 Thread Kyle Paterson
Started a new project after not using Django for roughly two years, works fine when running as a development server but throws TypeError: SimpleLazyObject class: property object not callable. >From apache error log: [Wed Dec 08 10:11:53.023239 2021] [wsgi:error] [pid 10704:tid 140343150348032]

Allow scroll on jQuery fancy Table

2021-12-08 Thread Eugene TUYIZERE
Dear Team, I am using jquery fancyTable in the django app but I searched everywhere and I did not find how to allow the scroll bar when fancyTable is used in django. Does anyone know how to do that? This is the code I have and I what to allow scroll bar: const itemsPerPage = 12; if (100 >