Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#7749 closed (duplicate)

local flavor import example bug

Reported by: Mihai Damian Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: localflavor
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


This example won't work as expected:

from django.contrib.localflavor import fr

class MyForm(forms.Form):
    my_french_phone_no = fr.forms.FRPhoneNumberField()

as module fr doesn't appear to have a forms object.

You would need something like

from import forms as fr_forms


import forms


Valid for all other localflavor modules

Change History (2)

comment:1 Changed 10 years ago by Karen Tracey <kmtracey@…>

Resolution: duplicate
Status: newclosed

comment:2 Changed 7 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top