Closed oluwakayode-a closed 4 years ago
Hello. Did you take a look at the example project to see how it works?.
Also paste your settings.py as well as your urls.py so that it would be easy to debug what the problem is.
settings.py installed apps.
INSTALLED_APPS = [ 'jet', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'blog', 'dashboard', 'subscribe', 'ckeditor', 'ckeditor_uploader', 'bootstrap4', 'taggit', 'django_social_share', 'multiselectfield', 'webpush', 'cms', 'menus', 'treebeard', 'django_check_seo', 'premium_subscribers',
'allauth',
'allauth.account',
'allauth.socialaccount',
'paystack',
]
urls.py urlpatterns = [ path('admin/', admin.site.urls), path('cms/', include('cms.urls')), path('django_check_seo/', include('django_check_seo.urls')), path('jet', include('jet.urls')), path('', include(('blog.urls', 'blog'))), path('ckeditor/upload/', login_required(ckeditor_views.upload), name="ckeditor_upload"), path('ckeditor/browse/', never_cache(login_required(ckeditor_views.browse)), name='ckeditor_browse'), path('webpush/', include('webpush.urls')), path('accounts/', include('allauth.urls')),
#paystack here.
path("paystack/", include(('paystack.urls','paystack'))),
]
The docs hasn't been updated yet. your settings.py
should be updated to this
"paystack.frameworks.django",
instead of
paystack
If you plan on using the version you pasted, you would need to use this link instead
pip install -e git+https://github.com/gbozee/pypaystack.git@1.0.2#egg=paystack
Alright. Thanks a lot. It's running now, but the templatetags are not working.
I'm getting this error when I try to {% load paystack %}
TemplateSyntaxError at /user-dashboard/ 'paystack' is not a registered tag library. Must be one of: account admin_list admin_modify admin_tree admin_tree_list admin_urls auth_extras bootstrap4 cache cms_admin cms_alias_tags cms_js_tags
I have fixed the templatetags issue by adding the following to my settings.py under OPTIONS
'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', },
Since it is a dictionary within a dictionary, I pasted it like this: {'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', }, }
Since it is a dictionary within a dictionary, I pasted it like this: {'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', }, }
Please where did you paste it? And I still have the same issue
Since it is a dictionary within a dictionary, I pasted it like this: {'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', }, }
Please where did you paste it? And I still have the same issue
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ["templates"], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ],
#here
}, }, ]
i am still getting the module not found errror for urls
i'm not sure this package is still been managed because the error still remains the same ModuleNotFoundError: No module named 'paystack.frameworks'
why can't you solve this error in django version 4
Hello, I've followed the steps listed in the README, but, I can't seem to get it properly installed. I have tried the pip install way, and I have tried to install using the setup.py, but it does not work. I have also included it in my urls and settings file.
Any help would be appreciated.