Skip to main content

Django Interactive Models

This app provides a CLI through the manage.py script to create models from the command line.

Usage:

Install the package into the virtualenv:

pip install django-interactive-models

Then, add the app to the INSTALLED_APPS in settings:

INSTALLED_APPS = [
    ...
    "interactive_models",
    ...
]

Then, you can finally run the models command like:

./manage.py models <app_name> <model_name> <field_name>:<field_type> ...

Check the usage by using the -h flag.

For example, this command:

./manage.py models my_app MyModel number:int text:text page_url:url creation_date:datetime

Will create a models.py file inside my_app with the fields number, text, page_url, creation_date with their corresponding django database fields.

Field types available:

This is the current list of accepted types and their mappings

  • auto -> AutoField,
  • bool -> BooleanField,
  • char -> CharField,
  • date -> DateField,
  • datetime -> DateTimeField,
  • email -> EmailField,
  • float -> FloatField,
  • int -> IntegerField,
  • slug -> SlugField,
  • text -> TextField,
  • time -> TimeField,
  • url -> URLField,
  • uuid -> UUIDField,

Running tests locally

Install test dependencies with

pip install ".[test]"

Then, run tests using pytest with:

pytest -v

Metadata

Release files for django-interactive-models 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-interactive-models 0.4.0
File Interpreter ABI Platform Actions
django_interactive_models-0.4.0-py3-none-any.whl Python 3 none any Details for django_interactive_models-0.4.0-py3-none-any.whl

Release files / django_interactive_models-0.4.0-py3-none-any.whl

Download URL django_interactive_models-0.4.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6490c9214ccd9faee3e9c2f63c0042c3640cc4c76f995f9dfdea16fd7a8a568
BLAKE2b-256 checksum
How to use checksums
84cfa6f7bd452c67b1b506071b8ca3844b02cdd8a0ff1075ec45df6f89d853a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for django-interactive-models 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page