Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anthhon/modelify
Web Django models generator
https://github.com/anthhon/modelify
Last synced: about 2 months ago
JSON representation
Web Django models generator
- Host: GitHub
- URL: https://github.com/anthhon/modelify
- Owner: Anthhon
- Created: 2023-09-23T05:41:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-08T00:33:41.000Z (over 1 year ago)
- Last Synced: 2023-10-09T00:23:17.607Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://anthhon.github.io/Modelify/
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Project logo](logo.png)
# Modelify: Simplifying Django Model Creation
`Modelify` is a user-friendly web tool designed to streamline the creation and building process of model.py files in Django applications. This tool features a simple web interface that utilizes `JavaScript` to generate Django model code effortlessly.
# Features/Project Roadmap
- [X] Generate basic code to `classes` and `fields`
- [ ] Implement error checking for empty or invalid fields/options# Getting Started
To access Modelify and start creating your Django models, [visit the Modelify Webpage.](https://anthhon.github.io/Modelify/)
### How to Use Modelify
- Create a New Class:
- Click on the "New Class" button to initiate the creation of a new class.
- Enter the class name when prompted. Ensure it is unique and meaningful.### Add Fields:
- Click the "New Field" button within the class section to add fields to your class.
- Specify the field name, type, size (if applicable), default value, and other properties as needed.
- For Foreign Key relationships, select the related class from the dropdown menu.### Delete Classes or Fields:
- To remove a class or field, click the trash icon next to the class or field you want to delete.
### Generate Django Model Code:
- Once you have defined your classes and fields, click the "Generate Models" button.
- The generated Django model code will be displayed in the code section below.# Example generated code:
```python
class Products(models.Model):
name = models.CharField(max_length=64, primary_key=False, null=False, blank=False, unique=True)
type = models.ForeignKey(ProductsTypes, on_delete=models.CASCADE, primary_key=False, null=False, blank=False, unique=False)def __str__(self):
return self.Productsclass ProductsTypes(models.Model):
type = models.CharField(max_length=32, primary_key=False, null=False, blank=False, unique=True)def __str__(self):
return self.ProductsTypes```
# License
This program is distributed under the MIT License. See the [LICENSE](./LICENSE) file for more details.
Feel free to customize the documentation further based on your project's specific requirements and audience. Let me know if you need more assistance!