Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed A Sign-up Form Within Any Page problem #380

Open
EchChou opened this issue Jan 11, 2022 · 1 comment
Open

Embed A Sign-up Form Within Any Page problem #380

EchChou opened this issue Jan 11, 2022 · 1 comment

Comments

@EchChou
Copy link

EchChou commented Jan 11, 2022

Hello,
I am trying to use the newsletter form in my index view. I included the form balize to my template as recommended in the readthedocs of the django-newsletter package:

{% csrf_token %} E-mail: Subscribe

I replaced the [NAME-OF-NEWSLETTER] with a newsletter name that I have added from the admin page.

but I got the next error:

Page not found (404)
No Newsletter matches the given query.
Request Method: POST
Request URL: http://127.0.0.1:8000/newsletter/welcomeback/subscribe/
Raised by: newsletter.views.SubscribeRequestView

Using the URLconf defined in website.urls, Django tried these URL patterns, in this order:

admin/
newsletter/ ^$ [name='newsletter_list']
newsletter/ ^(?P<newsletter_slug>[\w-]+)/$ [name='newsletter_detail']
newsletter/ ^(?P<newsletter_slug>[\w-]+)/subscribe/$ [name='newsletter_subscribe_request']
The current path, newsletter/welcomeback/subscribe/, matched the last one.

Can you please include an example of how to use newsletter forms ?

@ekerstein
Copy link

Did you confirm that "welcomeback" is the same slug from the admin page when you added the newsletter? Not "welcome-back"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants