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

Example test suite url config added #119

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions tests/requirements/requirements_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ https://github.com/divio/djangocms-text-ckeditor/tarball/support/4.0.x#egg=djang
https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning
https://github.com/FidelityInternational/djangocms-version-locking/tarball/master#egg=djangocms-version-locking
https://github.com/django-cms/djangocms-moderation/tarball/master#egg=djangocms-moderation
https://github.com/FidelityInternational/djangocms-references/tarball/master#egg=djangocms-references
3 changes: 3 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"djangocms_versioning",
"djangocms_version_locking",
"djangocms_moderation",
"djangocms_references",
],
"DJANGOCMS_VERSIONING_ENABLE_MENU_REGISTRATION": False,
"MIGRATION_MODULES": {
Expand All @@ -22,6 +23,7 @@
"djangocms_versioning": None,
'djangocms_version_locking': None,
'djangocms_moderation': None,
'djangocms_references': None,
},
"LANGUAGES": (
("en", "English"),
Expand All @@ -30,6 +32,7 @@
("it", "Italiano"),
),
"DEFAULT_AUTO_FIELD": "django.db.models.AutoField",
"ROOT_URLCONF": "tests.urls",
}


Expand Down
23 changes: 23 additions & 0 deletions tests/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from django.conf import settings
from django.conf.urls import include, re_path
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.i18n import JavaScriptCatalog
from django.views.static import serve


admin.autodiscover()

urlpatterns = [
re_path(r"^media/(?P<path>.*)$", serve, {"document_root": settings.MEDIA_ROOT, "show_indexes": True}), # NOQA
re_path(r"^jsi18n/(?P<packages>\S+?)/$", JavaScriptCatalog.as_view()), # NOQA
]
i18n_urls = [
re_path(r"^admin/", admin.site.urls),
re_path(r"^", include("cms.urls"))
re_path(r"^", include('djangocms_references.urls')),
]

urlpatterns += i18n_patterns(*i18n_urls)
urlpatterns += staticfiles_urlpatterns()