New WaitingListEntry #33

Merged
valberg merged 10 commits from benjaoming/membersystem:waiting-list into main 2024-07-31 22:49:48 +00:00
6 changed files with 9 additions and 20 deletions
Showing only changes of commit 250f203900 - Show all commits

View file

@ -15,9 +15,7 @@ WORKDIR /app
RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www RUN groupadd -g 1000 www && useradd -u 1000 -ms /bin/bash -g www www
COPY --chown=www:www . . COPY --chown=www:www . .
RUN mkdir /app/src/static && \ RUN apt-get update && \
chown www:www /app/src/static && \
apt-get update && \
apt-get install -y \ apt-get install -y \
binutils \ binutils \
libpq-dev \ libpq-dev \
@ -33,11 +31,11 @@ RUN mkdir /app/src/static && \
COPY --chown=www:www . . COPY --chown=www:www . .
RUN mkdir /app/src/static \ RUN mkdir /app/src/static && \
&& chown www:www /app/src/static chown www:www /app/src/static
RUN pip install --no-cache-dir -r $REQUIREMENTS_FILE && \ RUN pip install --no-cache-dir -r $REQUIREMENTS_FILE
&& django-admin compilemessages RUN django-admin compilemessages
ENTRYPOINT ["./entrypoint.sh"] ENTRYPOINT ["./entrypoint.sh"]

View file

@ -125,7 +125,7 @@ extend-exclude = [
line-length = 120 line-length = 120
[tool.ruff.lint] [tool.ruff.lint]
# select = ["ALL"] select = ["ALL"]
ignore = [ ignore = [
"G004", # Logging statement uses f-string "G004", # Logging statement uses f-string
"ANN101", # Missing type annotation for `self` in method "ANN101", # Missing type annotation for `self` in method

View file

@ -19,11 +19,7 @@ class MembershipTypeAdmin(admin.ModelAdmin):
class SubscriptionPeriodAdmin(admin.ModelAdmin): class SubscriptionPeriodAdmin(admin.ModelAdmin):
"""Admin for SubscriptionPeriod model.""" """Admin for SubscriptionPeriod model."""
pass
@admin.register(models.WaitingListEntry) @admin.register(models.WaitingListEntry)
class WaitingListEntryAdmin(admin.ModelAdmin): class WaitingListEntryAdmin(admin.ModelAdmin):
"""Admin for WaitingList model.""" """Admin for WaitingList model."""
pass

View file

@ -1,4 +1,4 @@
# Generated by Django 5.0.6 on 2024-07-14 16:22 # Generated by Django 5.0.7 on 2024-07-20 20:45
from django.db import migrations, models from django.db import migrations, models
@ -17,7 +17,7 @@ class Migration(migrations.Migration):
('modified', models.DateTimeField(auto_now=True, verbose_name='modified')), ('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
('created', models.DateTimeField(auto_now_add=True, verbose_name='created')), ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
('email', models.EmailField(max_length=254)), ('email', models.EmailField(max_length=254)),
('geography', models.CharField(blank=True, null=True, verbose_name='geography')), ('geography', models.CharField(blank=True, default='', verbose_name='geography')),
('comment', models.TextField(blank=True)), ('comment', models.TextField(blank=True)),
], ],
options={ options={

View file

@ -145,7 +145,7 @@ class WaitingListEntry(CreatedModifiedAbstract):
"""People who for some reason could want to be added to a waiting list and invited to join later.""" """People who for some reason could want to be added to a waiting list and invited to join later."""
email = models.EmailField() email = models.EmailField()
geography = models.CharField(verbose_name=_("geography"), blank=True, null=True) geography = models.CharField(verbose_name=_("geography"), blank=True, default="")
comment = models.TextField(blank=True) comment = models.TextField(blank=True)
def __str__(self) -> str: def __str__(self) -> str:

View file

@ -1,5 +0,0 @@
[pytest]
testpaths = .
python_files = tests.py test_*.py *_tests.py
DJANGO_SETTINGS_MODULE = project.settings
#norecursedirs = dist tmp* .svn .*