TemplateSyntaxError at /en/payments/paypal/: 'billing_tags' is not a valid tag library: Template library billing_tags not found

95 views
Skip to first unread message

Kim Thoenen

unread,
Oct 12, 2013, 8:16:40 PM10/12/13
to django-...@googlegroups.com

Hello,


I tried to install the paypal module following this tutorial https://django-merchant.readthedocs.org/en/latest/offsite/paypal.html. But when I open the page, I get the following error:

TemplateSyntaxError at /en/payments/paypal/

'billing_tags' is not a valid tag library: Template library billing_tags not found, tried django.templatetags.billing_tags,django.contrib.staticfiles.templatetags.billing_tags,admin_shortcuts.templatetags.billing_tags,django.contrib.admin.templatetags.billing_tags,cmsplugin_filer_video.templatetags.billing_tags,compressor.templatetags.billing_tags,easy_thumbnails.templatetags.billing_tags,standard_form.templatetags.billing_tags,cms.templatetags.billing_tags,cms.stacks.templatetags.billing_tags,mptt.templatetags.billing_tags,menus.templatetags.billing_tags,sekizai.templatetags.billing_tags,filer.templatetags.billing_tags,contactform.templatetags.billing_tags,siteinfo.templatetags.billing_tags,core.templatetags.billing_tags,billing.templatetags.billing_tags

my files:

models.py
from billing import get_integration
from django.shortcuts import render_to_response
from django.template import RequestContext

def pay_paypal(request):
    pay_pal = get_integration("pay_pal")

    # TODO: get fields from models
    pay_pal.add_fields({
        "business": "paypa...@somedomain.com",
        "item_name": "Test Item",
        "invoice": "UID",
        "notify_url": "http://example.com/paypal-ipn-handler/",
        "return_url": "http://example.com/paypal/",
        "cancel_return": "http://example.com/paypal/unsuccessful/",
        "amount": 100
    })

    return render_to_response("paypal.html", {"obj": pay_pal}, context_instance=RequestContext(request))


urls.py
from django.conf.urls import patterns, url
from billing import get_integration

import views

pay_pal = get_integration("pay_pal")

urlpatterns = patterns('',
    url(r'^paypal/', views.pay_paypal),
    #url(r'^paypal-ipn-handler/', include(pay_pal.urls)),
)

templates/paypal.html
{% extends "sidebar_left.html" %}
{% load i18n cms_tags %}
{% load render_integration from billing_tags %}
{% block body_class %}tpl-fullwidth{% endblock %}

{% block content %}
<div class="container-24 clearfix">
<div class="grid-24">
{% block content_primary %}{% with 940 as width %}
{% render_integration obj %}
{% endwith %}{% endblock content_primary %}
</div>
</div>
{% endblock content %}


also, if I uncomment the line "url(r'^paypal-ipn-handler/', include(pay_pal.urls)),", I get the following error:

NameError at /en/payments/paypal/

name 'include' is not defined

Thanks a lot in advance for your help!

Best

Kim

Thejaswi Puthraya

unread,
Oct 13, 2013, 2:33:44 AM10/13/13
to django-...@googlegroups.com
Hello Kim,
I unsuccessfully tried to reproduce the error with the details you provided.

Can you confirm the if you have added the following apps in the
INSTALLED_APPS of your settings?
* billing
* paypal.standard.pdt
You will need to import 'include' from the urls package.

from django.conf.urls import patterns, include, url

>
> Thanks a lot in advance for your help!
>
> Best
>
> Kim
>
> --
> You received this message because you are subscribed to the Google Groups
> "django-merchant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-mercha...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


--
Cheers
Thejaswi Puthraya
http://thejaswi.info/

Kim Thoenen

unread,
Oct 13, 2013, 7:59:50 AM10/13/13
to django-...@googlegroups.com
Hey,

The second issue (NameError at /en/payments/paypal/: name 'include' is not defined) has been solved - thanks.

The other one still exists though: I have both of these modules installed and in my INSTALLED_APPS. Still the same...

Best,
Kim

Kim Thoenen

unread,
Oct 13, 2013, 9:03:31 AM10/13/13
to django-...@googlegroups.com
Alright I got it to work now, previously I installed the package from pypi which was obviously pretty updated, but now I've used the latest version from github and it works. Thanks!


Am Sonntag, 13. Oktober 2013 02:16:40 UTC+2 schrieb Kim Thoenen:

Shabda Raaj

unread,
Oct 14, 2013, 1:33:41 AM10/14/13
to django-...@googlegroups.com, Javed Khan
I think we should update merchant on pypi soon. Last version on pypi is Feb. 28, 2013.


--
You received this message because you are subscribed to the Google Groups "django-merchant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-mercha...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Thanks,
Shabda

Agiliq.com - Building Amazing Apps
US: +13152854388 | IN: +919949997612 | Skype: shabda.raaj
Our Android Apps | Our iOS Apps


Reply all
Reply to author
Forward
0 new messages