Skip to content
Greek localflavor for django
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Country-specific Django helpers for Greece.

What's in the greek localflavor?

  • GRPostalCodeField: Greek Postal code field. The valid format is 5 digits and not starting with 0 or 9.
  • GRTaxNumberCodeField: Greek Tax Number code field. The valid format is 9 digits that pass a specific algorithm. You can add the allow_test_value kwarg to the field in order to allow the default test value of 000000000.
  • GRPhoneNumberField: Greek 10-digit phone number (could start with +30)
  • GRMobilePhoneNumberField: Same as GRPhoneNumberField but has to start with 69.

See the source code for full details.


To install please run

pip install git+git://


pip install


Just include the field you want and use it in your forms:

from django_localflavor_gr.forms import (GRPostalCodeField, GRTaxNumberCodeField)

To enable the 000000000 test value to the Tax Number field just pass True to allow_test_value:

afm=GRTaxNumberCodeField(allow_test_value=True, required=True,  )


In order to be able to test, a file was added in the root of the project tree and an empty django_localflavor_gr/ in order to include django_localflavor_gr as a django application.

This is a small modification of myusuf3 's solution on

To test, run

git clone
cd django-localflavor-gr test --settings=test_settings --pythonpath=.

About localflavors

Django's "localflavor" packages offer additional functionality for particular countries or cultures.

For example, these might include form fields for your country's postal codes, phone number formats or government ID numbers.

This code used to live in Django proper -- in django.contrib.localflavor -- but was separated into standalone packages in Django 1.5 to keep the framework's core clean.

For a full list of available localflavors, see


This app has been superseded by the newly created django-localflavor app which recombines all the different country locaflavors again (after having been removed from Django). Development and maintenance of this app has stopped and is only left online as a reminder for the users of those apps. It will be removed after grace period of 1 Django release (~spring 2014).

Something went wrong with that request. Please try again.