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

Unresloved toggle-subscription url #139

Closed
Radi85 opened this issue Jan 4, 2021 · 2 comments · Fixed by #141
Closed

Unresloved toggle-subscription url #139

Radi85 opened this issue Jan 4, 2021 · 2 comments · Fixed by #141
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Radi85
Copy link
Owner

Radi85 commented Jan 4, 2021

Environment

  • django-comments-dab: 2.6b1

Describe the bug

Runtime error: django cannot relove toggle-subscription url.

Steps To Reproduce

  1. Install the app version 2.6b1
  2. Add settings var COMMENT_ALLOW_SUBSCRIPTION = True
  3. Run the app.

Expected behavior

The error should not be raised and the url should be resolved.

Fix suggestion

Prepend the follow url name in the templates with the app_name. This should be done for all url 'toggle-subscription' occurrences

E.g.

{% url 'comment:toggle-subscription' as follow_url %}
{# url 'toggle-subscription' as follow_url #}
@Radi85 Radi85 added the bug Something isn't working label Jan 4, 2021
@Radi85 Radi85 added this to the 2.6.0 milestone Jan 4, 2021
@abhiabhi94
Copy link
Collaborator

If I remember correctly, this sort of thing has happened before as well. To prevent this from happening in the future,

I think we can probably add the application django-extensions to INSTALLED_APPS inside the settings for the testapp and add the command python manage.py validate_templates to tox.

@abhiabhi94
Copy link
Collaborator

I tried doing this, and it fails to detect the invalid URL pattern because it only checks for valid django syntax.

@Radi85 Radi85 self-assigned this Jan 5, 2021
Radi85 added a commit that referenced this issue Jan 5, 2021
Radi85 added a commit that referenced this issue Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants