diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 82b4eb1..0000000 --- a/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2020 Etzelia - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/REQUIREMENTS.md b/REQUIREMENTS.md deleted file mode 100644 index 213692a..0000000 --- a/REQUIREMENTS.md +++ /dev/null @@ -1,15 +0,0 @@ -# Requirements - -This project was built with (and should work with non-breaking upgrades of): - -| Package | Version | -|-------------------------------------------------------|---------| -| [discord.py](https://pypi.org/project/discord.py/) | 1.3.4 | -| [Django](https://pypi.org/project/Django/) | 2.2 | -| [mcstatus](https://pypi.org/project/mcstatus/) | 3.1.1 | -| [mysqlclient*](https://pypi.org/project/mysqlclient/) | 1.4.6 | -| [PyYAML](https://pypi.org/project/PyYAML/) | 5.3.1 | - - -*or any other preferred DB - diff --git a/__init__.py b/__init__.py index 4527f3e..e69de29 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +0,0 @@ -default_app_config = 'minecraft_manager.apps.MinecraftManagerAppConfig' diff --git a/admin.py b/admin.py index 5de50b1..6cc4532 100644 --- a/admin.py +++ b/admin.py @@ -4,7 +4,7 @@ from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ -from minecraft_manager.models import Application, Note, Ticket, TicketNote, Player, IP, UserSettings, Alert, Attachment +from minecraft_manager.models import Application, Note, Ticket, TicketNote, Player, IP, UserSettings, Alert from minecraft_manager.api.admin import register as api_register @@ -90,14 +90,6 @@ class IPAdmin(admin.ModelAdmin): search_fields = ["player__username", "ip"] -class AttachmentAdmin(admin.ModelAdmin): - list_display = ["file_name", "model_name"] - - def model_name(self, attachment): - return attachment.ref_name - model_name.short_description = "Model" - - try: admin.site.unregister(User) admin.site.register(User, UserAdmin) @@ -109,7 +101,6 @@ try: admin.site.register(Player, PlayerAdmin) admin.site.register(IP, IPAdmin) admin.site.register(Alert) - admin.site.register(Attachment, AttachmentAdmin) api_register() except admin.sites.AlreadyRegistered: pass diff --git a/api/views.py b/api/views.py index fdba1eb..d1798b5 100644 --- a/api/views.py +++ b/api/views.py @@ -1,23 +1,22 @@ from __future__ import absolute_import -import datetime -import logging - -from django.apps import apps -from django.contrib.auth import update_session_auth_hash +import logging, datetime from django.contrib.auth.forms import PasswordChangeForm +from django.contrib.auth import update_session_auth_hash +from django.apps import apps +from django.conf import settings from django.contrib.auth.models import User -from django.forms import modelform_factory from django.http import JsonResponse, HttpResponse from django.utils import timezone from django.views.generic import View +from django.forms import modelform_factory -import minecraft_manager.api.api as mcm_api -import minecraft_manager.external.stats as mcm_stats import minecraft_manager.forms as mcm_forms -import minecraft_manager.utils as mcm_utils -from minecraft_manager.api.models import Token from minecraft_manager.models import Player, UserSettings, Application, IP, Ticket, Note +import minecraft_manager.api.api as mcm_api +from minecraft_manager.api.models import Token +import minecraft_manager.utils as mcm_utils +import minecraft_manager.external.stats as mcm_stats logger = logging.getLogger(__name__) @@ -206,11 +205,10 @@ class PluginAPI(View): application.save() json['message'] = "Application was successfully {0}.".format( "accepted" if post['action'] == "True" else "denied") - link = mcm_utils.full_reverse('application_info', application.id) - mcm_api.discord_mcm("{0}'s application ([#{1}]({4})) was {2} by {3}".format(application.username, + mcm_api.discord_mcm("{0}'s application (#{1}) was {2} by {3}".format(application.username, application.id, "accepted" if post['action'] == "True" else "denied", - post['username'], link)) + post['username'])) mcm_api.plugin("accept" if post['action'] == "True" else "deny", application.username) else: json['status'] = False @@ -299,7 +297,7 @@ class PluginAPI(View): ticket = Ticket(player=player, message=post['message'], x=post['x'], y=post['y'], z=post['z'], world=post['world']) ticket.save() json['message'] = "Ticket submitted." - link = mcm_utils.full_reverse('ticket_info', ticket.id) + link = "{}".format(mcm_utils.url_path(settings.MCM_BASE_LINK, 'dashboard/ticket', ticket.id)) msg = mcm_utils.build_ticket(ticket, link) json['extra'] = {'id': ticket.id, 'link': link} mcm_api.discord_mcm(embed=msg, ping=True) @@ -313,7 +311,7 @@ class PluginAPI(View): warning = Note(player=player, message=post['message'], importance=post['severity'], staff=staff.auth_user) warning.save() json['message'] = "Warning issued." - link = mcm_utils.full_reverse('note_info', warning.id) + link = "{}".format(mcm_utils.url_path(settings.MCM_BASE_LINK, 'dashboard/note', warning.id)) msg = mcm_utils.build_warning(warning, link) mcm_api.discord_mcm(embed=msg) except Exception as ex: @@ -392,7 +390,7 @@ class ModelAPI(View): json = [] for value in objects: try: - link = mcm_utils.full_reverse(f"{request_model}_info", value['id']) + link = "{}".format(mcm_utils.url_path(settings.MCM_BASE_LINK, 'dashboard', request_model, value['id'])) value['link'] = link except: pass diff --git a/apps.py b/apps.py deleted file mode 100644 index cc3695e..0000000 --- a/apps.py +++ /dev/null @@ -1,7 +0,0 @@ -from django.apps import AppConfig - - -class MinecraftManagerAppConfig(AppConfig): - name = 'minecraft_manager' - verbose_name = "Minecraft Manager" - diff --git a/bot/commands.py b/bot/commands.py index 693d496..9d6f4c1 100644 --- a/bot/commands.py +++ b/bot/commands.py @@ -1,13 +1,12 @@ import discord -from io import StringIO from discord.ext import commands from django.contrib.auth.models import User from django.db import close_old_connections from minecraft_manager.api import api from minecraft_manager.bot.utils import get_application +from minecraft_manager.utils import build_application from minecraft_manager.models import Application, Player -from minecraft_manager.utils import build_application, full_static class Commands(commands.Cog): @@ -45,8 +44,8 @@ class Commands(commands.Cog): async def help(self, ctx): embed = discord.Embed(colour=discord.Colour(0x417505)) embed.set_thumbnail( - url=full_static('favicon.png')) - embed.title = "Minecraft Manager Help" + url="https://cdn.discordapp.com/avatars/454457830918062081/b5792489bc43d9e17b8f657880a17dd4.png") + embed.add_field(name="Minecraft Manager Help", value="-----------------------------") embed.add_field(name="{}app search ".format(self.bot.prefix), value="Search for applications by partial or exact username.") embed.add_field(name="{}app info ".format(self.bot.prefix), @@ -55,7 +54,6 @@ class Commands(commands.Cog): embed.add_field(name="{}demote ".format(self.bot.prefix), value="Demote a player to the role given to accepted applications.") embed.add_field(name="{}compare".format(self.bot.prefix), value="Compare Discord users to the Whitelist.") - embed.add_field(name="{}sync".format(self.bot.prefix), value="Sync Discord users with Player records.") await self.bot.discord_message(ctx.message.channel, embed) @commands.group("app", aliases=["application"]) @@ -155,29 +153,6 @@ class Commands(commands.Cog): if not api.plugin(api.PLUGIN_DENY, application.username): await self.bot.discord_message(ctx.message.channel, "Could not deny in-game, is the server running?") - @commands.command() - async def clear(self, ctx, app_id: int): - await self._clear(ctx, app_id) - - @app.command("clear") - async def app_clear(self, ctx, app_id: int): - await self._clear(ctx, app_id) - - async def _clear(self, ctx, app_id: int): - application = get_application(app_id) - if not application: - await self.bot.discord_message(ctx.message.channel, "An Application with that ID doesn't exist.") - return - - if not application.accepted: - application.accepted = None - application.save() - if Player.objects.filter(username__iexact=application.username).exists(): - player = Player.objects.get(username__iexact=application.username) - player.application_id = application.id - player.save() - await self.bot.discord_message(ctx.message.channel, "App ID **{0}** was successfully cleared.".format(app_id)) - @commands.command() async def search(self, ctx, search: str): await self._search(ctx, search) @@ -260,31 +235,6 @@ class Commands(commands.Cog): header = "**The following users do not have an application or player match on the whitelist:**\n" await self.bot.discord_message(ctx.author, "{}```{}```".format(header, "\n".join(no_application))) - @commands.command() - async def sync(self, ctx): - def sync_player(player): - for member in ctx.guild.members: - name = member.nick if member.nick else member.name - if player.username.lower() == name.lower(): - player.discord_id = member.id - player.save() - return True - return False - # Attempt to sync users - need_sync = Player.objects.filter(discord_id__isnull=True) - need_sync_count = need_sync.count() - synced = [] - not_synced = [] - if need_sync_count > 0: - for ns in need_sync: - if sync_player(ns): - synced.append(ns.username) - else: - not_synced.append(ns.username) - txt = "Synced\n\t{}\n\nNot Synced\n\t{}".format('\n\t'.join(synced), '\n\t'.join(not_synced)) - attach = discord.File(fp=StringIO(txt), filename="sync.txt") - await ctx.channel.send(content="Successfully synced {}/{} players.".format(len(synced), need_sync_count), file=attach) - def setup(bot): bot.add_cog(Commands(bot)) diff --git a/bot/discord.py b/bot/discord.py index 4895dc1..2b57345 100644 --- a/bot/discord.py +++ b/bot/discord.py @@ -7,7 +7,7 @@ from discord.ext import commands from django.conf import settings from minecraft_manager.models import Application, Ticket -from minecraft_manager.utils import full_reverse +from minecraft_manager.utils import url_path logger = logging.getLogger(__name__) @@ -24,10 +24,8 @@ class Discord(commands.Bot): error_users = getattr(settings, 'DISCORD_ERROR_USERS', []) def __init__(self, token): - intents = discord.Intents.default() - intents.members = True super().__init__(command_prefix=self.prefix, description=description, case_insensitive=True, help_command=None, - activity=discord.Game(name=self.discord_game), intents=intents) + activity=discord.Game(name=self.discord_game)) self.token = token self.load_extension("minecraft_manager.bot.commands") @@ -48,11 +46,11 @@ class Discord(commands.Bot): content = "" unanswered_applications = Application.objects.filter(accepted=None) if len(unanswered_applications) > 0: - link = full_reverse('application') + link = url_path(settings.MCM_BASE_LINK, 'dashboard/application') content += "[Unanswered Applications: {}]({})".format(len(unanswered_applications), link) unclaimed_tickets = Ticket.objects.filter(staff=None, resolved=False) if len(unclaimed_tickets) > 0: - link = full_reverse('ticket') + link = url_path(settings.MCM_BASE_LINK, 'dashboard/ticket') if content: content += "\n\n" content += "[Unclaimed Tickets: {}]({})".format(len(unclaimed_tickets), link) @@ -93,5 +91,5 @@ class Discord(commands.Bot): print(e) logger.info('Bot encountered the following unhandled exception %s', e) finally: - loop.run_until_complete(self.close()) + loop.run_until_complete(self.logout()) logger.info("Bot shutting down...") diff --git a/external/views.py b/external/views.py index 1a657f6..5d40f82 100644 --- a/external/views.py +++ b/external/views.py @@ -1,5 +1,5 @@ from django.views.generic import View -from django.shortcuts import render, reverse +from django.shortcuts import render from django.conf import settings from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt @@ -73,7 +73,7 @@ class Apply(View): captcha = mcm_utils.Captcha(request.POST) valid = form.is_valid() r = rules() - valid_answer = not r["validate"] or r["answer"].casefold() == form.data['read_rules'].casefold() + valid_answer = not r["validate"] or r["answer"] == form.data['read_rules'] if valid and valid_username and valid_answer and captcha.success: app = form.save() msg = mcm_utils.build_application(app) @@ -116,7 +116,7 @@ class Ticket(View): if valid and captcha.success: ticket = form.save() # Create the message to send to Discord - link = mcm_utils.full_reverse('ticket_info', ticket.id) + link = "{}".format(mcm_utils.url_path(settings.MCM_BASE_LINK, 'dashboard/ticket', ticket.id)) msg = mcm_utils.build_ticket(ticket, link) mcm_api.discord_mcm(message="New Ticket", embed=msg, ping=True) mcm_api.plugin("ticket", "{0} {1} {2}".format(username, ticket.id, link)) diff --git a/forms.py b/forms.py index d16ab7c..d0a37b3 100644 --- a/forms.py +++ b/forms.py @@ -30,7 +30,7 @@ class TicketForm(ModelForm): fields = ['player', 'message', 'priority', 'world', 'x', 'y', 'z'] widgets = { 'player': TextInput, - 'message': Textarea(attrs={'style': 'display: block;'}), + 'message': Textarea, } @@ -39,7 +39,7 @@ class NoteForm(ModelForm): model = Note fields = ['player', 'message', 'importance'] widgets = { - 'message': Textarea(attrs={'style': 'display: block;'}) + 'message': Textarea } diff --git a/migrations/0015_auto_20210206_2140.py b/migrations/0015_auto_20210206_2140.py deleted file mode 100644 index fcb0e44..0000000 --- a/migrations/0015_auto_20210206_2140.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.3 on 2021-02-06 21:40 - -from django.db import migrations, models -import minecraft_manager.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('minecraft_manager', '0014_auto_20190930_1103'), - ] - - operations = [ - migrations.CreateModel( - name='Attachment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('ref_model', models.CharField(choices=[('T', 'Ticket Note'), ('N', 'Note')], max_length=1)), - ('ref_id', models.IntegerField()), - ('file', models.FileField(upload_to=minecraft_manager.models._attachment_upload_to)), - ('created', models.DateTimeField(auto_now_add=True)), - ], - ), - migrations.AlterField( - model_name='application', - name='reference', - field=models.CharField(blank=True, max_length=50, null=True, verbose_name='How did you find out about our server?'), - ), - ] diff --git a/migrations/0016_auto_20210328_0131.py b/migrations/0016_auto_20210328_0131.py deleted file mode 100644 index 2aa0a92..0000000 --- a/migrations/0016_auto_20210328_0131.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.3 on 2021-03-28 01:31 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('minecraft_manager', '0015_auto_20210206_2140'), - ] - - operations = [ - migrations.AlterField( - model_name='usersettings', - name='default_timezone', - field=models.CharField(choices=[('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagreb', 'Europe/Zagreb'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], default='UTC', max_length=50, verbose_name='Timezone'), - ), - ] diff --git a/migrations/0017_player_discord_id.py b/migrations/0017_player_discord_id.py deleted file mode 100644 index 0cbc657..0000000 --- a/migrations/0017_player_discord_id.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.3 on 2021-07-20 23:29 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('minecraft_manager', '0016_auto_20210328_0131'), - ] - - operations = [ - migrations.AddField( - model_name='player', - name='discord_id', - field=models.CharField(blank=True, max_length=30, null=True, unique=True), - ), - ] diff --git a/models.py b/models.py index 4fc573a..095bf16 100644 --- a/models.py +++ b/models.py @@ -1,17 +1,9 @@ -import json -import logging -import os -from datetime import datetime -from os.path import basename - -import pytz -import yaml -from django.conf import settings -from django.contrib.auth.models import User from django.db import models +from django.contrib.auth.models import User from django.db.models import Q -from django.db.models.signals import pre_delete -from django.dispatch import receiver +import logging, yaml, pytz, json, os +from django.conf import settings +from datetime import datetime logger = logging.getLogger(__name__) @@ -47,7 +39,7 @@ class UserSettings(models.Model): auth_user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) default_results = models.SmallIntegerField("Default Results", default=10, choices=RESULT_OPTIONS) default_theme = models.CharField("Theme", max_length=2, default='DE', choices=THEME_OPTIONS) - default_timezone = models.CharField("Timezone", max_length=50, default='UTC', choices=TIMEZONES) + default_timezone = models.CharField("Timezone", max_length=20, default='UTC', choices=TIMEZONES) search_player_ip = models.BooleanField("Include IP in Player search", default=False) show_timestamp_chat = models.BooleanField("Show Timestamp By Chat", default=False) last_ip = models.CharField(max_length=30, default="127.0.0.1", editable=False) @@ -69,7 +61,7 @@ class Application(models.Model): player_type = models.TextField("What type of player are you?", max_length=300) ever_banned = models.BooleanField("Have you ever been banned?", default=False) ever_banned_explanation = models.TextField("If you were previously banned, will you share why?", max_length=300, blank=True, null=True) - reference = models.CharField("How did you find out about our server?", max_length=50, blank=True, null=True) + reference = models.CharField("Were you referred to our server?", max_length=50, blank=True, null=True) read_rules = models.CharField("Have you read the rules?", max_length=10) accepted = models.NullBooleanField() date = models.DateTimeField(auto_now_add=True, blank=True, null=True) @@ -105,7 +97,7 @@ class Player(models.Model): application = models.ForeignKey(Application, on_delete=models.SET_NULL, null=True, blank=True) first_seen = models.DateField(null=True, blank=True) last_seen = models.DateField(null=True, blank=True) - discord_id = models.CharField(max_length=30, unique=True, null=True, blank=True) + @property def is_banned(self): @@ -260,10 +252,6 @@ class Ticket(models.Model): def date_display(self): return str(self.date).split(".")[0] - @property - def notes(self): - return TicketNote.objects.filter(ticket=self) - def __str__(self): return "{}: {}".format(self.issuer, self.snippet) @@ -275,10 +263,6 @@ class TicketNote(models.Model): last_update = models.DateTimeField(auto_now_add=True, blank=True, null=True) date = models.DateTimeField(auto_now_add=True, blank=True, null=True) - @property - def attachments(self): - return Attachment.objects.filter(ref_model=RefModels.TICKET_NOTE[0], ref_id=self.id) - class Meta: verbose_name = "Ticket Note" verbose_name_plural = "Ticket Notes" @@ -340,54 +324,10 @@ class Note(models.Model): def date_display(self): return str(self.date).split(".")[0] - @property - def attachments(self): - return Attachment.objects.filter(ref_model=RefModels.NOTE[0], ref_id=self.id) - def __str__(self): return "{}: {}".format(self.issuee, self.snippet) -class RefModels: - TICKET_NOTE = 'T', 'Ticket Note' - NOTE = 'N', 'Note' - choices = TICKET_NOTE, NOTE - - @staticmethod - def label(ref: str): - for c in RefModels.choices: - if c[0] == ref: - return c[1] - return "None" - - -def _attachment_upload_to(instance, filename): - return f"attachments/{instance.ref_name.lower().replace(' ', '_')}s/{instance.ref_id}/{filename}" - - -class Attachment(models.Model): - ref_model = models.CharField(max_length=1, choices=RefModels.choices) - ref_id = models.IntegerField() - file = models.FileField(upload_to=_attachment_upload_to) - created = models.DateTimeField(auto_now_add=True) - - @property - def ref_name(self): - return RefModels.label(self.ref_model) - - @property - def file_name(self): - return basename(self.file.name) - - def __str__(self): - return self.file.name - - -@receiver(pre_delete, sender=Attachment, dispatch_uid="delete_attachments") -def attachment_delete(sender, instance, **kwargs): - instance.file.delete(False) - - class IPManager(models.Manager): def get_queryset(self): users = User.objects.filter(is_active=True) diff --git a/static/minecraft_manager/css/bootswatch-darkly.css b/static/minecraft_manager/css/bootswatch-darkly.css index b886c76..9a5e710 100644 --- a/static/minecraft_manager/css/bootswatch-darkly.css +++ b/static/minecraft_manager/css/bootswatch-darkly.css @@ -1,9 +1,4 @@ @import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic"); -/* Custom CSS */ -.nav-sidebar { - border-right: 1px solid #464545; -} - /*! * bootswatch v3.3.7 * Homepage: http://bootswatch.com diff --git a/static/minecraft_manager/css/bootswatch-flatly.css b/static/minecraft_manager/css/bootswatch-flatly.css index 3e0f8f7..ba7e9e9 100644 --- a/static/minecraft_manager/css/bootswatch-flatly.css +++ b/static/minecraft_manager/css/bootswatch-flatly.css @@ -1,9 +1,4 @@ @import url("https://fonts.googleapis.com/css?family=Lato:400,700,400italic"); -/* Custom CSS */ -.nav-sidebar { - border-right: 1px solid #ecf0f1; -} - /*! * bootswatch v3.3.7 * Homepage: http://bootswatch.com diff --git a/static/minecraft_manager/css/bootswatch-slate.css b/static/minecraft_manager/css/bootswatch-slate.css index 599a694..eb90344 100644 --- a/static/minecraft_manager/css/bootswatch-slate.css +++ b/static/minecraft_manager/css/bootswatch-slate.css @@ -1,9 +1,3 @@ -@import url("https://fonts.googleapis.com/css?family=Roboto:400,700"); -/* Custom CSS */ -.nav-sidebar { - border-right: 1px solid #1c1e22; -} - /*! * bootswatch v3.3.7 * Homepage: http://bootswatch.com diff --git a/static/minecraft_manager/css/bootswatch-solar.css b/static/minecraft_manager/css/bootswatch-solar.css index b9b0b72..3beb663 100644 --- a/static/minecraft_manager/css/bootswatch-solar.css +++ b/static/minecraft_manager/css/bootswatch-solar.css @@ -1,9 +1,4 @@ @import url("https://fonts.googleapis.com/css?family=Roboto:400,700"); -/* Custom CSS */ -.nav-sidebar { - border-right: 1px solid #282828; -} - /*! * bootswatch v3.3.7 * Homepage: http://bootswatch.com diff --git a/templates/minecraft_manager/alert.html b/templates/minecraft_manager/alert.html index d84c66a..736900a 100644 --- a/templates/minecraft_manager/alert.html +++ b/templates/minecraft_manager/alert.html @@ -4,7 +4,7 @@ {% block title %}Alerts{% endblock %} {% block section %} \ No newline at end of file diff --git a/templates/minecraft_manager/modal/delete_attachment.html b/templates/minecraft_manager/modal/delete_attachment.html deleted file mode 100644 index 9d78990..0000000 --- a/templates/minecraft_manager/modal/delete_attachment.html +++ /dev/null @@ -1,48 +0,0 @@ - - \ No newline at end of file diff --git a/templates/minecraft_manager/note.html b/templates/minecraft_manager/note.html index 9a9edbe..fd350cd 100644 --- a/templates/minecraft_manager/note.html +++ b/templates/minecraft_manager/note.html @@ -2,34 +2,24 @@ {% block title %}Notes{% endblock %} {% block section %}