I thought that None is equal to 'forever'.
Thanks.
On 26 Cze, 01:41, humble wrote:
> you didn't specify max_age in response.set_cookie('myname', data),
> which assumes None by default. Therefore that cookie expires when
> browsers closes.
>
> On
Hello,
When I set SESSION_EXPIRE_AT_BROWSER_CLOSE to True, Django
automatically remove not only my session cookie (sessionid) but also
any others cookies creating by using response.set_cookie('myname',
data). Why? I want to keep all cookies without session cookie.
Thank You.
--~--~-~--
On 22 Cze, 23:14, James Bennett wrote:
> No, it's a very bad method. Consider what happens if two people want
> to add fields of the same name; trying to stick them in the User model
> will obviously fail and break at least one person's code.
Yes, I know what you mean, but It's small project with
Hi,
Is it a good way to extend Django User model using add_to_class()?
I have to add only two extra fields to the User model and I think that
using Profile Model to do this is unnecessary.
My way:
# Accounts models.py
User.add_to_class('field1', models.CharField(max_length=255))
User.add_to_cla
Hi,
I want to get total price (quantity*price) in this example for objest
list (not one) of A class
class A(models.Model)
name = models.CharField(max_length=255)
class B(models.Model)
quantity = models.PositiveIntegerField()
price = models.DecimalField(max_digits=10, decimal_places=2)
a
Hi,
I want to get total price (quantity*price) in this example for objest
list (not one) of A class
class A(models.Model)
name = models.CharField(max_length=255)
class B(models.Model)
quantity = models.PositiveIntegerField()
price = models.DecimalField(max_digits=10, decimal_places=2)
a
6 matches
Mail list logo