Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community App Store (Sourcery refactored) #142

Merged
merged 2 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion conreq/_core/pwa/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Settings required by django-app. """

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 41-41 refactored with the following changes:


from django.apps import AppConfig
from django.conf import settings
from django.shortcuts import resolve_url as _resolve
Expand All @@ -9,6 +10,8 @@
resolve_url = lazy(_resolve, str)




class PwaConfig(AppConfig):
name = "conreq._core.pwa"

Expand Down Expand Up @@ -38,10 +41,11 @@ class PwaConfig(AppConfig):

app_icons_apple = [
{
"src": settings.BASE_URL + "static/conreq/icons/apple-touch-icon.png",
"src": f'{settings.BASE_URL}static/conreq/icons/apple-touch-icon.png',
"sizes": "180x180",
}
]

app_splash_screen = []
app_dir = "auto"
app_lang = "en-US"
4 changes: 2 additions & 2 deletions conreq/utils/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_base_url(
return base_url

if append_slash:
base_url = base_url + "/"
base_url = f'{base_url}/'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_base_url refactored with the following changes:

if prepend_slash:
base_url = f"/{base_url}"
base_url = base_url.replace("//", "/")
Expand All @@ -123,7 +123,7 @@ def get_home_url(
return home_url

if append_slash:
home_url = home_url + "/"
home_url = f'{home_url}/'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function get_home_url refactored with the following changes:

if prepend_slash:
home_url = f"/{home_url}"
home_url = home_url.replace("//", "/")
Expand Down