Commit 02f2b25f authored by Dave Kuhlman's avatar Dave Kuhlman

v. 2.29.17 Merged simpleType enum. Minor fixes to django.

parent 6f697bd9
......@@ -141,6 +141,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Change history
--------------
Version 2.29.17 (07/05/2018)
- Merged pull request that generates enum classes for each simpleType.
Thanks to Mustafa Şenol Coşar for this enhancement.
- Fix to generatedssuper.py -- (1) Added `on_delete` to Django
ForeignKey declarations. (2) Added relative import (dot) to
generated admin.py.
Version 2.29.16 (06/21/2018)
- Added dependencies to ``setup.py``. Thanks to Laszlo for this
......
......@@ -125,7 +125,7 @@ def generate_model(options, module_name):
else:
sys.stderr.write('class %s not defined\n' % (class_name, ))
wrtadmin('from django.contrib import admin\n')
wrtadmin('from models import \\\n')
wrtadmin('from .models import \\\n')
first_time = True
for class_name in supermod.__all__:
class_name = unique_name_map.get(class_name)
......
......@@ -168,8 +168,17 @@ class GeneratedsSuper(object):
wrtforms('\nclass %s%s(forms.Form):\n' % (
class_name, form_suffix, ))
if cls.superclass is not None:
wrtmodels(' %s = models.ForeignKey("%s%s")\n' % (
cls.superclass.__name__, cls.superclass.__name__, model_suffix, ))
wrtmodels(
' %s = models.ForeignKey(\n' % (
cls.superclass.__name__,))
wrtmodels(
' "%s%s",\n' % (
cls.superclass.__name__,
model_suffix, ))
wrtmodels(
' on_delete=models.CASCADE,\n')
wrtmodels(
' )\n')
for spec in cls.member_data_items_:
name = spec.get_name()
prefix, name = cls.get_prefix_name(name)
......@@ -239,6 +248,8 @@ class GeneratedsSuper(object):
wrtmodels(
' %s = models.ForeignKey(\n "%s%s",\n' % (
name, clean_data_type, model_suffix, ))
wrtmodels(
' on_delete=models.CASCADE,\n')
wrtmodels(
' related_name="{}_{}_{}",\n'.format(
class_name, name, clean_data_type, ))
......
......@@ -220,7 +220,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.16</td>
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td>
</tr>
</tbody>
</table>
......@@ -229,7 +229,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">date:</th><td class="field-body">June 22, 2018</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">July 05, 2018</td>
</tr>
</tbody>
</table>
......@@ -3386,7 +3386,7 @@ following among others:</p>
<div class="footer">
<hr class="footer" />
<a class="reference external" href="generateDS.txt">View document source</a>.
Generated on: 2018-06-22 18:15 UTC.
Generated on: 2018-07-05 20:23 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -225,7 +225,7 @@ _log = logging.getLogger(__name__)
# Do not modify the following VERSION comments.
# Used by updateversion.py.
##VERSION##
VERSION = '2.29.16'
VERSION = '2.29.17'
##VERSION##
BaseStrTypes = six.string_types
......
......@@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema
.. version
:revision: 2.29.16
:revision: 2.29.17
.. version
......
......@@ -220,7 +220,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.16</td>
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td>
</tr>
</tbody>
</table>
......@@ -229,7 +229,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">date:</th><td class="field-body">June 22, 2018</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">July 05, 2018</td>
</tr>
</tbody>
</table>
......@@ -401,7 +401,7 @@ $ mv generateds_gui.mo locale/ru/LC_MESSAGES/
<div class="footer">
<hr class="footer" />
<a class="reference external" href="generateds_gui_notes.txt">View document source</a>.
Generated on: 2018-06-22 18:15 UTC.
Generated on: 2018-07-05 20:23 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -12,7 +12,7 @@ GenerateDS GUI Notes
.. version
:revision: 2.29.16
:revision: 2.29.17
.. version
......
......@@ -41,7 +41,7 @@ from libgenerateDS.gui import generateds_gui_session
# Do not modify the following VERSION comments.
# Used by updateversion.py.
##VERSION##
VERSION = '2.29.16'
VERSION = '2.29.17'
##VERSION##
......
......@@ -217,7 +217,7 @@ dkuhlman (at) davekuhlman (dot) org
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.16</td>
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td>
</tr>
</tbody>
</table>
......@@ -226,7 +226,7 @@ dkuhlman (at) davekuhlman (dot) org
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">date:</th><td class="field-body">June 22, 2018</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">July 05, 2018</td>
</tr>
</tbody>
</table>
......@@ -380,7 +380,7 @@ this command for your needs. For example, you may need to use
<div class="footer">
<hr class="footer" />
<a class="reference external" href="librarytemplate_howto.txt">View document source</a>.
Generated on: 2018-06-22 18:15 UTC.
Generated on: 2018-07-05 20:23 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -8,7 +8,7 @@ How to package a generateDS.py generated library
.. version
:revision: 2.29.16
:revision: 2.29.17
.. version
......
......@@ -40,7 +40,7 @@ except ImportError:
# Do not modify the following VERSION comments.
# Used by updateversion.py.
##VERSION##
VERSION = '2.29.16'
VERSION = '2.29.17'
##VERSION##
CatalogDict = {}
......
......@@ -8,7 +8,7 @@ setup(
# Do not modify the following VERSION comments.
# Used by updateversion.py.
##VERSION##
version="2.29.16",
version="2.29.17",
##VERSION##
author="Dave Kuhlman",
author_email="dkuhlman@davekuhlman.org",
......
......@@ -2,7 +2,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -3,7 +3,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -2,7 +2,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -3,7 +3,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -2,7 +2,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -3,7 +3,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -2,7 +2,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -3,7 +3,7 @@
#
# Generated by generateDS.py.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0]
#
# Command line options:
# ('--no-dates', '')
......
......@@ -219,7 +219,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.16</td>
<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td>
</tr>
</tbody>
</table>
......@@ -228,7 +228,7 @@ They are used by updateversion.py. -->
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">date:</th><td class="field-body">June 22, 2018</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">July 05, 2018</td>
</tr>
</tbody>
</table>
......@@ -1210,7 +1210,7 @@ named <tt class="docutils literal">garden_api.py</tt>, you can create an instanc
<div class="footer">
<hr class="footer" />
<a class="reference external" href="generateds_tutorial.txt">View document source</a>.
Generated on: 2018-06-22 18:15 UTC.
Generated on: 2018-07-05 20:23 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -11,7 +11,7 @@ generateDS -- Introduction and Tutorial
.. version
:revision: 2.29.16
:revision: 2.29.17
.. version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment