Commit dcfce7ea authored by Dave Kuhlman's avatar Dave Kuhlman
Browse files

Added various date/time simple types to Django support

parent 75561f17
No related merge requests found
Showing with 21 additions and 8 deletions
+21 -8
......@@ -96,10 +96,18 @@ String_type_table = {
}
Date_type_table = {
'date': None,
'gYear': None,
'gYearMonth': None,
'gMonth': None,
'gMonthDay': None,
'gDay': None,
}
DateTime_type_table = {
'dateTime': None,
}
Time_type_table = {
'time': None,
}
Boolean_type_table = {
'boolean': None,
}
......@@ -183,6 +191,11 @@ class GeneratedsSuper(object):
name, options, ))
wrtforms(' %s = forms.DateTimeField(%s)\n' % (
name, options, ))
elif data_type in Time_type_table:
wrtmodels(' %s = models.TimeField(%s)\n' % (
name, options, ))
wrtforms(' %s = forms.TimeField(%s)\n' % (
name, options, ))
elif data_type in Boolean_type_table:
wrtmodels(' %s = models.BooleanField(%s)\n' % (
name, options, ))
......
......@@ -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">January 04, 2017</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">January 05, 2017</td>
</tr>
</tbody>
</table>
......@@ -3184,7 +3184,7 @@ following among others:</p>
<div class="footer">
<hr class="footer" />
<a class="reference external" href="generateDS.txt">View document source</a>.
Generated on: 2017-01-04 17:45 UTC.
Generated on: 2017-01-05 20:00 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>
......
......@@ -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">January 04, 2017</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">January 05, 2017</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: 2017-01-04 17:45 UTC.
Generated on: 2017-01-05 20:00 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>
......
......@@ -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">January 04, 2017</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">January 05, 2017</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: 2017-01-04 17:45 UTC.
Generated on: 2017-01-05 20:00 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>
......
......@@ -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">January 04, 2017</td>
<tr class="field"><th class="field-name">date:</th><td class="field-body">January 05, 2017</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: 2017-01-04 17:45 UTC.
Generated on: 2017-01-05 20:00 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>
......
No preview for this file type
Supports Markdown
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