Re: Exported filtered by date data in django

2021-11-20 Thread Twizerimana Emmanuel
hy I want to declare global variable that used in many functions in python can you show me On Sat, Nov 20, 2021 at 9:49 AM Eugene TUYIZERE wrote: > Dear Ramadhan, > > Still it does not work > > On Sat, 20 Nov 2021 at 09:18, ramadhan ngallen wrote: > >> Depends on your query filter_val2 should

Re: TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

2021-11-20 Thread Peter of the Norse
CommentForm inherits from both ModelForm and “forms”. I don’t know what “forms” is, but PEP-8 says all classes should be capitalized. If forms is a base class that has already defined Meta, then you need to have CommentForm’s extend it. So change the line to class Meta(forms.Meta): > On Oct

Re: How to retrive data from more than two tables with many to many relationships?

2021-11-20 Thread Lalit Suthar
refer: https://docs.djangoproject.com/en/2.2/topics/db/examples/many_to_many/ On Sat, 13 Nov 2021 at 00:08, Madhav Dhungana wrote: > *What I want?* > > 1 ) I want to add pages and pull the page meta data from pagemeta table. > One page will have more than on pagemeta. > >1. > >PageMeta

Re: Handling url in class based views.

2021-11-20 Thread Lalit Suthar
you can get that slug value from kwargs def get(self, request, *args, **kwargs): slug = self.kwargs.get("slug") also if you like to pass it in the context you can override get_context_data refer: https://ccbv.co.uk/ to know more about class based views you can refer to this playlist

Re: Exported filtered by date data in django

2021-11-20 Thread Lalit Suthar
`filter_val1` and `filter_val2` are coming from POST request so they are in `string` format. But the `created_at` field of the `EXPENSES` table is in `datetime` format. This is why the result of the filter() is coming as empty. The query will run fine when the 2 values compared are in the same

choices = django background color

2021-11-20 Thread Jonathas Matos
Mudar condicionalmente a cor de fundo da célula no django admin Olá Preciso retornar uma lista de opcões do mysql, cada uma com uma cor. models.py STATUS_CHOICES = (

Re: Multiple image upload using Django, Vuejs and Axiox

2021-11-20 Thread Gabo LaTo
how are you sending the files from the client? It seems to me you're reading the files metadata but you are not accessing the image binaries to store them. Look at this example. It's made in angular but it can give you an idea: