瀏覽代碼

Minor fixes

sleepytaco 3 年之前
父節點
當前提交
00fe525383
共有 4 個文件被更改,包括 8 次插入3 次删除
  1. 1 1
      UnTube/production.py
  2. 4 1
      UnTube/settings.py
  3. 1 1
      apps/main/templates/home.html
  4. 2 0
      apps/users/templates/settings.html

+ 1 - 1
UnTube/production.py

@@ -6,7 +6,7 @@ YOUTUBE_V3_API_KEY = os.environ['YOUTUBE_V3_API_KEY']
 
 # configure the domain name using the environment variable found on pythonanywhere
 ALLOWED_HOSTS = ['bakaabu.pythonanywhere.com', '127.0.0.1', 'untube.it'] if 'UNTUBE' in os.environ else ['bakaabu.pythonanywhere.com', 'untube.it']
-SITE_ID = 9
+SITE_ID = 10
 
 DEBUG = False
 CSRF_COOKIE_SECURE = True

+ 4 - 1
UnTube/settings.py

@@ -107,7 +107,7 @@ SOCIALACCOUNT_PROVIDERS = {
     }
 }
 
-SITE_ID = 7
+SITE_ID = 10
 
 LOGIN_URL = '/'
 
@@ -169,3 +169,6 @@ STATIC_ROOT = os.path.join(BASE_DIR, 'static')
 # Default primary key field type
 # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
 DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
+
+MEDIA_URL = '/media/'
+MEDIA_ROOT = Path(BASE_DIR / 'media')

+ 1 - 1
apps/main/templates/home.html

@@ -2,7 +2,7 @@
 {% extends 'base.html' %}
 {% load humanize %}
 {% block content %}
-    {% if user.playlists.all.count|add:"-1" == 0 %}
+    {% if user.playlists.all.count|add:"-1" >= -1 %}
         <div class="alert alert-success" role="alert">
             <h4 class="alert-heading">It's empty in here</h4>
             <p>

+ 2 - 0
apps/users/templates/settings.html

@@ -127,10 +127,12 @@
                         <label class="form-check-label" for="gradient-bg">Use a gradient background</label>
                         </div>
 
+                        <!--
                         <div class="mb-3 form-check form-switch">
                         <input class="form-check-input" name="hide videos" type="checkbox" id="hide-videos" {% if user.profile.hide_unavailable_videos %}checked{% endif %}>
                         <label class="form-check-label" for="hide-videos">Hide deleted/private videos</label>
                         </div>
+                        -->
 
                         <div class="mb-3 form-check form-switch">
                         <input class="form-check-input" name="confirm before deleting" type="checkbox" id="confirm-before-delete" {% if user.profile.confirm_before_deleting  %}checked{% endif %}>