Yeah but this doesn't work. I describe IT in my Last Post why
Regards
MOHIT DILIP MAKWANA schrieb am Mo.,
15. Feb. 2021, 15:22:
> Hey,
> You can add a dunder method for your "Productinterests" model to
> return the name of the object instead of the name of model.
> It involves the use of
Hey,
You can add a dunder method for your "Productinterests" model to
return the name of the object instead of the name of model.
It involves the use of '__str__()' method. You can implement it in the
following way:
class Productinterests(models.Model):
id = models.AutoField(primary_k
-name-you-want
>>
>> On Mon, 15 Feb, 2021, 10:00 am Agni Venus, wrote:
>>
>>> Add
>>> Def __str__(self):
>>> return self.what-ever-name-you-want
>>>
>>> On Sun, 14 Feb, 2021, 9:00 pm sebasti...@gmail.com, <
>>> sebastian.j
t;>>
>>> On Sun, 14 Feb, 2021, 9:00 pm sebasti...@gmail.com, <
>>> sebastian.ju...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> i have installed per pip django-filters.
>>>>
>>>> Models.py:
>>>>
>>&
0:00 am Agni Venus, wrote:
>
>> Add
>> Def __str__(self):
>> return self.what-ever-name-you-want
>>
>> On Sun, 14 Feb, 2021, 9:00 pm sebasti...@gmail.com, <
>> sebastian.ju...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> i have
u...@gmail.com> wrote:
>
>> Hello,
>>
>> i have installed per pip django-filters.
>>
>> Models.py:
>>
>> class Productinterests(models.Model):
>> id = models.AutoField(primary_key=True)
>> name = models.CharField(max_leng
Add
Def __str__(self):
return self.what-ever-name-you-want
On Sun, 14 Feb, 2021, 9:00 pm sebasti...@gmail.com, <
sebastian.ju...@gmail.com> wrote:
> Hello,
>
> i have installed per pip django-filters.
>
> Models.py:
>
> class Productinterests(models.Model):
Hello,
i have installed per pip django-filters.
Models.py:
class Productinterests(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255, default="", blank=False, null=
False)
class Address(models.Model):
produc
sage-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Joel
Sent: Wednesday, August 15, 2018 9:29 AM
To: django-users@googlegroups.com
Subject: Compiling django filters into a variable and executing it at runtime?
I'm trying to write a search f
I'm trying to write a search function for my model.
A customer has the following fields:
cstid = models.AutoField(primary_key=True, unique=True)
name = models.CharField(max_length=35)
age=models.IntegerField()
gender = models.CharField(max_length=10, default='')
mobile = models.CharField(max_lengt
>
> Happy to see we are in same boat. It did work with like:
>
def prod_sold(self):
prod = self.get_prod().filter(seller__user=self.account.user)
sold = Order.objects.filter(id=products)
return sold
But it only shows number of products sold.
I couldn't make it happen.
I
Hi ,
i am having the same problem ..with my sellers App .
can you share your solutionthat how you filter
regards
On Monday, September 19, 2016 at 5:27:31 PM UTC+5, A.Khan wrote:
>
> I just got it done.
>
> Thanks.
>
> On Mon, Sep 19, 2016 at 4:19 AM, Ali khan > wrote:
>
>> I've tried
I just got it done.
Thanks.
On Mon, Sep 19, 2016 at 4:19 AM, Ali khan wrote:
> I've tried many ways but it ends with the same error that says:
>
> Cannot query "alikhan": Must be "User" instance.
>
> Where alikhan is admin user I've created with createsuperuser.
>
> Hate to bother you again but
I've tried many ways but it ends with the same error that says:
Cannot query "alikhan": Must be "User" instance.
Where alikhan is admin user I've created with createsuperuser.
Hate to bother you again but please advise.
Regards,
Ali
On Sun, Sep 18, 2016 at 11:08 PM, James Schneider
wrote:
>
On Sep 18, 2016 10:22 PM, "Ali khan" wrote:
>
> Thank you for your kind response James.
>
> I must be doing something wrong but I thought that importing different
models and assigning them with variable may had help me to filter it out. I
will try your suggestion first to save your valued time and
Thank you for your kind response James.
I must be doing something wrong but I thought that importing different
models and assigning them with variable may had help me to filter it out. I
will try your suggestion first to save your valued time and then will post
with result.
Let me add a field for
On Sep 18, 2016 4:01 AM, "Ali khan" wrote:
>
> I have two different apps and applying filters by ForeignKey and as
newbie I am not able to understand how it works.
>
> My Order App:
> ORDER_STATUS_CHOICES={
> ('created','Created'),
> ('paid','Paid'),
> }
>>
I have two different apps and applying filters by ForeignKey and as newbie
I am not able to understand how it works.
My Order App:
ORDER_STATUS_CHOICES={
('created','Created'),
('paid','Paid'),
}
class Order(models.Model):
status = models.CharField(max_
Hello all,
In my django application, all the data of different clients are
entered. Sometimes data of even same client is also entered. Now what
I require is to get all the data of the client when it asked for.
The views I used is:
---
The way you set up the ordering (e.g. 'change_date') just change that
to '-change_date'. A minus in front of the ordering keyword reverses
the sort order.
On 20 May, 06:32, rahul jain wrote:
> Hi,
>
> In my model, I have set up one filter which helps in filtering out the
> results on admin Panel.
Hi,
In my model, I have set up one filter which helps in filtering out the
results on admin Panel. The way its works now
that its displays the old objects first and then the most recent ones. Is it
possible to make it other way around ?.
Let me know.
--RJ
--
You received this message because y
sorry.
I have got it resolved. Seems i was in a totally wrong direction.
please ignore this question.
Hi
I am implementing such a function. I have a textarea that will be
inputted many characters, when they are showed in page, they will be
displayed in one line, very ugly.So I want to change the '\n' in the
texts to ''. I know this can be implemented by wysiwig editor(e.g.
tiny_mce), and I have
23 matches
Mail list logo