8👍
✅
Because it thinks that you’re referring to the groups.py
in the same directory. Enable absolute imports.
3👍
I hade the same problem. The solution was as simple as
from __future__ import absolute_import
- [Django]-Django: How do you access a model's instance from inside a manager?
- [Django]-Django-CMS AppHooks with conflicting urls?
- [Django]-How to throw custom exception with custom error code on fly in django rest framework and override default fields in exception response
- [Django]-How to Show and hide form fields based on a selection from a dropdown menu in Django
- [Django]-Django FileField not saving to upload_to location
0👍
Just a guess, but does your models.py file import groups or decorators? If so, you have a circular dependency. You’ll need to move the imports in one of the files into the function level.
- [Django]-Simple API's to play around with for Python/Django?
- [Django]-Django-Oscar with AWS S3 save images correctly
- [Django]-How to get the filename and line number of a Django template error when calling render()?
- [Django]-Saving post from tweepy to django model in a good way
- [Django]-Configuration for setting up nginx with django and nodejs for websocket (wss://)
Source:stackexchange.com