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
Intermittent "circular import" when starting Django app #71
Comments
One idea I had was that the <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %}
{% load django_simple_bulma %}
{% bulma %}
<link rel="shortcut icon" href="{% static 'favicon.ico' %}"/>
<title>{% block title %}{% endblock %}</title>
</head>
<body> ...would trigger the loading of the I thus tried rearranging my apps like this: diff --git centraln/settings.py centraln/settings.py
index d94ee61..710e438 100644
--- centraln/settings.py
+++ centraln/settings.py
@@ -33,8 +33,6 @@ ALLOWED_HOSTS = ['127.0.0.1']
# Application definition
INSTALLED_APPS = [
- 'index',
- 'hibox_db',
'simple_history',
'django_simple_bulma',
'django.contrib.admin',
@@ -43,6 +41,9 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+
+ 'index',
+ 'hibox_db',
]
MIDDLEWARE = [ ...but unfortunately it still didn't work. I'm still seeing this problem intermittently. 😢 For reference, our |
I'm not sure exactly why this is happening, but I suspect something to do with Here's the load order we've been using on pages like https://pythondiscord.org for years now without incident: INSTALLED_APPS = [
'index', # put all your own local apps at the start here.
'django.contrib.admin', # all the built-in django stuff here.
'django-simple-bulma', # Third party django apps go in the end.
] Can you try this and report back if it still happens? |
Thanks. 👍 🙇 I tried this now and re-ran (The important part of the change: moving |
Great to hear! I'll close this issue for now then, but feel free to re-open it if you have any more issues! |
Tack så mycket, jag gör så. 😊👍🏻 |
Hmm, maybe we jumped to conclusions too early. Still seeing this sometimes, at least on reloads:
|
Hopefully resolved by #72, which was released with version 2.3.1. |
Haven't upgraded, but using the locally patched version gave me an error like this today. Honestly don't know if
|
Heh. Please disregard that one. It was a genuine circular dependency in my own app... 🙈 🙈 🙈 😁 I found and fixed it now. |
Haha, no problem. I appreciate your willingness to let us know! |
Hi,
Thanks for a nice Python/Django package. It works fine, but sometimes I get this error on startup with this Django app installed (as described in the installation details):
Note that this only happens sometimes, which is both puzzling and annoying. It can also happen when making a change to any
.py
file in the project, i.e. when the apps are reloaded. Any ideas? Thanks in advance.The text was updated successfully, but these errors were encountered: