0

I migrated to django 1.5 and since I have a problem with {% url "localeurl_change_locale"%}.

In fact I have a form:

  <form id="ch_lg" method="POST" action="{% url "localeurl_change_locale" %}">
  {% csrf_token %}
      <select id="country-options" name="locale" onchange="$('#locale_switcher').submit()">
          {% for lang in LANGUAGES %}
              <option value="{{ lang.0 }}" {% ifequal lang.0 LANGUAGE_CODE %}selected="selected"{% endifequal %}>{{ lang.1 }}</option>
          {% endfor %}
      </select>
      <noscript>
          <input type="submit" value="Set" />
      </noscript>
  </form>  

It worked perfectly, but since the url change, I have a problem at the action {% url "localeurl_change_locale"%}.

After my research I don't understand what to do. Thank you to you

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195

1 Answers1

0

I found the answer ... I didn't add

LOCALE_PATHS = (
'/ path_project /',
)

in my settings.py

That'll teach me not to read carefully the new features. If this post can help others with the same problem.