Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#7749 closed (duplicate)

local flavor import example bug

Reported by: MihaiD 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: UI/UX:

Description

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 django.contrib.localflavor.fr import forms as fr_forms

or

import forms

in init.py

Valid for all other localflavor modules

Attachments (0)

Change History (2)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

comment:2 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.