-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
from datetime import date, datetime
from urllib.parse import urlencode
"""
offer = models.ForeignKey(Offer, models.PROTECT, verbose_name='zbiórka')
- customer_ip = models.GenericIPAddressField('adres IP', null=True)
+ customer_ip = models.GenericIPAddressField('adres IP', null=True, blank=True)
name = models.CharField('nazwa', max_length=127, blank=True)
email = models.EmailField('e-mail', blank=True, db_index=True)
perks = models.ManyToManyField(Perk, verbose_name='prezenty', blank=True)
language_code = models.CharField(max_length=2, null=True, blank=True)
notifications = models.BooleanField('powiadomienia', default=True, db_index=True)
- notify_key = models.CharField(max_length=32)
+ notify_key = models.CharField(max_length=32, blank=True)
class Meta:
verbose_name = 'wpłata'
class Spent(models.Model):
""" Some of the remaining money spent on a book. """
- book = models.ForeignKey(Book, models.PROTECT)
+ book = models.ForeignKey(Book, models.PROTECT, null=True, blank=True)
+ link = models.URLField(blank=True, help_text='zamiast książki, np. kolekcja')
amount = models.DecimalField('kwota', decimal_places=2, max_digits=10)
timestamp = models.DateField('kiedy')
+ annotation = models.CharField('adnotacja', max_length=255, blank=True, help_text="np. 'audiobook'")
class Meta:
verbose_name = 'pieniądze wydane na książkę'