How can I disable user management in Wagtail?

462 views
Skip to first unread message

Chad Saunders

unread,
Jun 9, 2015, 11:23:11 AM6/9/15
to wag...@googlegroups.com
I'd like to disable and hide the link to user management in the settings and let Django's admin take care of it.  What is the best way to do this?

Matthew Westcott

unread,
Jun 9, 2015, 12:23:09 PM6/9/15
to wag...@googlegroups.com
Hi Chad,
Removing 'wagtail.wagtailusers' from the INSTALLED_APPS list in your settings file should achieve that (and also remove the Groups menu, which may or may not be what you want...)

Cheers,
- Matt

Chad Saunders

unread,
Jun 9, 2015, 1:14:25 PM6/9/15
to wag...@googlegroups.com
Oh, simple enough.  Thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "Wagtail support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wagtail/hzjCE8WxsLc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wagtail+u...@googlegroups.com.
To post to this group, send an email to wag...@googlegroups.com.
Visit this group at http://groups.google.com/group/wagtail.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/98969897-7704-4173-8076-45E8A5F74BB7%40torchbox.com.
For more options, visit https://groups.google.com/d/optout.

Chad Saunders

unread,
Jul 13, 2015, 1:52:00 PM7/13/15
to wag...@googlegroups.com
I upgraded to the latest version of wagtail and to Django 1.8.  The problem I'm running into is that the User model I use doesn't have a "username" field. It uses the "email" field as the username field.  Wagtail doesn't seem to like this though.  I thought I had disabled Wagtail's user management by removing "wagtail.wagtailusers" from the INSTALLED_APPS.

Any ideas to get around this error?

[13/Jul/2015 12:33:26]"GET /admin HTTP/1.1" 500 59
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__
    return self.application(environ, start_response)
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/middleware/locale.py", line 24, in __init__
    for url_pattern in get_resolver(None).url_patterns:
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/core/urlresolvers.py", line 402, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/core/urlresolvers.py", line 396, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/chad/Development/rbi/rbi-com-saleor/server/saleor/urls.py", line 6, in <module>
    from wagtail.wagtailadmin import urls as wagtailadmin_urls
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/wagtail/wagtailadmin/urls.py", line 7, in <module>
    from wagtail.wagtailadmin.views import account, chooser, home, pages, tags, userbar, page_privacy
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/wagtail/wagtailadmin/views/account.py", line 12, in <module>
    from wagtail.wagtailusers.forms import NotificationPreferencesForm
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/wagtail/wagtailusers/forms.py", line 18, in <module>
    class UserCreationForm(BaseUserCreationForm):
  File "/Users/chad/.virtualenvs/rbi/lib/python2.7/site-packages/django/forms/models.py", line 295, in __new__
    raise FieldError(message)
FieldError: Unknown field(s) (username) specified for User

Matthew Westcott

unread,
Jul 13, 2015, 4:11:14 PM7/13/15
to wag...@googlegroups.com
Hi Chad,
When you say you're on the latest version of Wagtail, do you mean 0.8.8 or the 1.0 release candidate (1.0rc2)? Version 1.0 includes a fix for users without a username field <https://github.com/torchbox/wagtail/pull/1388>, so you may well have better luck with that one. (It's also the first version to officially support Django 1.8, so if you've already upgraded Django then upgrading to Wagtail 1.0rc2 now will probably save some trouble.)

(Looking at that traceback, it seems that the 'user account' link - in the bottom left of the admin interface - is still reliant on the wagtailusers module, so there isn't as clean a separation between modules as there should be. We ought to fix that...)

Cheers,
- Matt

Chad Saunders

unread,
Jul 13, 2015, 5:48:26 PM7/13/15
to wag...@googlegroups.com
Ok that worked.  I was on 1.0b2, not 1.0rc2.

But now when I got to Wagtail CMS in my browser, the main page is blank.  There's no HTML that is returned to the browser and there are no errors in the console either.  Any ideas there?
Reply all
Reply to author
Forward
0 new messages