Include needed for Python/Django
This isn't rocket science.
Create a constants file, say constants.txt.  Put name/value pairs in that file in an easily-parseable format.  For example name:value.  Write a small program in your language of choice (Python would be great for this).  This program reads in constants.txt, and then writes out an appropriate file for each of the languages you will be working with (like constants.py, constants.h, etc.)
For example, if constants.txt contained an entry of 'MODEL1_FIELD1_MAX_LENGTH: 20', then constants.h could contain an entry of the form '#define MODEL1_FIELD1_MAX_LENGTH 20', but constants.py would contain an entry of the form 'MODEL1_FIELD1_MAX_LENGTH=20'.  You get the picture.
Now make that little program be run automatically as part of your projects build process any time constants.txt is changed.
There you go--your constants kept in one file, yet always synchronized and available for any language you use.
First, let me preface this by saying I am brand new to both Python and Django.  I would like to be using a language I already know, like and prefer, alas the frameworks simply don't exist for them.  Bottom line, I'm no "pythonista."
At any rate, I'm on the first couple of pages of a Django tutorial, and am at the point of creating the data model.  Right away I see that the example hardcodes things like the max length of character fields right there in the model.  This is something I simply won't do, as this information will not only change often and be required in many places, but it will also be used when I code up backend applications in another programming language.
The critical issue is, I won't be using python for backend stuff.  I will be using another language.  Programs in that language will need access to things like the max length of character fields.
In any of the other languages I use, this is a simple matter.  I simply stick something like a max length in a file called MAXLENGTH, and include that file wherever I need it.  If max length ever needs to change (and it will), I change it in one place.  It is then changed in all other places, no matter what other languages are used.
I need this capability in Python/Django, or something which will achieve similar effect with minimal hassle.  I did find an import statement, but it doesn't seem to do exactly what I want (it seems to import Python code, but I can't use a Python-only solution here).
Note that I'm not likely to entertain exotic, complicated solutions involving lots of complicated declarations of classes and what not.  It's a simple problem, I need a simple solution.
Also, I would accept a solution in either Python, or Django (if Django has some special capability in this regard).
Much thanks.