gbozee / pypaystack

A django reusable app for integrating Paystack into your application
MIT License
51 stars 39 forks source link

ModuleNotFoundError: No module named 'paystack.urls' #16

Closed oluwakayode-a closed 4 years ago

oluwakayode-a commented 4 years ago

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.

gbozee commented 4 years ago

Hello. Did you take a look at the example project to see how it works?.

gbozee commented 4 years ago

Also paste your settings.py as well as your urls.py so that it would be easy to debug what the problem is.

oluwakayode-a commented 4 years ago

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'))),

]

gbozee commented 4 years ago

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

oluwakayode-a commented 4 years ago

Alright. Thanks a lot. It's running now, but the templatetags are not working.

oluwakayode-a commented 4 years ago

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

oluwakayode-a commented 4 years ago

I have fixed the templatetags issue by adding the following to my settings.py under OPTIONS

'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', },

thembari commented 3 years ago

Since it is a dictionary within a dictionary, I pasted it like this: {'libraries': { 'paystack': 'paystack.frameworks.django.templatetags.paystack', }, }

blessedmadukoma commented 3 years ago

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

Mgregchi commented 2 years ago

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 }, }, ]

GeeeTech95 commented 2 years ago

i am still getting the module not found errror for urls

aayobam commented 2 years ago

i'm not sure this package is still been managed because the error still remains the same ModuleNotFoundError: No module named 'paystack.frameworks'

ghost commented 2 years ago

why can't you solve this error in django version 4