mirror of
https://github.com/hellosteadman/bambu-buffer.git
synced 2025-05-05 00:39:52 +00:00
Don't import models too soon
This commit is contained in:
parent
49068bd423
commit
7eb680d43c
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,6 @@ from django.contrib.contenttypes.models import ContentType
|
||||||
from django.contrib.sites.shortcuts import get_current_site
|
from django.contrib.sites.shortcuts import get_current_site
|
||||||
from django.db.models import Model
|
from django.db.models import Model
|
||||||
from bambu_buffer.exceptions import *
|
from bambu_buffer.exceptions import *
|
||||||
from bambu_buffer.models import BufferToken, BufferProfile, BufferedItem
|
|
||||||
from bambu_buffer.settings import POST_URL, TIMEOUT, AUTOPOST_MODELS
|
from bambu_buffer.settings import POST_URL, TIMEOUT, AUTOPOST_MODELS
|
||||||
from datetime import datetime, date
|
from datetime import datetime, date
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
@ -30,6 +29,8 @@ class BufferThread(Thread):
|
||||||
log.error(response.json())
|
log.error(response.json())
|
||||||
|
|
||||||
def post(item, author, **kwargs):
|
def post(item, author, **kwargs):
|
||||||
|
from bambu_buffer.models import BufferToken, BufferProfile, BufferedItem
|
||||||
|
|
||||||
try:
|
try:
|
||||||
token = author.buffer_token
|
token = author.buffer_token
|
||||||
except BufferToken.DoesNotExist:
|
except BufferToken.DoesNotExist:
|
||||||
|
|
Loading…
Reference in a new issue