Metadata-Version: 2.1
Name: django-short-text-field
Version: 0.2
Summary: A Django app which adds a ShortTextField model field, whichis like a TextField in the database and like a CharField informs.
Home-page: https://www.example.com/
Author: Andrew Foote
Author-email: footeandrew1@gmail.com
License: BSD License
Description: # Short Text Field for Django
        
        A very simple Django app that adds a `ShortTextField` model field class, which
        is treated like a `TextField` in the database (i.e. the data is stored in the
        database with the `text` rather than the `varchar` type, and the developer does
        not need to specify a `max_length`), but like a `CharField` in forms (i.e. it
        uses a single-line input). This is ideal for PostgreSQL, which recommends the
        'text' type in a wider variety of circumstances than other commonly-used
        database backends (see the [PostgreSQL docs]
        (https://www.postgresql.org/docs/9.1/static/datatype-character.html)).
        
        ## Usage
        
        1. Add `'short_text_field'` to your `INSTALLED_APPS` setting like this:
        
               INSTALLED_APPS = [
                   ...
            	     'short_text_field',
               ]
        
        2. Add a `ShortTextField` to a model like this:
        
               from short_text_field.models import ShortTextField
            
               ...
        
        	     class ExampleModel(models.Model):
        		       ...
        		       example_field = ShortTextField
        
        3. A model with a `ShortTextField` should be registered in the admin site using
           `short_text_field.admin.ModelAdmin`.
        
               admin.site.register(ExampleModel, short_text_field.admin.ModelAdmin)
        
            A subclass of this class will also work:
        
               class ExampleModelAdmin(short_text_field.admin.ModelAdmin):
                   model = ExampleModel
                   ...
        
               admin.site.register(ExampleModel, ExampleModelAdmin)
        
           If you have a hierarchy of `ModelAdmin` subclasses, you can still
           incorporate `short_text_field.admin.ModelAdmin` easily as a mixin:
        
               class ExampleModelAdmin2(short_text_field.admin.ModelAdmin, ExampleModelAdmin1):
                   model = ExampleModel
                   ...
        
               admin.site.register(ExampleModel, ExampleModelAdmin)
        
           You can also use a subclass of `short_text_field.admin.AdminSite` for the
           site, which will make `short_text_field.admin.ModelAdmin` the default
           `ModelAdmin` subclass to use for registering. In the simplest case, you can
           just set the `default_site` attribute of the `AdminConfig` class and then
           register all of your models in the normal way:
        
               from django.contrib.admin import apps
               import short_text_field.admin.AdminSite
        
               ...
        
               class ExampleAdminConfig(apps.AdminConfig):
                   ...
                   default_site = short_text_field.admin.AdminSite
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.1
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/markdown
