Django setlang view does not exist - what could be the problem?

I want to create a button to choose between two languages, but when I'm clicking on it I am encountering error saying that view does not exist, what could be the problem?

Error: DatabaseError at /en/i18n/setlang/

ORA-00942: table or view does not exist

Template:

{% get_current_language as LANG %}
              {% get_available_languages as LANGUAGES %}
              {% get_language_info_list for LANGUAGES as languages %}
              
              {% for language in languages %}
                <form action="{% url '/i18n/' %}" method="post" id="form_{{ language.code }}" style="display:inline!important;">
                {% csrf_token %}
                  <input name="next" type="hidden" value="{{ redirect_to }}" />
                  <input name="language" type="hidden" value="{{ language.code }}" />
                </form>
                <button class="lang-button" type="submit" form="form_{{ language.code }}" value="Submit">[{{ language.code }}]</button>
              {% endfor %}

URLS:

urlpatterns = [
    # url(r'', include('label_uwm.urls')),
]   

urlpatterns += i18n_patterns(
    url(r'', include('label_uwm.urls')),
    url(r'i18n/', include('django.conf.urls.i18n')),
) 

SETTINGS:

LANGUAGE_CODE = 'pl'


LANGUAGES = (

    ('pl', _('Polish')),
    ('en', _('English')),
    
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.i18n',
)

MIDDLEWARE = (
    'django.middleware.locale.LocaleMiddleware',
[...])
Back to Top