diff --git a/.env.template b/.env.template index 6fba0dd7..36c2357d 100644 --- a/.env.template +++ b/.env.template @@ -41,10 +41,17 @@ SHOPPING_MIN_AUTOSYNC_INTERVAL=5 # Default for user setting sticky navbar # STICKY_NAV_PREF_DEFAULT=1 -# If staticfiles are stored at a different location uncomment and change accordingly +# If base URL is something other than just / (you are serving a subfolder in your proxy for instance http://recipe_app/recipes/) +# SCRIPT_NAME=/recipes + +# If staticfiles are stored at a different location uncomment and change accordingly, MUST END IN / +# this is not required if you are just using a subfolder +# This can either be a relative path from the applications base path or the url of an external host # STATIC_URL=/static/ -# If mediafiles are stored at a different location uncomment and change accordingly +# If mediafiles are stored at a different location uncomment and change accordingly, MUST END IN / +# this is not required if you are just using a subfolder +# This can either be a relative path from the applications base path or the url of an external host # MEDIA_URL=/media/ # Serve mediafiles directly using gunicorn. Basically everyone recommends not doing this. Please use any of the examples @@ -79,8 +86,6 @@ GUNICORN_MEDIA=0 # when unset: 0 (false) REVERSE_PROXY_AUTH=0 -# If base URL is something other than just / (you are serving a subfolder in your proxy for instance http://recipe_app/recipes/) -# SCRIPT_NAME=/recipes # Default settings for spaces, apply per space and can be changed in the admin view # SPACE_DEFAULT_MAX_RECIPES=0 # 0=unlimited recipes # SPACE_DEFAULT_MAX_USERS=0 # 0=unlimited users per space diff --git a/cookbook/serializer.py b/cookbook/serializer.py index 27104ce9..dab9ebc0 100644 --- a/cookbook/serializer.py +++ b/cookbook/serializer.py @@ -38,6 +38,8 @@ class ExtendedRecipeMixin(serializers.ModelSerializer): return fields except AttributeError: pass + except KeyError: + pass del fields['image'] del fields['numrecipe'] return fields diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 1976ef33..6d7b0413 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -344,6 +344,7 @@