summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/views.py22
-rw-r--r--app/utils/util.py8
2 files changed, 18 insertions, 12 deletions
diff --git a/app/src/views.py b/app/src/views.py
index 20188fd..fd334f8 100644
--- a/app/src/views.py
+++ b/app/src/views.py
@@ -4,7 +4,7 @@ from django.contrib.syndication.views import Feed
from django.urls import reverse
from django.conf import settings
-from paypal.standard.forms import PayPalPaymentsForm
+#from paypal.standard.forms import PayPalPaymentsForm
from .models import Post, Topic, Book
@@ -31,16 +31,16 @@ class BookDetailView(DetailView):
price = book.price_sale
else:
price = book.price
- paypal_dict = {
- "business": settings.PAYPAL_RECEIVER_EMAIL,
- "amount": price,
- "item_name": book.title,
- "invoice": "unique-invoice-id",
- "notify_url": "https://luxagraf.net/src/paypal/" + reverse('src:paypal-ipn'),
- "return_url": "https://luxagraf.net/src/thank-you",
- "cancel_return": "https://luxagraf.net/src/books/",
- }
- context['paypal_form'] = PayPalPaymentsForm(initial=paypal_dict)
+ #paypal_dict = {
+ # "business": settings.PAYPAL_RECEIVER_EMAIL,
+ # "amount": price,
+ # "item_name": book.title,
+ # "invoice": "unique-invoice-id",
+ # "notify_url": "https://luxagraf.net/src/paypal/" + reverse('src:paypal-ipn'),
+ # "return_url": "https://luxagraf.net/src/thank-you",
+ # "cancel_return": "https://luxagraf.net/src/books/",
+ #}
+ #context['paypal_form'] = PayPalPaymentsForm(initial=paypal_dict)
return context
diff --git a/app/utils/util.py b/app/utils/util.py
index 1ceb699..6678fc9 100644
--- a/app/utils/util.py
+++ b/app/utils/util.py
@@ -11,11 +11,17 @@ def markdown_to_html(txt):
md = markdown.Markdown(
extensions=[
'markdown.extensions.fenced_code',
- 'markdown.extensions.codehilite(css_class=highlight,linenums=False)',
+ 'markdown.extensions.codehilite',
'markdown.extensions.attr_list',
'footnotes',
'extra'
],
+ extension_configs = {
+ 'markdown.extensions.codehilite': {
+ 'css_class': 'highlight',
+ 'linenums': False
+ },
+ },
output_format='html5',
safe_mode=False
)