Skip to main content

No project description provided

Project description

AutoCreateApp - Django Project Automation

AutoCreateApp is a Python package that automates the process of creating Django projects with multiple apps and models based on user input. With this tool, you can quickly set up Django projects without manually creating apps, models, and migration files.

Installation

You can install AutoCreateApp via pip:

pip install autocreateapp

Usage

Once AutoCreateApp is installed, you can use the autocreateapp command to create your Django project interactively.

autocreateapp

Follow the prompts to provide the project name, the number of apps to create, app names, model names, and model fields. The package will automatically generate the necessary files and set up the Django project with your specified apps and models.

How It Works

AutoCreateApp uses Python's built-in os module to create and navigate directories, and it utilizes Django's command-line tools (django-admin and manage.py) to create projects, apps, and migration files.

The add_app_to_installed_apps function ensures that the newly created apps are added to the INSTALLED_APPS list in the Django project's settings.py file.

The package also supports interactive model creation, allowing you to specify model names and their respective fields, such as strings (CharField) or integers (IntegerField).

Example

Here's a simple example of how to use AutoCreateApp:

# Create a new Django project with two apps and models
autocreateapp
Enter the name of your Django project: myproject
How many apps do you want to create? 2

Enter the name of your app: app1
Enter the name of your app: app2

Enter the name of your first model in app1: MyModel
Enter model fields (comma-separated, e.g., name:str, age:int): name:str, age:int

Enter the name of your first model in app2: AnotherModel
Enter model fields (comma-separated, e.g., title:str, description:str): title:str, description:str

After the above steps, you'll have a new Django project called myproject, with two apps (app1 and app2), each containing one model (MyModel and AnotherModel) with the specified fields.

License

AutoCreateApp is distributed under the MIT License. See the LICENSE file for more information.

Contributions

Contributions are welcome! If you have any suggestions, bug reports, or improvements, please open an issue or submit a pull request.


Happy coding! 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autocreateapp-0.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

autocreateapp-0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file autocreateapp-0.4.tar.gz.

File metadata

  • Download URL: autocreateapp-0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for autocreateapp-0.4.tar.gz
Algorithm Hash digest
SHA256 365becc906260fe1e548677932b6f0e88f3bcc5323fffbb57c0cd518564150ac
MD5 2868dfd5df68d3bbef69eda3c69d2e8c
BLAKE2b-256 12c840861f7ce72194aa108cbb907656e2b394edd8e24671afbac55ce5d5f771

See more details on using hashes here.

File details

Details for the file autocreateapp-0.4-py3-none-any.whl.

File metadata

  • Download URL: autocreateapp-0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for autocreateapp-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e5a96a435755f53a307e14fa87aa639b9aad93313dbc7ed838bfa934a6a1003a
MD5 212ca638b4c02f915b2481f030097bc3
BLAKE2b-256 8b7b99125e33b0a0fb2e41ef25f35a7c9a83a450150b7167d91845417b9ab654

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page