All Projects → josemlp91 → Staruml Django

josemlp91 / Staruml Django

Licence: mit
This extension for StarUML(http://staruml.io) support to generate Django model code from UML model. Install this extension from Extension Manager of StarUML. Based on (https://github.com/niklauslee/staruml-python)

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Staruml Django

Django S3 Like Storage
Your Own Amazon S3 Django Storage
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Django On Docker Letsencrypt
Securing a Containerized Django Application with Let's Encrypt
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Django Djeddit
Minimalistic Reddit clone developed as a Django reusable app
Stars: ✭ 32 (-5.88%)
Mutual labels:  django
Django Spectator
A Django app to track book reading, and event going.
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Bedrock
Making mozilla.org awesome, one pebble at a time
Stars: ✭ 953 (+2702.94%)
Mutual labels:  django
Supervisoradmin
supervisor admin is a centralized management tools written by django
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Framework
The Framework is a set of components and tools which brings the user an interface (GUI / API) to setup, extend and manage an Open vStorage platform.
Stars: ✭ 27 (-20.59%)
Mutual labels:  django
Django Two Factor Auth
Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
Stars: ✭ 967 (+2744.12%)
Mutual labels:  django
Django Auth Example
Sample project for my talk at DjangoCongress JP 2018.
Stars: ✭ 30 (-11.76%)
Mutual labels:  django
Recyclomedia
Recyclomedia is a digital platform that aims to save the planet from pollution which is the major threat to the functioning of earth.
Stars: ✭ 32 (-5.88%)
Mutual labels:  django
Django Starcross Gallery
Django Gallery app with justified image layout, infinite scrolling and drag & drop support
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Django Graph Api
Pythonic implementation of the GraphQL specification for the Django Web Framework.
Stars: ✭ 29 (-14.71%)
Mutual labels:  django
Django Countries
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.
Stars: ✭ 962 (+2729.41%)
Mutual labels:  django
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Lunch With Channels
Stars: ✭ 32 (-5.88%)
Mutual labels:  django
Book Code
《Django开发从入门到实战》书籍各章节源代码
Stars: ✭ 28 (-17.65%)
Mutual labels:  django
Note App Django Vue Javascript
An example of a note application using django and vue.js
Stars: ✭ 31 (-8.82%)
Mutual labels:  django
Sujinlee.me
Sujin's Personal Website
Stars: ✭ 33 (-2.94%)
Mutual labels:  django
Djangorestframework Mvt
Serve Mapbox Vector Tiles with Django and Postgres
Stars: ✭ 33 (-2.94%)
Mutual labels:  django
Django Precise Bbcode
A Django application for parsing, displaying and editing BBCodes-based text contents.
Stars: ✭ 31 (-8.82%)
Mutual labels:  django

Spanish Translation

StartUML extension to auto generate Django Models

Features

  • Auto-generate Django Model Class.
  • Auto-generate attributes with the suitable type, using standard Djando Model Field, provided by Django ORM.
  • Generate inheritance, (if not exist by default models.Model).
  • Generate relationship, using cardinality, create suitable fields, OneToOne, ForeingKey and ManyToMany.
  • Auto add attributes in Meta models, using tags.
  • Auto add aditional params to model attributes and model relationships fields using defined tags.

Requirements

To run auto-generate field with suitable Django Mode Field, is necesary to have a diagram with a class for each basic type loaded.

You could download this scheme with basic class types

Basic Types

  • string: models.CharField
  • text: models.TextField
  • integer: models.IntegerField
  • decimal: models.DecimalField
  • boolean: models.BooleanField
  • date: models.DateField
  • datetime: models.DateTimeField
  • email: models.EmailField
  • file: models.FileField

Installation

1- Install StarUML, download page.

2- Download or clone this repo.

3- Copy repo files to StarUML extension user folder.

  • MacOS: ~/Library/Application Support/StarUML/extensions/user/staruml-django

  • Windows: C:\Users\<user>\AppData\Roaming\StarUML\extensions\user\staruml-django

  • Linux: ~/.config/StarUML/extensions/user/staruml-django

Usage

  1. Click the menu (Tools > Django Models > Generate Code...)
  2. Select a base model (or package) that will be generated to Django Models.
  3. Select a folder where generated Python source files (.py) will be placed.

Sample

AbstactStudent Model

#-*- coding: utf-8 -*-

from django.db import models

class AbstractStudent(models.Model):
    class Meta:
        verbose_name='foo'

    type = models.CharField()

Student Model

#-*- coding: utf-8 -*-

from django.db import models
from AbstractStudent import AbstractStudent

class Student(AbstractStudent):
    class Meta:
        verbose_name='student'

    name = models.CharField(max_length=1024, verbose_name='name', null=True)
    surname = models.CharField()
    birthdate = models.DateField()

    school = models.ForeingKey('School', on_delete=models.PROTECT)
    teachers = models.ManyToMany('Teacher')
    expedient = models.OneToOne('Expedient')

    @property
    def age(self, ):
        pass

Teacher Model

#-*- coding: utf-8 -*-

from django.db import models

class Teacher(models.Model):
    class Meta:
        pass

    name = models.CharField()
    speciality = models.CharField()

    school = models.ForeingKey('School', related_name='teachers', on_delete=models.PROTECT)

School Model

#-*- coding: utf-8 -*-

from django.db import models

class School(models.Model):
    class Meta:
        pass

    name = models.CharField()
    address = models.CharField()

Expedient Model

#-*- coding: utf-8 -*-
from django.db import models

class Expedient(models.Model):
    class Meta:
        pass

    qualification = None

Disclainer

This project is now in beta, not ready for production or profesional use. Use and modify by your own responsability.

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].