from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns

urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),
    path('admin/', admin.site.urls),
]

urlpatterns += i18n_patterns(
    path('', include('apps.core.urls', namespace='core')),
    prefix_default_language=False,
)

if settings.CAREERS_ENABLED:
    urlpatterns += i18n_patterns(
        path('carrieres/', include('apps.careers.urls', namespace='careers')),
        prefix_default_language=False,
    )

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
