Optimized imports
Signed-off-by: Etzelia <etzelia@hotmail.com> # Conflicts: # gui.pycoords
parent
dac77b4c08
commit
8887559cf4
28
admin.py
28
admin.py
|
@ -1,11 +1,11 @@
|
|||
import ast
|
||||
|
||||
from django import forms
|
||||
from django.contrib import admin
|
||||
from django.contrib.admin import widgets as admin_widgets
|
||||
from django import forms
|
||||
import ast
|
||||
from django_coreprotect.utils import time_to_form, form_to_time
|
||||
|
||||
from django_coreprotect.models import CoArtMap, CoBlock, CoBlockdataMap, CoChat, CoCommand, CoContainer, CoDatabaseLock, \
|
||||
CoEntity, CoEntityMap, CoMaterialMap, CoSession, CoSign, CoSkull, CoUser, CoUsernameLog, CoVersion, CoWorld, Preset
|
||||
from django_coreprotect.models import CoWorld, Preset
|
||||
from django_coreprotect.utils import time_to_form, form_to_time
|
||||
|
||||
|
||||
class PresetAdminForm(forms.ModelForm):
|
||||
|
@ -49,24 +49,6 @@ class PresetAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
try:
|
||||
pass
|
||||
# admin.site.register(CoArtMap)
|
||||
# admin.site.register(CoBlock)
|
||||
# admin.site.register(CoBlockdataMap)
|
||||
# admin.site.register(CoChat)
|
||||
# admin.site.register(CoCommand)
|
||||
# admin.site.register(CoContainer)
|
||||
# admin.site.register(CoDatabaseLock)
|
||||
# admin.site.register(CoEntity)
|
||||
# admin.site.register(CoEntityMap)
|
||||
# admin.site.register(CoMaterialMap)
|
||||
# admin.site.register(CoSession)
|
||||
# admin.site.register(CoSign)
|
||||
# admin.site.register(CoSkull)
|
||||
# admin.site.register(CoUser)
|
||||
# admin.site.register(CoUsernameLog)
|
||||
# admin.site.register(CoVersion)
|
||||
# admin.site.register(CoWorld)
|
||||
admin.site.register(Preset, PresetAdmin)
|
||||
except admin.sites.AlreadyRegistered:
|
||||
pass
|
||||
|
|
4
gui.py
4
gui.py
|
@ -1,7 +1,7 @@
|
|||
from datetime import datetime
|
||||
|
||||
from django_coreprotect.models import CoWorld, GUIResult
|
||||
from django_coreprotect.utils import safe_int, checkbox, time_to_form
|
||||
from datetime import datetime
|
||||
from django.db import connection
|
||||
|
||||
|
||||
class GUIForm:
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.shortcuts import reverse
|
||||
from django.contrib.auth.models import User
|
||||
from datetime import datetime
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.db import models
|
||||
from django.shortcuts import reverse
|
||||
|
||||
from django_coreprotect.utils import safe_int
|
||||
|
||||
|
||||
|
|
3
utils.py
3
utils.py
|
@ -1,5 +1,6 @@
|
|||
from datetime import datetime, timedelta
|
||||
import ast
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
||||
def checkbox(value):
|
||||
return True if value == "on" else False
|
||||
|
|
7
views.py
7
views.py
|
@ -1,10 +1,11 @@
|
|||
from django.http.response import JsonResponse
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import View
|
||||
from django.http.response import JsonResponse
|
||||
from django_coreprotect.gui import gui_data, gui_results
|
||||
|
||||
from django_coreprotect.activity import activity_data, activity_results
|
||||
from django_coreprotect.utils import safe_int
|
||||
from django_coreprotect.gui import gui_data, gui_results
|
||||
from django_coreprotect.models import Preset
|
||||
from django_coreprotect.utils import safe_int
|
||||
|
||||
|
||||
class GUI(View):
|
||||
|
|
Loading…
Reference in New Issue