"If we need any data for your perks, we'll get to you by e-mail anyway."))
email = forms.EmailField(label=_("Contact e-mail"),
help_text=_("Won't be publicised. <br/>"
- "We'll use it to contact you about your perks and fundraiser status updates.<br/> "
+ "We'll use it to contact you about your perks and fundraiser status and payment updates.<br/> "
"Leave empty if you prefer not to be contacted by us."), required=False)
def __init__(self, offer, *args, **kwargs):
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-04-25 10:52+0200\n"
-"PO-Revision-Date: 2013-04-25 10:52+0100\n"
+"POT-Creation-Date: 2013-04-25 13:01+0200\n"
+"PO-Revision-Date: 2013-04-25 13:03+0100\n"
"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: forms.py:10
-#: templates/funding/wlfund.html:25
+#: templates/funding/wlfund.html:28
msgid "Amount"
msgstr "Kwota"
msgstr "E-mail kontaktowy"
#: forms.py:17
-msgid "Won't be publicised. <br/>We'll use it to contact you about your perks and fundraiser status updates.<br/> Leave empty if you prefer not to be contacted by us."
-msgstr "Nie będzie publikowany.<br/>Użyjemy go do kontaktowania się z Tobą w sprawie prezentów i informacji o zmianach statusu zbiórki.<br/>Zostaw puste, jeśli nie chcesz abyśmy się z Tobą kontaktowali."
+msgid "Won't be publicised. <br/>We'll use it to contact you about your perks and fundraiser status and payment updates.<br/> Leave empty if you prefer not to be contacted by us."
+msgstr "Nie będzie publikowany.<br/>Użyjemy go do kontaktu w sprawie prezentów i informacji o zmianach statusu zbiórki i płatności.<br/>Nie wypełniaj, jeśli nie chcesz abyśmy się z Tobą kontaktowali."
#: models.py:15
msgid "author"
msgstr "slug"
#: models.py:18
-#: models.py:100
+#: models.py:106
msgid "description"
msgstr "opis"
msgstr "Opublikowana książka."
#: models.py:29
-#: models.py:97
-#: models.py:118
+#: models.py:103
+#: models.py:124
msgid "offer"
msgstr "zbiórka"
msgid "offers"
msgstr "zbiórki"
-#: models.py:98
+#: models.py:104
msgid "price"
msgstr "cena"
-#: models.py:99
-#: models.py:119
+#: models.py:105
+#: models.py:125
msgid "name"
msgstr "nazwa"
-#: models.py:101
+#: models.py:107
msgid "end date"
msgstr "data końcowa"
-#: models.py:104
+#: models.py:110
msgid "perk"
msgstr "prezent"
-#: models.py:105
-#: models.py:123
+#: models.py:111
+#: models.py:129
msgid "perks"
msgstr "prezenty"
-#: models.py:120
+#: models.py:126
msgid "email"
msgstr "e-mail"
-#: models.py:121
-#: models.py:150
+#: models.py:127
+#: models.py:156
msgid "amount"
msgstr "kwota"
-#: models.py:122
+#: models.py:128
msgid "payed at"
msgstr "data wpłaty"
-#: models.py:133
+#: models.py:139
msgid "funding"
msgstr "wpłata"
-#: models.py:134
+#: models.py:140
msgid "fundings"
msgstr "wpłaty"
-#: models.py:151
+#: models.py:157
msgid "when"
msgstr "kiedy"
-#: models.py:154
+#: models.py:160
msgid "money spent on a book"
msgstr "pieniądze wydane na książkę"
-#: models.py:155
+#: models.py:161
msgid "money spent on books"
msgstr "pieniądze wydane na książki"
msgstr "Twoje wsparcie nie zostało zaksięgowane."
#: templates/funding/no_thanks.html:17
-#: templates/funding/thanks.html:29
+#: templates/funding/thanks.html:31
msgid "Go back to the current fundraiser."
msgstr "Wróć do aktualnej zbiórki."
-#: templates/funding/offer_detail.html:24
+#: templates/funding/offer_detail.html:25
+#: templates/funding/thanks.html:28
+#: templates/funding/wlfund.html:17
+msgid "Learn more"
+msgstr "Dowiedz się więcej"
+
+#: templates/funding/offer_detail.html:31
msgid "Support the publication"
msgstr "Wesprzyj publikację"
-#: templates/funding/offer_detail.html:29
+#: templates/funding/offer_detail.html:38
msgid "Donate!"
msgstr "Wpłać!"
-#: templates/funding/offer_detail.html:35
+#: templates/funding/offer_detail.html:46
+#: templates/funding/thanks.html:34
+msgid "Tell your friends!"
+msgstr "Powiedz swoim znajomym!"
+
+#: templates/funding/offer_detail.html:47
+msgid "Support Wolne Lektury!"
+msgstr "Wesprzyj Wolne Lektury!"
+
+#: templates/funding/offer_detail.html:50
msgid "See all fundraisers."
msgstr "Zobacz wszystkie zbiórki."
-#: templates/funding/offer_detail.html:40
+#: templates/funding/offer_detail.html:55
msgid "Supporters"
msgstr "Wpłaty"
-#: templates/funding/offer_detail.html:54
+#: templates/funding/offer_detail.html:69
msgid "Anonymous"
msgstr "Anonim"
msgstr "Aktualna zbiórka:"
#: templates/funding/offer_list.html:22
-#: templates/funding/offer_list.html:38
+#: templates/funding/offer_list.html:37
msgid "Previous fundraisers:"
msgstr "Poprzednie zbiórki:"
" donation will be spent on publishing\n"
" the book %(b)s if the full amount is raised by %(end)s.\n"
" The book will then be published by %(due)s."
-msgstr "Pieniądze przez Ciebie wpłacone zostaną przekazane napublikację książki %(b)s, jeśli do %(end)s uda nam się zebrać pełnąkwotę potrzebną na digitalizację, redakcję techniczną i literacką.Książka zostanie wówczas opublikowana do %(due)s."
-
-#: templates/funding/thanks.html:32
-msgid "Tell your friends!"
-msgstr "Powiedz swoim znajomym!"
+msgstr "Pieniądze przez Ciebie wpłacone zostaną przekazane na publikację książki %(b)s, jeśli do %(end)s uda nam się zebrać pełną kwotę potrzebną na digitalizację, redakcję techniczną i literacką. Książka zostanie wówczas opublikowana do %(due)s."
-#: templates/funding/thanks.html:34
+#: templates/funding/thanks.html:35
msgid "I support Wolne Lektury."
msgstr "Wspieram Wolne Lektury"
"the funds are spent on <a href=\"%(r)s\">other books waiting for\n"
"publication</a>. The same thing happens with any money remaining\n"
"from successful fundraisers."
-msgstr "Jeśli nie udało się zebrać pełnej kwoty potrzebnej do opublikowaniaksiążki, środki przekazujemy na redakcję <a href=\"%(r)s\">innych utworów oczekujących napublikację w serwisie</a>. Na ten celprzekazujemy również pozostałe środki ze zbiórek ukończonych sukcesem."
+msgstr "Jeśli nie udało się zebrać pełnej kwoty potrzebnej do opublikowania książki, środki przekazujemy na redakcję <a href=\"%(r)s\">innych utworów oczekujących na publikację w serwisie</a>. Na ten cel przekazujemy również nadmiarowe środki ze zbiórek ukończonych sukcesem."
-#: templates/funding/wlfund.html:16
+#: templates/funding/wlfund.html:19
msgid "Spending these remaining funds is recorded in this table."
msgstr "W poniższej tabeli rejetrujemy wydatkowanie tych środków."
-#: templates/funding/wlfund.html:23
+#: templates/funding/wlfund.html:26
msgid "Date"
msgstr "Data"
-#: templates/funding/wlfund.html:24
+#: templates/funding/wlfund.html:27
msgid "Title"
msgstr "Tytuł"
-#: templates/funding/wlfund.html:26
+#: templates/funding/wlfund.html:29
msgid "Balance"
msgstr "Bilans"
-#: templates/funding/wlfund.html:33
+#: templates/funding/wlfund.html:36
msgid "Money spent on publishing the book"
msgstr "Pieniądze przeznaczone na opublikowanie książki"
-#: templates/funding/wlfund.html:42
+#: templates/funding/wlfund.html:45
msgid "Money remaining from the fundraiser for"
msgstr "Pieniądze pozostałe ze zbiórki na"
msgid "Support a book!"
msgstr "Wesprzyj kolejną publikację!"
-#: templates/funding/tags/funding.html:21
+#: templates/funding/tags/funding.html:20
msgid "collected"
msgstr "zebrane"
-#: templates/funding/tags/funding.html:24
+#: templates/funding/tags/funding.html:23
msgid "missing"
msgstr "brakuje"
-#: templates/funding/tags/funding.html:27
+#: templates/funding/tags/funding.html:26
msgid "until fundraiser end"
msgstr "do końca zbiórki"
except IndexError:
return None
+ @classmethod
+ def past(cls):
+ """ QuerySet for all current and past fundraisers. """
+ today = date.today()
+ return cls.objects.filter(end__lt=today)
+
@classmethod
def public(cls):
""" QuerySet for all current and past fundraisers. """
today = date.today()
- return cls.objects.filter(start__lte=today)
+ return cls.objects.filter(start__lte=today)
def get_perks(self, amount=None):
""" Finds all the perks for the offer.
getpaid.signals.new_payment_query.connect(new_payment_query_listener)
+def user_data_query_listener(sender, order, user_data, **kwargs):
+ """ Set user data for payment. """
+ user_data['email'] = order.email
+getpaid.signals.user_data_query.connect(user_data_query_listener)
+
def payment_status_changed_listener(sender, instance, old_status, new_status, **kwargs):
""" React to status changes from getpaid. """
if old_status != 'paid' and new_status == 'paid':
-.funding{background:orange}.funding a.call{font-size:1.5em;height:1.2em;width:13em;position:relative;padding:.35em .5em;margin:.5em;display:inline-block;vertical-align:top;box-shadow:.2em .2em .3em #888;text-align:center;background:#fff;color:#4E56C8}.funding a.call:hover{box-shadow:none;top:.1em;left:.1em}.funding .description{display:inline-block;padding-left:.6em}.funding strong{font-size:1.5em;padding:.2em .2em 0;display:block}.funding strong a{color:#000}.funding .progress{width:95.7em;margin:.1em .3em .4em;border-radius:2em;background-image:url(/static/img/progress-pixel.png);background-repeat:repeat-y;background-color:rgba(236, 109, 0, .5);box-shadow:.1em .1em .1em #888}.funding .progress .piece{font-size:1.3em;padding:.3em .5em}.funding .with-button .progress{width:73em}.wlfund{width:100%;border-collapse:collapse}.wlfund td{padding:0 0 1em 0;text-align:center}.wlfund td:last-child{text-align:right}.wlfund td div{padding:1em;box-shadow:0 2px 0 #DDD}.wlfund .funding-plus td div{background:rgba(13, 126, 133, .2)}.wlfund .funding-minus td div{background:#fff}button.honking{background:#018189;font-size:1.5em;padding:.5em;color:#fff;border:0;box-shadow:.2em .2em .3em #888;position:relative}button.honking:hover{box-shadow:none;top:.1em;left:.1em}
\ No newline at end of file
+.funding{background:orange}.funding a.call{height:1.2em;width:13em;padding:.35em .5em;margin:.5em;display:inline-block;vertical-align:top;text-align:center;background:rgb(.465%, 59.936%, 63.653%)}.funding .description{display:inline-block;padding-left:.6em}.funding .description a{display:block;color:#000}.funding strong{font-size:1.5em;padding:.2em .2em 0;display:block}.funding .progress{width:95.7em;margin:.1em .3em .4em;border-radius:2em;background-image:url(/static/img/progress-pixel.png);background-repeat:repeat-y;background-color:rgba(236, 109, 0, .5);box-shadow:.1em .1em .1em #888}.funding .progress .piece{font-size:1.3em;padding:.3em .5em}.funding .with-button .progress{width:73em}.wlfund{width:100%;border-collapse:collapse}.wlfund td{padding:0 0 1em 0;text-align:center}.wlfund td:last-child{text-align:right}.wlfund td div{padding:1em;box-shadow:0 2px 0 #DDD}.wlfund .funding-plus td div{background:rgba(13, 126, 133, .2)}.wlfund .funding-minus td div{background:#fff}.honking{background:#018189;font-size:1.5em;padding:.5em;color:#fff;border:0;box-shadow:.2em .2em .3em #888;position:relative}.honking:hover{box-shadow:none;top:.1em;left:.1em}.share a{margin-right:1.5em}.share a img{vertical-align:middle}
\ No newline at end of file
background: orange;
a.call {
- font-size: 1.5em;
height: 1.2em;
width: 13em;
- position: relative;
padding: .35em .5em;
margin: .5em;
display: inline-block;
vertical-align: top;
- box-shadow: 0.2em 0.2em 0.3em #888888;
text-align: center;
- background: white;
- color: #4E56C8;
- }
- a.call:hover {
- box-shadow: none;
- top: .1em;
- left: .1em;
+
+ background: lighten(#018189, .05);
}
.description {
display: inline-block;
padding-left: .6em;
+ a {
+ display: block;
+ color: black;
+ }
}
strong {
font-size: 1.5em;
padding: .2em .2em 0;
display: block;
- a {
- color: black;
- }
}
.progress {
.piece {
-button.honking {
+.honking {
background: #018189;
font-size: 1.5em;
padding: .5em;
box-shadow: 0.2em 0.2em 0.3em #888888;
position: relative;
}
-button.honking:hover {
+.honking:hover {
box-shadow: none;
top: .1em;
left: .1em;
-
+}
+
+
+
+.share {
+ a {
+ margin-right: 1.5em;
+
+ img {
+ vertical-align: middle;
+ }
+ }
}
{% load i18n %}
{% load funding_tags %}
{% load pagination_tags %}
+{% load fnp_share %}
{% block titleextra %}{{ object }}{% endblock %}
+{% block metadescription %}Wesprzyj kolejną publikację Wolnych Lektur!{% endblock %}
+
{% block body %}
{% funding object %}
<div class="white-box">
+ <div class="normal-text">
{% offer_status object %}
{% offer_status_more object %}
+ <p><a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
+ </div>
+
{% if object.is_current %}
<div class="normal-text">
{% csrf_token %}
<table>
{{ form.as_table }}
- <tr><td></td><td><button class="honking" type="submit">{% trans "Donate!" %}</button></td></tr>
+ <tr><td></td><td>
+ <button type="submit" style="border: none; background: none; cursor: pointer">
+ <img alt="{% trans 'Donate!' %}" src="http://static.payu.com/pl/standard/partners/buttons/payu_account_button_01.png" />
+ </button>
+ </td></tr>
</table>
</form>
</div>
+
+ {% url 'funding_current' object.slug as current %}
+ <p class="normal-text">{% trans "Tell your friends!" %}</p>
+ <p class="share">{% share current _("Support Wolne Lektury!") "big" %}</p>
{% endif %}
<p class="normal-text"><a href="{% url 'funding' %}">{% trans "See all fundraisers." %}</a></p>
<h2>{% trans "Previous fundraisers:" %}</h2>
{% endif %}
- <div class="normal-text">
+ <div class="white-box normal-text">
{% offer_status offer %}
</div>
{% offer_status_more offer %}
</div>
- </div>
{% if is_current and not forloop.is_last %}
<h2>{% trans "Previous fundraisers:" %}</h2>
{% endif %}
{% spaceless %}
<div class="funding" style="">
{% if link and is_current %}
- <a class="call" href="{{ offer.get_absolute_url }}">
+ <a class="call honking" href="{% url 'funding_current' offer.slug %}">
{% trans "Support a book!" %}</a>
{% endif %}
<div class="description {% if link and is_current %}with-button{% endif %}"
style="display: inline-block;">
+ {% if link %}<a href="{% if is_current %}{% url 'funding_current' offer.slug %}{% else %}{{ offer.get_absolute_url }}{% endif %}">{% endif %}
<strong>
- {% if link %}<a href="{{ offer.get_absolute_url }}">{% endif %}
{{ offer }}
- {% if link %}</a>{% endif %}
</strong>
<div class="progress"
style="text-align: center; background-size: {{ percentage|stringformat:'.2f' }}% 1px;"
>
{% if sum %}
- <span class="piece" style="float:left">{% trans "collected" %}: <em>{{ sum }} </em></span>
+ <span class="piece" style="float:left">{% trans "collected" %}: <em>{{ sum }} zł</em></span>
{% endif %}
{% if not is_win %}
<span class="piece" style="float: right">{% trans "missing" %}: <em>{{ missing }} zł</em></span>
<div style="clear: both"></div>
</div>
+ {% if link %}</a>{% endif %}
</div>
</div>
{% endspaceless %}
{% if offer.is_current %}
{% if offer.is_win %}
- <p class="normal-text">
+ <p>
{% blocktrans with due=offer.due end=offer.end %}The fundraiser
ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %}
</p>
{% else %}
- <p class="normal-text">
+ <p>
{% blocktrans with due=offer.due end=offer.end %}If the target is met
by {{ end }}, this book will be published by {{ due }}.{% endblocktrans %}
</p>
{% endif %}
{% else %}
{% if offer.is_win %}
- <p class="normal-text">
+ <p>
{% trans "Full amount was successfully raised!" %}
</p>
{% else %}
- <p class="normal-text">
+ <p>
{% trans "The amount needed was not raised." %}
</p>
{% endif %}
{% load i18n %}
{% if offer.is_current %}
- <p class="normal-text">
+ <p>
{% include "funding/snippets/any_remaining.html" %}
</p>
{% else %}
- <p class="date normal-text">{{ offer.start }} – {{ offer.end }}</p>
+ <p class="date">{{ offer.start }} – {{ offer.end }}</p>
{% if offer.is_win %}
- <p class="normal-text">
+ <p>
{% if offer.book %}
{% blocktrans with bu=offer.book.get_absolute_url bt=offer.book %}The book
<a href="{{ bu }}">{{ bt }}</a> has been already published.{% endblocktrans %}
{% endif %}
{% if offer.remaining %}
- <p class="normal-text">{% include "funding/snippets/any_remaining.html" %}</p>
+ <p>{% include "funding/snippets/any_remaining.html" %}</p>
{% endif %}
{% endif %}
<p>{% blocktrans with due=offer.due end=offer.end %}The fundraiser
ends on {{ end }}. The book will be published by {{ due }}.{% endblocktrans %}</p>
{% else %}
- <p>{% blocktrans with b=object.title due=offer.due end=offer.end %}Your
+ <p>{% blocktrans with b=offer.title due=offer.due end=offer.end %}Your
donation will be spent on publishing
the book {{ b }} if the full amount is raised by {{ end }}.
The book will then be published by {{ due }}.{% endblocktrans %}</p>
{% endif %}
-<p>{% include "funding/snippets/any_remaining.html" %}</p>
+<p>{% include "funding/snippets/any_remaining.html" %}
-{% url 'funding_current' as current %}
+<a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
+
+{% url 'funding_current' offer.slug as current %}
<p><a href="{{ current }}">{% trans "Go back to the current fundraiser." %}</a></p>
<p>{% trans "Tell your friends!" %}</p>
-
-<p>{% share current _("I support Wolne Lektury.") %}</p>
+<p class="share">{% share current _("I support Wolne Lektury.") "big" %}</p>
</div>
the full amount needed for publishing a book is not raised in time,
the funds are spent on <a href="{{r}}">other books waiting for
publication</a>. The same thing happens with any money remaining
-from successful fundraisers.{% endblocktrans %}</p>
+from successful fundraisers.{% endblocktrans %}
+
+<a href="{% url 'infopage' 'wesprzyj' %}">{% trans "Learn more" %}</a>.</p>
+
<p>{% trans "Spending these remaining funds is recorded in this table." %}</p>
</div>
{% if tag == 'spent' %}
<tr class="funding-minus">
<td><div>{{ entry.timestamp }}</div></td>
- <td>{% trans "Money spent on publishing the book" %}:
+ <td><div>{% trans "Money spent on publishing the book" %}:
<a href="{{ entry.book.get_absolute_url }}">
- {{ entry.book }}</a></td>
+ {{ entry.book }}</a></div></td>
<td><div>-{{ entry.amount }} zł</div></td>
<td><div>{{ entry.total }} zł</div></td>
</tr>
{% else %}
<tr class="funding-plus">
<td><div>{{ entry.end }}</div></td>
- <td>{% trans "Money remaining from the fundraiser for" %}:
+ <td><div>{% trans "Money remaining from the fundraiser for" %}:
<a href="{{ entry.get_absolute_url }}">
- {{ entry }}</a></td>
+ {{ entry }}</a></div></td>
<td><div>{{ entry.total }} zł</div></td>
<td><div>+{{ entry.wlfund }} zł</div></td>
</tr>
'offer': offer,
'sum': offer_sum,
'is_current': offer.is_current(),
+ 'is_win': offer_sum >= offer.target,
'missing': offer.target - offer_sum,
'percentage': 100 * offer_sum / offer.target,
'link': link,
from .models import Offer
from .views import (WLFundView, OfferDetailView, OfferListView,
- ThanksView, NoThanksView)
+ ThanksView, NoThanksView, CurrentView)
urlpatterns = patterns('',
- url(r'^$', OfferDetailView.as_view(), name='funding_current'),
+
+ url(r'^$', CurrentView.as_view(), name='funding_current'),
+ url(r'^teraz/(?P<slug>[^/]+)/$', CurrentView.as_view(), name='funding_current'),
url(r'^lektura/$', OfferListView.as_view(), name='funding'),
url(r'^lektura/(?P<slug>[^/]+)/$', OfferDetailView.as_view(), name='funding_offer'),
url(r'^fundusz/$', WLFundView.as_view(), name='funding_wlfund'),
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
+from datetime import date
from django.views.decorators.cache import never_cache
from django.conf import settings
from django.core.urlresolvers import reverse
ctx = super(WLFundView, self).get_context_data()
offers = []
- for o in Offer.objects.all():
- if o.state() == 'lose':
- o.wlfund = o.sum()
+
+ for o in Offer.past():
+ if o.is_win():
+ o.wlfund = o.sum() - o.target
if o.wlfund > 0:
offers.append(o)
- elif o.state() == 'win':
- o.wlfund = o.sum() - o.target
+ else:
+ o.wlfund = o.sum()
if o.wlfund > 0:
offers.append(o)
amount = sum(o.wlfund for o in offers) - sum(o.amount for o in Spent.objects.all())
backend = 'getpaid.backends.payu'
def dispatch(self, request, slug=None):
- if slug:
- self.object = get_object_or_404(Offer.public(), slug=slug)
- else:
- self.object = Offer.current()
- if self.object is None:
- raise Http404
+ if getattr(self, 'object', None) is None:
+ if slug:
+ self.object = get_object_or_404(Offer.public(), slug=slug)
+ else:
+ self.object = Offer.current()
+ if self.object is None:
+ raise Http404
return super(OfferDetailView, self).dispatch(request, slug)
def get_form(self, form_class):
funding = form.save()
# Skip getpaid.forms.PaymentMethodForm, go directly to the broker.
payment = Payment.create(funding, self.backend)
- gateway_url = payment.get_processor()(payment).get_gateway_url(self.request)
+ gateway_url_tuple = payment.get_processor()(payment).get_gateway_url(self.request)
payment.change_status('in_progress')
- return redirect(gateway_url)
+ return redirect(gateway_url_tuple[0])
+
+
+class CurrentView(OfferDetailView):
+ def dispatch(self, request, slug=None):
+ self.object = Offer.current()
+ if self.object is None:
+ raise Http404
+ elif slug != self.object.slug:
+ return redirect(reverse('funding_current', args=[self.object.slug]))
+ return super(CurrentView, self).dispatch(request, slug)
class OfferListView(ListView):
egenix-mx-base
sunburnt
-django-getpaid
+django-getpaid>=1.4,<1.5
--- /dev/null
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Payment.external_id'
+ db.add_column(u'getpaid_payment', 'external_id',
+ self.gf('django.db.models.fields.CharField')(max_length=64, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Payment.description'
+ db.add_column(u'getpaid_payment', 'description',
+ self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Payment.external_id'
+ db.delete_column(u'getpaid_payment', 'external_id')
+
+ # Deleting field 'Payment.description'
+ db.delete_column(u'getpaid_payment', 'description')
+
+
+ models = {
+ 'catalogue.book': {
+ 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
+ '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
+ 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
+ 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
+ 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
+ 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
+ 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
+ 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
+ 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
+ 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
+ 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
+ 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
+ },
+ u'funding.funding': {
+ 'Meta': {'ordering': "['-payed_at']", 'object_name': 'Funding'},
+ 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '127', 'blank': 'True'}),
+ 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']"}),
+ 'payed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'perks': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['funding.Perk']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ u'funding.offer': {
+ 'Meta': {'ordering': "['-end']", 'object_name': 'Offer'},
+ 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']", 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'due': ('django.db.models.fields.DateField', [], {}),
+ 'end': ('django.db.models.fields.DateField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'redakcja_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
+ 'start': ('django.db.models.fields.DateField', [], {}),
+ 'target': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'funding.perk': {
+ 'Meta': {'ordering': "['-price']", 'object_name': 'Perk'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'end_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'offer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['funding.Offer']", 'null': 'True', 'blank': 'True'}),
+ 'price': ('django.db.models.fields.DecimalField', [], {'max_digits': '10', 'decimal_places': '2'})
+ },
+ u'getpaid.payment': {
+ 'Meta': {'ordering': "('-created_on',)", 'object_name': 'Payment'},
+ 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '20', 'decimal_places': '4'}),
+ 'amount_paid': ('django.db.models.fields.DecimalField', [], {'default': '0', 'max_digits': '20', 'decimal_places': '4'}),
+ 'backend': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'created_on': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'currency': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
+ 'external_id': ('django.db.models.fields.CharField', [], {'max_length': '64', 'null': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'payment'", 'to': u"orm['funding.Funding']"}),
+ 'paid_on': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "'new'", 'max_length': '20', 'db_index': 'True'})
+ }
+ }
+
+ complete_apps = ['getpaid']
\ No newline at end of file
]
GETPAID_BACKENDS = (
- 'getpaid.backends.dummy',
'getpaid.backends.payu',
)
#'django_nose',
'fnpdjango',
'getpaid',
- 'getpaid.backends.dummy',
'getpaid.backends.payu',
#allauth stuff