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

fix language for 'add another' #5

Merged
merged 2 commits into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 2 additions & 3 deletions examples/project/app/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_render_fieldset(self):


def test_render_inline_fieldset(self):
InlineForm = inlineformset_factory(Student, Note,
InlineForm = inlineformset_factory(Student, Note,
fields=('subject', 'value',), exclude=('pk',), can_delete=False,
)
context = Context({'form': self.form, 'form_inline': InlineForm()})
Expand Down Expand Up @@ -95,5 +95,4 @@ def test_render_inline_fieldset(self):
## inline
self.assertInHTML('<h2 style="background-color: #42945c">Note des eleves</h2>', rendered)
self.assertInHTML('<input type="hidden" name="notes-TOTAL_FORMS" value="3" id="id_notes-TOTAL_FORMS">', rendered)
self.assertInHTML('<a href="#" id="add-info">Ajout supplémentaire</a>', rendered)

self.assertInHTML('<a href="#" id="add-info">Add another</a>', rendered)
2 changes: 1 addition & 1 deletion examples/project/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/

LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'en-en'

TIME_ZONE = 'UTC'

Expand Down
4 changes: 3 additions & 1 deletion examples/project/project/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from django.contrib import admin
from django.urls import path

from app.views import home

urlpatterns = [
path('admin/', admin.site.urls),
path('', home),
]