Skip to content

Commit

Permalink
Fixed precommits
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Jun 28, 2024
1 parent a75870b commit ce77de4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 21 deletions.
7 changes: 5 additions & 2 deletions bartenders/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class Meta:
abstract = True

name = models.CharField(max_length=140, verbose_name=_("Fulde navn"))
username = models.CharField(max_length=140, unique=True, verbose_name=_("Brugernavn"))
username = models.CharField(
max_length=140, unique=True, verbose_name=_("Brugernavn")
)
email = models.CharField(max_length=255, unique=True, blank=True)
studentNumber = models.IntegerField(
blank=True, null=True, verbose_name=_("Studienummer")
Expand All @@ -69,7 +71,8 @@ class Meta:
class Bartender(BartenderCommon):
isActiveBartender = models.BooleanField(default=True)
prefer_only_early_shifts = models.BooleanField(
default=False, verbose_name=_("Jeg foretrækker ikke at have nogle sene barvagter")
default=False,
verbose_name=_("Jeg foretrækker ikke at have nogle sene barvagter"),
)

@property
Expand Down
2 changes: 1 addition & 1 deletion bartenders/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>{% translate "Bartendertilmelding" %}</h2>
<p>{% translate "Er du interesseret i at være med i et fedt fællesskab hvor vi hygger bag baren og serverer nogle kolde drikkevarer?" %}</p>
<p>{% translate "Du vil som bartender få ca. 2 vagter pr. semester, hvor du er med til at sikre at alle får slukket tørsten." %}<p>
<p>{% translate "Udover dette inviteres du til vores årlige arrangementer for bartendere, såsom Sommerfesten og Julefrokosten. Derudover vil der løbende være fede begivenheder, såsom ølsmagning og lign. Alt sammen gratis for bartendere." %}</p>
<p>{% translate "Det er en god idé at læse" %} <a href="{{ barshift_guide_url }}" alt="guide">{% translate "barvagt-guiden" %}</a>
<p>{% translate "Det er en god idé at læse" %} <a href="{{ barshift_guide_url }}" alt="guide">{% translate "barvagt-guiden" %}</a>
{% translate "før du tilmelder dig, så du ved hvad en typisk vagt i Fredagscaféen indebærer." %}</p>
{% if config.REGISTRATION_OPEN %}
<form method="post" action="/">
Expand Down
28 changes: 15 additions & 13 deletions fredagscafeen/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
'django.middleware.locale.LocaleMiddleware', # Used for internationalization. Has to be after sessions but before common
"django.middleware.locale.LocaleMiddleware", # Used for internationalization. Has to be after sessions but before common
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
Expand Down Expand Up @@ -259,24 +259,26 @@
from django.utils.translation import gettext_lazy as _

LANGUAGES = (
('da', _('Danish')),
('en', _('English')),
("da", _("Danish")),
("en", _("English")),
)

PARLER_LANGUAGES = {
None : (
{'code': 'da',},
{'code': 'en',},
None: (
{
"code": "da",
},
{
"code": "en",
},
),
'default': {
'fallbacks': ['da'],
'hide_untranslated': False,
}
"default": {
"fallbacks": ["da"],
"hide_untranslated": False,
},
}

LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale/'),
)
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale/"),)

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
Expand Down
4 changes: 2 additions & 2 deletions fredagscafeen/urls.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views.generic import RedirectView
from django.conf.urls.i18n import i18n_patterns

urlpatterns = i18n_patterns (
urlpatterns = i18n_patterns(
path("favicon.ico", RedirectView.as_view(url="/static/favicon.ico")),
path("admin/", admin.site.urls),
path("api/", include("api.urls")),
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ iterfzf
celery[redis]
django-celery-beat
django-rosetta==0.9.9
lxml_html_clean
lxml_html_clean
8 changes: 6 additions & 2 deletions udlejning/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class Meta:
whoPays = models.CharField(
max_length=140,
verbose_name=_("Hvem betaler?"),
help_text=_("Hvem skal regningen sendes til? (Fulde navn på person, virksomhed eller organisation)"),
help_text=_(
"Hvem skal regningen sendes til? (Fulde navn på person, virksomhed eller organisation)"
),
)
paymentType = models.CharField(
max_length=140,
Expand All @@ -58,7 +60,9 @@ class Meta:
expectedConsummation = models.TextField(
max_length=140,
verbose_name=_("Forventet forbrug"),
help_text=_("Hvilke slags øl eller andre drikkevarer ønskes der og hvor mange fustager af hver type?"),
help_text=_(
"Hvilke slags øl eller andre drikkevarer ønskes der og hvor mange fustager af hver type?"
),
)
comments = models.TextField(blank=True, verbose_name=_("Kommentarer"))

Expand Down

0 comments on commit ce77de4

Please sign in to comment.