From 2bc468b328a798c4435833d43e70cd64a241185f Mon Sep 17 00:00:00 2001 From: "Eduardo Enriquez (eduzen)" Date: Thu, 16 Jan 2025 21:53:05 +0100 Subject: [PATCH 1/2] Use django-upgrade to update django syntax to the latest possible. Trailing whitespaces. --- .github/workflows/test.yaml | 7 +++- .github/workflows/upload_to_dockerhub.yaml | 6 ++-- .pre-commit-config.yaml | 12 +++++++ INSTALLATION.md | 2 +- .../templates/account/custom_captcha.html | 4 +-- community/templates/base.html | 2 +- community/templates/confirm_delete.html | 2 +- community/urls.py | 5 +-- dev_requirements.txt | 3 +- events/urls.py | 34 +++++++++++-------- joboffers/urls.py | 9 ++--- news/admin.py | 7 ++-- news/urls.py | 24 ++++--------- pull_request_template.md | 8 ++--- pyarweb/settings/base.py | 2 +- pyarweb/urls.py | 24 ++++++------- pycompanies/admin.py | 7 ++-- pycompanies/urls.py | 22 ++++++------ .../fonts/glyphicons-halflings-regular.svg | 2 +- .../css/autoSuggest-grappelli.css | 14 ++++---- static/jquery-autosuggest/css/autoSuggest.css | 16 ++++----- templates/account/password_reset.html | 6 ++-- templates/account/password_reset_done.html | 4 +-- templates/events/event_form.html | 2 +- templates/jobs/jobs_by_user.html | 6 ++-- templates/registration/activate.html | 4 +-- .../registration/activation_complete.html | 4 +-- templates/registration/login.html | 4 +-- templates/registration/logout.html | 4 +-- .../registration/registration_complete.html | 4 +-- templates/registration/registration_form.html | 4 +-- 31 files changed, 133 insertions(+), 121 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9b98caf1..d2c0a664 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -56,9 +56,14 @@ jobs: - name: Check Code Style uses: pre-commit/action@v3.0.1 + - name: Check for Django migrations + run: | + python manage.py makemigrations --dry-run --check + - name: Run migrations run: | python manage.py migrate + - name: Run tests run: | pytest -v diff --git a/.github/workflows/upload_to_dockerhub.yaml b/.github/workflows/upload_to_dockerhub.yaml index a476e3e6..178bcc76 100644 --- a/.github/workflows/upload_to_dockerhub.yaml +++ b/.github/workflows/upload_to_dockerhub.yaml @@ -20,19 +20,19 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v3 - + - name: Log in to Docker Hub uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: my-docker-hub-namespace/my-docker-hub-repository - + - name: Build and push Docker image uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89d4b5cd..d192ae2d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,11 @@ repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: check-merge-conflict + - id: debug-statements + - repo: https://github.com/pycqa/flake8 rev: 7.1.1 hooks: @@ -13,3 +20,8 @@ repos: - id: pyupgrade args: [--py39-plus] + - repo: https://github.com/adamchainz/django-upgrade + rev: "1.22.2" + hooks: + - id: django-upgrade + args: [--target-version, "3.2"] diff --git a/INSTALLATION.md b/INSTALLATION.md index 7a8771de..3b0c3492 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -1,3 +1,3 @@ -## Guia de instalación +## Guia de instalación Seguí los pasos en nuestra wiki: https://github.com/PyAr/pyarweb/wiki/Instalacion-con-Docker diff --git a/community/templates/account/custom_captcha.html b/community/templates/account/custom_captcha.html index 5411a950..eb584999 100644 --- a/community/templates/account/custom_captcha.html +++ b/community/templates/account/custom_captcha.html @@ -7,8 +7,8 @@
captcha {% if audio %} -
diff --git a/community/urls.py b/community/urls.py index aa410426..abfa1fce 100644 --- a/community/urls.py +++ b/community/urls.py @@ -1,7 +1,8 @@ -from django.conf.urls import patterns, url +from django.urls import re_path +from django.conf.urls import patterns urlpatterns = patterns( '', - url(r'^', 'community.views.homepage', name='homepage'), + re_path(r'^', 'community.views.homepage', name='homepage'), ) diff --git a/dev_requirements.txt b/dev_requirements.txt index 112c8c8f..93c10b9b 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -5,4 +5,5 @@ factory-boy==3.2.1 requests-mock==1.9.3 ipython==8.10.0 ipdb==0.13.9 -flake8==4.0.1 \ No newline at end of file +flake8==4.0.1 +pre-commit==4.0.1 diff --git a/events/urls.py b/events/urls.py index 1402552a..090a8e5a 100644 --- a/events/urls.py +++ b/events/urls.py @@ -16,23 +16,27 @@ ReportEventView) urlpatterns = [ - re_path(r'^$', EventList.as_view(), name='events_list_all'), - re_path(r'^rss$', EventsFeed(), name='events_feed'), - re_path(r'^(?P\d+)/$', EventDetail.as_view(), name='detail'), - re_path(r'^add/$', EventCreate.as_view(), name='add'), - re_path(r'^(?P\d+)/editar/$', EventUpdate.as_view(), name='edit'), - re_path(r'^(?P\d+)/borrar/$', EventDelete.as_view(), name='delete'), + path('', EventList.as_view(), name='events_list_all'), + path('rss', EventsFeed(), name='events_feed'), + path('/', EventDetail.as_view(), name='detail'), + path('add/', EventCreate.as_view(), name='add'), + path('/editar/', EventUpdate.as_view(), name='edit'), + path('/borrar/', EventDelete.as_view(), name='delete'), re_path(r'^(?P[\w-]+)/$', DetailView.as_view(model=Event), name='event_slug'), # Event Registration Management - re_path(r'^(?P\d+)/inscribirse/$', EventParticipationCreate.as_view(), name='register'), - re_path(r'^(?P\d+)/inscriptos/$', EventParticipationList.as_view(), name='registered'), - re_path(r'^(?P\d+)/inscriptos/csv/$', EventParticipationDownload.as_view(), - name='registered_csv'), - re_path(r'^(?P\d+)/inscripcion/(?P\d+)/$', - EventParticipationDetail.as_view(), - name='registration'), - re_path(r'^(?P\d+)/inscripcion/(?P\d+)/borrar/$', - EventParticipationDelete.as_view(), name='unregister'), + path('/inscribirse/', EventParticipationCreate.as_view(), name='register'), + path('/inscriptos/', EventParticipationList.as_view(), name='registered'), + path('/inscriptos/csv/', EventParticipationDownload.as_view(), name='registered_csv'), + path( + '/inscripcion//', + EventParticipationDetail.as_view(), + name='registration' + ), + path( + '/inscripcion//borrar/', + EventParticipationDelete.as_view(), + name='unregister' + ), path('/reportar/', ReportEventView.as_view(), name='report'), ] diff --git a/joboffers/urls.py b/joboffers/urls.py index a10548a7..2405f206 100644 --- a/joboffers/urls.py +++ b/joboffers/urls.py @@ -1,3 +1,4 @@ +from django.urls import path from django.urls import re_path from .views import ( DownloadAnalyticsAsCsv, JobOfferAdminView, JobOfferAnalyticsView, JobOfferApproveView, @@ -8,10 +9,10 @@ urlpatterns = [ - re_path(r'^$', JobOfferListView.as_view(), name='list'), - re_path(r'^admin/$', JobOfferAdminView.as_view(), name='admin'), - re_path(r'^nueva/$', JobOfferCreateView.as_view(), name='add'), - re_path(r'^rss/$', JobOffersFeed(), name='feed'), + path('', JobOfferListView.as_view(), name='list'), + path('admin/', JobOfferAdminView.as_view(), name='admin'), + path('nueva/', JobOfferCreateView.as_view(), name='add'), + path('rss/', JobOffersFeed(), name='feed'), re_path(r'^(?P[\w-]+)/rechazar/$', JobOfferRejectView.as_view(), name='reject'), re_path(r'^(?P[\w-]+)/aceptar/$', JobOfferApproveView.as_view(), name='approve'), re_path( diff --git a/news/admin.py b/news/admin.py index b06ff83f..a4ad023a 100644 --- a/news/admin.py +++ b/news/admin.py @@ -1,8 +1,9 @@ from django import forms from django.contrib import admin -from .models import NewsArticle from django_summernote.widgets import SummernoteWidget +from .models import NewsArticle + class NewsAdminForm(forms.ModelForm): class Meta: @@ -11,8 +12,6 @@ class Meta: widgets = {'body': SummernoteWidget()} +@admin.register(NewsArticle) class NewsAdmin(admin.ModelAdmin): form = NewsAdminForm - - -admin.site.register(NewsArticle, NewsAdmin) diff --git a/news/urls.py b/news/urls.py index 81caa905..03e0fe51 100644 --- a/news/urls.py +++ b/news/urls.py @@ -1,6 +1,6 @@ from django.contrib.auth.decorators import login_required from django.views.generic.detail import DetailView -from django.urls import re_path +from django.urls import path from .models import NewsArticle from .views import ( @@ -12,20 +12,10 @@ ) urlpatterns = [ - re_path(r'^$', NewsArticleList.as_view(), - name='news_list_all'), - re_path(r'^rss$', NewsFeed(), - name='news_feed'), - re_path(r'^add/$', - login_required(NewsArticleCreate.as_view()), - name='news_add'), - re_path(r'^(?P\d+)/$', - DetailView.as_view(model=NewsArticle), - name='news_view'), - re_path(r'^(?P\d+)/delete/$', - login_required(NewsArticleDelete.as_view()), - name='news_delete'), - re_path(r'^(?P\d+)/update/$', - login_required(NewsArticleUpdate.as_view()), - name='news_update'), + path('', NewsArticleList.as_view(), name='news_list_all'), + path('rss', NewsFeed(), name='news_feed'), + path('add/', login_required(NewsArticleCreate.as_view()), name='news_add'), + path('/', DetailView.as_view(model=NewsArticle), name='news_view'), + path('/delete/', login_required(NewsArticleDelete.as_view()), name='news_delete'), + path('/update/', login_required(NewsArticleUpdate.as_view()), name='news_update'), ] diff --git a/pull_request_template.md b/pull_request_template.md index 6922ec85..b62b24ec 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -2,8 +2,8 @@ ## Cambios propuestos: -- -- +- +- ## Temas tratados: @@ -12,8 +12,8 @@ ## Pruebas realizadas: -- -- +- +- ## Cómo probar los cambios: diff --git a/pyarweb/settings/base.py b/pyarweb/settings/base.py index 56539cf1..ce437b62 100644 --- a/pyarweb/settings/base.py +++ b/pyarweb/settings/base.py @@ -97,7 +97,7 @@ DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'NAME': os.environ.get('DB_NAME', os.environ.get("POSTGRES_DB", "pyarweb")), 'USER': os.environ.get('DB_USER', os.environ.get("POSTGRES_USER", "postgres")), 'PASSWORD': os.environ.get('DB_PASS', os.environ.get("POSTGRES_PASSWORD", "")), diff --git a/pyarweb/urls.py b/pyarweb/urls.py index bbbaecfd..631f0647 100644 --- a/pyarweb/urls.py +++ b/pyarweb/urls.py @@ -2,8 +2,8 @@ import re from django.conf import settings -from django.conf.urls import include from django.contrib import admin +from django.urls import include, path from django.urls import re_path from django.views.static import serve @@ -15,20 +15,20 @@ app_name = 'pyarweb' urlpatterns = [ - re_path(r'^irc/$', irc, name='irc'), - re_path(r'^buscador/$', buscador, name='buscador'), + path('irc/', irc, name='irc'), + path('buscador/', buscador, name='buscador'), - re_path(r'^$', homepage, name='homepage'), + path('', homepage, name='homepage'), - re_path(r'^noticias/', include('news.urls')), - re_path(r'^empresas/', include(('pycompanies.urls', 'pycompanies'), namespace='companies')), - re_path(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), - re_path(r'^summernote/', include('django_summernote.urls')), + path('noticias/', include('news.urls')), + path('empresas/', include(('pycompanies.urls', 'pycompanies'), namespace='companies')), + path('taggit_autosuggest/', include('taggit_autosuggest.urls')), + path('summernote/', include('django_summernote.urls')), re_path(r'^admin/', admin.site.urls), - re_path(r'^accounts/', include('allauth.urls')), - re_path(r'^eventos/', include(('events.urls', 'events'), namespace='events')), - re_path(r'^captcha/', include('captcha.urls')), - re_path(r'^trabajo/', include(('joboffers.urls', 'joboffers'), namespace='joboffers')), + path('accounts/', include('allauth.urls')), + path('eventos/', include(('events.urls', 'events'), namespace='events')), + path('captcha/', include('captcha.urls')), + path('trabajo/', include(('joboffers.urls', 'joboffers'), namespace='joboffers')), # no puedo usar el static porque no funcia en produccion y en prod django esta # sirviendo los archivos estaticos. Esto es sacado del codigo de la funcion. diff --git a/pycompanies/admin.py b/pycompanies/admin.py index aba48486..17ca154c 100644 --- a/pycompanies/admin.py +++ b/pycompanies/admin.py @@ -1,15 +1,14 @@ from django.contrib import admin + from .models import Company, UserCompanyProfile +@admin.register(UserCompanyProfile) class UserCompanyProfileAdmin(admin.ModelAdmin): search_fields = ('company__name', ) autocomplete_fields = ('user', 'company') +@admin.register(Company) class CompanyAdmin(admin.ModelAdmin): search_fields = ('name', ) - - -admin.site.register(Company, CompanyAdmin) -admin.site.register(UserCompanyProfile, UserCompanyProfileAdmin) diff --git a/pycompanies/urls.py b/pycompanies/urls.py index 576a12bf..731ebcdb 100644 --- a/pycompanies/urls.py +++ b/pycompanies/urls.py @@ -1,4 +1,4 @@ -from django.urls import re_path +from django.urls import path from .views import ( CompanyAdminView, @@ -15,14 +15,14 @@ app_name = 'pycompanies' urlpatterns = [ - re_path(r'^$', CompanyListView.as_view(), name='company_list_all'), - re_path(r'^(?P\d+)/$', CompanyDetailView.as_view(), name='detail'), - re_path(r'^agregar/$', CompanyCreateView.as_view(), name='add'), - re_path(r'^(?P\d+)/editar/$', CompanyUpdateView.as_view(), name='edit'), - re_path(r'^(?P\d+)/eliminar/$', CompanyDeleteView.as_view(), name='delete'), - re_path(r'^(?P\d+)/asociar/$', CompanyAssociateView.as_view(), name='associate'), - re_path(r'^asociarme/$', CompanyAssociationListView.as_view(), name='association_list'), - re_path(r'^admin/$', CompanyAdminView.as_view(), name='admin'), - re_path(r'^(?P\d+)/desasociar/$', CompanyDisassociateView.as_view(), name='disassociate'), - re_path(r'^(?P\d+)/analitica/$', CompanyAnalyticsView.as_view(), name='analytics') + path('', CompanyListView.as_view(), name='company_list_all'), + path('/', CompanyDetailView.as_view(), name='detail'), + path('agregar/', CompanyCreateView.as_view(), name='add'), + path('/editar/', CompanyUpdateView.as_view(), name='edit'), + path('/eliminar/', CompanyDeleteView.as_view(), name='delete'), + path('/asociar/', CompanyAssociateView.as_view(), name='associate'), + path('asociarme/', CompanyAssociationListView.as_view(), name='association_list'), + path('admin/', CompanyAdminView.as_view(), name='admin'), + path('/desasociar/', CompanyDisassociateView.as_view(), name='disassociate'), + path('/analitica/', CompanyAnalyticsView.as_view(), name='analytics') ] diff --git a/static/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.svg b/static/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.svg index e3e2dc73..25691af8 100644 --- a/static/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.svg +++ b/static/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.svg @@ -226,4 +226,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/static/jquery-autosuggest/css/autoSuggest-grappelli.css b/static/jquery-autosuggest/css/autoSuggest-grappelli.css index 5ea42f87..5ae0ac96 100644 --- a/static/jquery-autosuggest/css/autoSuggest-grappelli.css +++ b/static/jquery-autosuggest/css/autoSuggest-grappelli.css @@ -136,20 +136,20 @@ li.as-result-item.active { color: #000; } -li.as-result-item em { - font-style: normal; - background: #444; +li.as-result-item em { + font-style: normal; + background: #444; padding: 0 2px; color: #fff; } -li.as-result-item.active em { - background: #253f7a; +li.as-result-item.active em { + background: #253f7a; color: #fff; } /* Webkit Hacks */ -@media screen and (-webkit-min-device-pixel-ratio:0) { +@media screen and (-webkit-min-device-pixel-ratio:0) { ul.as-selections { border-top-width: 2px; } @@ -186,7 +186,7 @@ ul.as-selections li.as-selection-item a.as-close { } /* Firefox 3.0 Hacks */ -ul.as-list, x:-moz-any-link, x:default { +ul.as-list, x:-moz-any-link, x:default { border: 1px solid #888; } BODY:first-of-type ul.as-list, x:-moz-any-link, x:default { /* Target FF 3.5+ */ diff --git a/static/jquery-autosuggest/css/autoSuggest.css b/static/jquery-autosuggest/css/autoSuggest.css index 971e22e8..42045546 100644 --- a/static/jquery-autosuggest/css/autoSuggest.css +++ b/static/jquery-autosuggest/css/autoSuggest.css @@ -2,7 +2,7 @@ fieldset.module .tags{ overflow: visible; } -fieldset.module .row:before, fieldset.module .row:after { content: "\0020"; display: block; height: 0; visibility: hidden; } +fieldset.module .row:before, fieldset.module .row:after { content: "\0020"; display: block; height: 0; visibility: hidden; } fieldset.module .row:after { clear: both; } fieldset.module .row { zoom: 1; } @@ -139,20 +139,20 @@ li.as-result-item.active { color: #000; } -li.as-result-item em { - font-style: normal; - background: #444; +li.as-result-item em { + font-style: normal; + background: #444; padding: 0 2px; color: #fff; } -li.as-result-item.active em { - background: #253f7a; +li.as-result-item.active em { + background: #253f7a; color: #fff; } /* Webkit Hacks */ -@media screen and (-webkit-min-device-pixel-ratio:0) { +@media screen and (-webkit-min-device-pixel-ratio:0) { ul.as-selections { border-top-width: 2px; } @@ -189,7 +189,7 @@ ul.as-selections li.as-selection-item a.as-close { } /* Firefox 3.0 Hacks */ -ul.as-list, x:-moz-any-link, x:default { +ul.as-list, x:-moz-any-link, x:default { border: 1px solid #888; } BODY:first-of-type ul.as-list, x:-moz-any-link, x:default { /* Target FF 3.5+ */ diff --git a/templates/account/password_reset.html b/templates/account/password_reset.html index 359866e5..afb6b325 100644 --- a/templates/account/password_reset.html +++ b/templates/account/password_reset.html @@ -16,15 +16,15 @@

{% trans "Password Reset" %}

{% if user.is_authenticated %} {% include "account/snippets/already_logged_in.html" %} {% endif %} - +

{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}

- +
{% csrf_token %} {{ form|crispy }}
- +

{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}

diff --git a/templates/account/password_reset_done.html b/templates/account/password_reset_done.html index f2bb2038..455a7ff5 100644 --- a/templates/account/password_reset_done.html +++ b/templates/account/password_reset_done.html @@ -10,11 +10,11 @@

{% trans "Password Reset" %}

- + {% if user.is_authenticated %} {% include "account/snippets/already_logged_in.html" %} {% endif %} - +

{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}

diff --git a/templates/events/event_form.html b/templates/events/event_form.html index df88316f..37d3a910 100644 --- a/templates/events/event_form.html +++ b/templates/events/event_form.html @@ -47,7 +47,7 @@

{% block javascripts %} - + {{ form.media.js }} {% endblock %} diff --git a/templates/jobs/jobs_by_user.html b/templates/jobs/jobs_by_user.html index 8f5d4419..d4e60c0d 100644 --- a/templates/jobs/jobs_by_user.html +++ b/templates/jobs/jobs_by_user.html @@ -18,7 +18,7 @@

You dont have company to edit

Add your company {% else %} - {% for company in companies %} + {% for company in companies %}

{{ company.link }}

{{company.link}} @@ -28,7 +28,7 @@

{{ company.link }}

- +
@@ -46,7 +46,7 @@

{{ company.link }}

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/activate.html b/templates/registration/activate.html index 9b467deb..01921e2c 100644 --- a/templates/registration/activate.html +++ b/templates/registration/activate.html @@ -11,7 +11,7 @@

Error al activar su cuenta con el key {{ activation_key }}.

- + @@ -29,7 +29,7 @@

Error al activar su cuenta con el key {{ activation_key }}.

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/activation_complete.html b/templates/registration/activation_complete.html index 599e5931..394a5c9c 100644 --- a/templates/registration/activation_complete.html +++ b/templates/registration/activation_complete.html @@ -11,7 +11,7 @@

Su cuenta ha sido activada satisfactoriamente.

- + @@ -29,7 +29,7 @@

Su cuenta ha sido activada satisfactoriamente.

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/login.html b/templates/registration/login.html index 14e34469..f6ce4eee 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -16,7 +16,7 @@
- + @@ -34,7 +34,7 @@

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/logout.html b/templates/registration/logout.html index c58f6e58..6378a573 100644 --- a/templates/registration/logout.html +++ b/templates/registration/logout.html @@ -11,7 +11,7 @@

Sesion cerrada, nos vemos luego!

- + @@ -29,7 +29,7 @@

Sesion cerrada, nos vemos luego!

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html index 41ccb8ee..c2e07734 100644 --- a/templates/registration/registration_complete.html +++ b/templates/registration/registration_complete.html @@ -11,7 +11,7 @@

Proceso completo! Un email ha sido envíado para confirmar su registro.

- + @@ -29,7 +29,7 @@

Proceso completo! Un email ha sido envíado para confirmar su registro.

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html index bcc0b68d..6e2e9faf 100644 --- a/templates/registration/registration_form.html +++ b/templates/registration/registration_form.html @@ -17,7 +17,7 @@
- + @@ -35,7 +35,7 @@

Próximos eventos

- {% for i in 4|get_range %} + {% for i in 4|get_range %}

PyCon Argentina

23 de Agosto de 2012 | 20:00 hs | Audotorio UnQui

From 923681a61a72d05b7ea6f394167189883a79138f Mon Sep 17 00:00:00 2001 From: "Eduardo Enriquez (eduzen)" Date: Thu, 16 Jan 2025 22:08:30 +0100 Subject: [PATCH 2/2] Missing migration for event --- .github/workflows/test.yaml | 8 ++++++++ .../0007_alter_eventparticipation_seniority.py | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 events/migrations/0007_alter_eventparticipation_seniority.py diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d2c0a664..675474ad 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -48,6 +48,14 @@ jobs: run: | sudo apt-get install -y libpq-dev libxml2-dev libxslt1-dev + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/dev_requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/events/migrations/0007_alter_eventparticipation_seniority.py b/events/migrations/0007_alter_eventparticipation_seniority.py new file mode 100644 index 00000000..54a8ebfe --- /dev/null +++ b/events/migrations/0007_alter_eventparticipation_seniority.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.19 on 2025-01-16 21:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0006_alter_event_slug'), + ] + + operations = [ + migrations.AlterField( + model_name='eventparticipation', + name='seniority', + field=models.CharField(blank=True, choices=[('Trainee', 'Trainee'), ('Junior', 'Junior'), ('Semi Senior', 'Semi Senior'), ('Senior', 'Senior'), ('Guido', 'Soy Guido Van Rossum')], default='', max_length=100, verbose_name='experiencia'), + ), + ]