GithubHelp home page GithubHelp logo

auvipy / uml-to-django Goto Github PK

View Code? Open in Web Editor NEW
23.0 1.0 5.0 176 KB

This tool automatically generates the Django model and admin interface from a UML class diagram.

Python 8.90% XSLT 91.10%

uml-to-django's Introduction

uml-to-django

This tool automatically generates the Django model and admin interface from a UML class diagram.

How does it look like?

uml-to-django can convert this diagram (drawn with ArgoUML):

No manual python/django coding was involved in this conversion, the default application is completely generated for you.

However you can customise it after conversion. Customisations won't be lost if you re-run uml-to-django to include new changes from your UML diagram to the django code.

It currently works from a class diagram saved as a XMI file. Most UML authoring tools (Visio, ArgoUML, , Altova UModel, Visual Paradigm...) can export their diagrams in that format.

Note that the current project has only been tested with diagrams generated with ArgoUML (version 0.26).

Configuration Please read the instructions for setting up and running uml-to-django.

Philosophy Promote collaborative and transparent data modeling

The main motivation behind this tool is to allow (UML) data modeling before and during the implementation of the database editing interface and your website. Other tools already allow you to do the opposite (i.e. generate a diagram from a Django model) but the point of UML is to collaboratively discuss, design and transform a model in a graphical form first and then implement it into a logical or physical model, not the opposite.

Therefore the main advantage offered by this tool is that it allows you to always keep your diagram and your application synchronised; you don't need to manually update one each time the other has been modified since this process is fully automated and fast. This prevents the actual data model to be completely encapsulated and obscured by the technical implementation, typically making the developers the only people with the knowledge about the conceptualisation of the information system and its details.

Rapid application development for dummies

Another important advantage of this tool is that it lets people build and maintain an entire database and web-based interface without any programming or strong technical knowledge. If you are not too demanding regarding the aesthetics of the web interface you can go a long way simply by drawing your tables and fields on a diagram.

Delegate tasks to non-programmers

As a corollary it also allows developer to delegate some tasks (such as documenting the fields) to non-technical people since the information is not hard-coded into a source code with a strict syntax but easily accessible via a graphical interface.

Comments and contributions There is a discussion group about UML to Django for all your questions and constructive comments. I'll do my best to help however I cannot guarantee prompt responses.

Do not hesitate to let me know if you feel like contributing to the code to improve this tool.

uml-to-django's People

Contributors

auvipy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

uml-to-django's Issues

Where to obtain ArgoUML.

After about 45 minutes of searching I have come up blank on how to obtain ArgoUML (for the mac). There is a download link on the copy of the old tigris site, but it just points back to tigris which I gather has ceased to exist as a thing anymore.

Homebrew install on the mac doesnt work, as it looks like the install formula there was removed after tigris went down. There ARE some hits on google for links to those dodgy download aggregators (you know the one, the sites that make you jump through 20 hoops, then maybe lets you down something thats had malware inserted into the package.

So I'm mystified. How does one actually obtain this software? Particularly for a non java person like me that wouldnt know how to tell a maven from a marvin.

When aggregating to object to itself, code will break

What steps will reproduce the problem?
1. Create aggregation to object itself

What is the expected output? What do you see instead?

Error: One or more models did not validate:
toobackup.host: Reverse query name for field 'host' clashes with field
'Host.host'. Add a related_name argument to the definition for 'host'.


What version of the product are you using? On what operating system?

Django 1.1.1


Please provide any additional information below.

Into the file:
uml2dj/xmi2djmodels_generic.xsl

Change row 192 to:
<xsl:when test="$classid = $otherClassid">'self',
related_name='self_child'</xsl:when>

Original issue reported on code.google.com by [email protected] on 9 Feb 2010 at 10:17

problem with step nb 6 (can't find '__main__' module in 'uml2dj' ")

hi,
I am quite new to django but I liked the idea of generating the model from the 
UML and so I was looking forward to use this "uml-to-django", but I have failed 
after few steps - please help me with it (as I am new I put quite exhaustive 
description what I did):

What steps will reproduce the problem?
1. I have Python 2.7.1 & django & libxml2-python-2.7.7.win32-py2.7 and also 
ArgoUML installed
2. I have a new django project called "mysite" (under .\mysite\) with an empty 
application called APP (under .\mysite\APP\)... and I can successfully run both 
'python manage.py syncdb' and 'python manage.py runserver' in that directory 
(NOTE:I have closed server for next steps)
3. I have downloaded the uml-to-django.zip and unzipped it into .\mysite\uml2dj\
4. I have opened .\mysite\uml2dj\uml2dj.zargo in ArgoUML (draw 2 associated 
classes inside MyApplication board) and saved it as APP.zargo (in the same 
.\mysite\uml2dj\ folder)
5. I have exported in as .\mysite\APP.xmi
6... when I do the 'python uml2dj APP' I have following error in command line:

" .\mysite>python uml2dj APP
C:\Program Files\Python27\python.exe: can't find '__main__' module in 'uml2dj' "


=== Additional info ===
a) I have tried it with AlgoUML both turned on & off as well - same message
b) I have following files in my .\mysite\uml2dj\ folder (while running step.6):
a.txt
APP.zargo
APP.zargo~
uml2dj.zargo
uml2djlib.py
xmi2djadmin.xsl
xmi2djadmin_custom.xsl
xmi2djadmin_generic.xsl
xmi2djmodels.xsl
xmi2djmodels_generic.xsl
xmilib.xsl
__init__.py (which seems to be empty)

thanks a lot in advance,
Borys

Original issue reported on code.google.com by [email protected] on 11 Apr 2011 at 3:47

Group associated with this project?

This is not really an issue. I didn't know how else to communicate with
you. But is there a Group associated with this project?

Thanks
Eric

Original issue reported on code.google.com by [email protected] on 3 Oct 2009 at 11:45

Support for operations

Will there be operations (methods with body and args support) soon?


Btw, you have made good application. :)

Original issue reported on code.google.com by [email protected] on 9 Feb 2010 at 11:32

Some class names are not supported

UML-to-Django does not support class names:

- which are too long (this is due to limitation in the the size of the
columns in Django tables)

- which contains special characters such as . or / .

Original issue reported on code.google.com by [email protected] on 16 Oct 2009 at 12:28

Importing from source files in argouml doesn't result in a valid xmi for uml2dj

The provided instructions won't work when reverse-engineering the class model 
from source files in argouml.

I had a class model built using visual paradigm. The XMI created by VP didn't 
work with uml-to-django, so I generated java source code in VP, and reverse 
engineered it in argouml. This kida worked, but exporting the resulting xmi 
from argouml wasn't directly usable with uml-to-django.

Original issue reported on code.google.com by [email protected] on 18 Mar 2011 at 6:23

Step number seven on setup page is strange

I believe that the seventh step in the quick start up for uml2dj is not 
consistent:

7 - In the PRJ/APP folder, rename admin_custom.py into admin_custom.py and 
models.py into models.py. (you only need to do this once).

It should be

7 - In the PRJ/APP folder, rename _admin_custom.py into admin_custom.py and 
_models.py into models.py. (you only need to do this once).

Furthermore, i have to rename the files whenever i generate the code, not only 
once.

Original issue reported on code.google.com by [email protected] on 25 Oct 2010 at 12:31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.