Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Django Authentication Authentication Requiring Logins

ImportError at / No module named 'django.contrib.auth.mixins' ImportError: No module named 'braces'

How do I fix this error?

following this, i also installed django 1.9, but I stil lhave the "no module named 'braces'" error http://stackoverflow.com/questions/42699356/django-website-gives-an-importerror-for-mixins

ImportError at /
No module named 'django.contrib.auth.mixins'
Request Method: GET
Request URL:
Django Version: 1.8.13
Exception Type: ImportError
Exception Value:    
No module named 'django.contrib.auth.mixins'
Exception Location: C:\Users\AJ\Google Drive\Django\django_auth1\posts\views.py in <module>, line 2
Python Executable:  C:\Anaconda3\python.exe
Python Version: 3.5.2
Python Path:    
['C:\\Users\\AJ\\Google Drive\\Django\\django_auth1',
Server time:    Wed, 29 Mar 2017 16:18:43 +0000
Traceback Switch to copy-and-paste view

C:\Anaconda3\lib\site-packages\django\core\handlers\base.py in get_response
                            resolver_match = resolver.resolve(request.path_info) ...
▶ Local vars
C:\Anaconda3\lib\site-packages\django\core\urlresolvers.py in resolve
                        for pattern in self.url_patterns: ...
▶ Local vars
C:\Anaconda3\lib\site-packages\django\core\urlresolvers.py in url_patterns
                    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) ...
▶ Local vars
C:\Anaconda3\lib\site-packages\django\core\urlresolvers.py in urlconf_module
                        self._urlconf_module = import_module(self.urlconf_name) ...
▶ Local vars
C:\Anaconda3\lib\importlib\__init__.py in import_module
                return _bootstrap._gcd_import(name[level:], package, level) ...
▶ Local vars
C:\Users\AJ\Google Drive\Django\django_auth1\msg\urls.py in <module>
                url(r"^posts/", include("posts.urls", namespace="posts")), ...
▶ Local vars

1 Answer