Django 1.5 custom user demo and fix #217

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

woutor commented Mar 10, 2013

I've added a custom user model to the demo project and added the compatibility fix to zinnia

@Fantomas42 Fantomas42 closed this Apr 1, 2013
Owner

Thanks for the useful work provided.

@Fantomas42 I think this needs to be re-opened or a similar ticket created. I have found a few template references to 'auth_user' that need to be corrected.

Here are the scenarios:

  1. When the 'Zinnia' category/dashboard is viewed in the admin. The following produces a NoReverseMatch error.
    <a href="{% url 'admin:auth_user_changelist' %}"> in _content_stats.html, ln 36
  2. When an Author's entries are listed on the site using Zinia. The following produces a NoReverseMatch error.
    <a href="{% url 'admin:auth_user_change' author.pk %}" title="{% trans "Edit the author" %}"> in entry_list.html, ln 84

This can be reproduced by adding a custom user object, like the one @woutor uses above and walking through the scenarios.

What I have tried:

  1. (Fail) Making it reproducible with an automated test: Since this is an issue that only occurs in the template when it is used in the target site I am not sure how to reproduce it without that. I think if the demo site had tests I might be able to write some there using the custom user patch above.
  2. (Mixed) I was able to get Zinnia working with my own app by replacing 'auth_user' with 'myapp_myuser' but obviously that wouldn't be suitably generic.
  3. (Fail) Building off 2. I tried replacing 'auth_user' with 'zinnia_author' with no luck.
  4. Double checking django docs. They only seem to confirm 2. but don't talk about what to put if you are writing a re-usable app. https://docs.djangoproject.com/en/dev/ref/contrib/admin/#reversing-admin-urls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment