- commit
- 7687aedcca4c4ef351ec10d2b06643d72003a1c3
- parent
- 3ce3127d96484f769092973022bb02a89f12b7fc
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-02-29 00:08
add example
Diffstat
| A | example/content.xml | 170 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | example/contract.odt | 0 | |
| M | settings/dev.py | 3 | +++ |
3 files changed, 173 insertions, 0 deletions
diff --git a/example/content.xml b/example/content.xml
@@ -0,0 +1,170 @@
-1 1 <?xml version="1.0" encoding="UTF-8"?>
-1 2 <office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2">
-1 3 <office:scripts/>
-1 4 <office:font-face-decls>
-1 5 <style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol" style:font-charset="x-symbol"/>
-1 6 <style:font-face style:name="FreeSans1" svg:font-family="FreeSans" style:font-family-generic="swiss"/>
-1 7 <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
-1 8 <style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/>
-1 9 <style:font-face style:name="FreeSans" svg:font-family="FreeSans" style:font-family-generic="system" style:font-pitch="variable"/>
-1 10 <style:font-face style:name="Roboto" svg:font-family="Roboto" style:font-family-generic="system" style:font-pitch="variable"/>
-1 11 </office:font-face-decls>
-1 12 <office:automatic-styles>
-1 13 <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Text_20_body">
-1 14 <style:text-properties officeooo:rsid="000402b1" officeooo:paragraph-rsid="000402b1"/>
-1 15 </style:style>
-1 16 <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L1">
-1 17 <style:text-properties officeooo:rsid="000402b1" officeooo:paragraph-rsid="000402b1"/>
-1 18 </style:style>
-1 19 <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Text_20_body" style:list-style-name="L2">
-1 20 <style:text-properties officeooo:rsid="000402b1" officeooo:paragraph-rsid="000402b1"/>
-1 21 </style:style>
-1 22 <text:list-style style:name="L1">
-1 23 <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 24 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 25 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
-1 26 </style:list-level-properties>
-1 27 </text:list-level-style-bullet>
-1 28 <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 29 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 30 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>
-1 31 </style:list-level-properties>
-1 32 </text:list-level-style-bullet>
-1 33 <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 34 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 35 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>
-1 36 </style:list-level-properties>
-1 37 </text:list-level-style-bullet>
-1 38 <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 39 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 40 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>
-1 41 </style:list-level-properties>
-1 42 </text:list-level-style-bullet>
-1 43 <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 44 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 45 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>
-1 46 </style:list-level-properties>
-1 47 </text:list-level-style-bullet>
-1 48 <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 49 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 50 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
-1 51 </style:list-level-properties>
-1 52 </text:list-level-style-bullet>
-1 53 <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 54 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 55 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
-1 56 </style:list-level-properties>
-1 57 </text:list-level-style-bullet>
-1 58 <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 59 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 60 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
-1 61 </style:list-level-properties>
-1 62 </text:list-level-style-bullet>
-1 63 <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 64 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 65 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
-1 66 </style:list-level-properties>
-1 67 </text:list-level-style-bullet>
-1 68 <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 69 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 70 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
-1 71 </style:list-level-properties>
-1 72 </text:list-level-style-bullet>
-1 73 </text:list-style>
-1 74 <text:list-style style:name="L2">
-1 75 <text:list-level-style-bullet text:level="1" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 76 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 77 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-0.635cm" fo:margin-left="1.27cm"/>
-1 78 </style:list-level-properties>
-1 79 </text:list-level-style-bullet>
-1 80 <text:list-level-style-bullet text:level="2" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 81 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 82 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.905cm" fo:text-indent="-0.635cm" fo:margin-left="1.905cm"/>
-1 83 </style:list-level-properties>
-1 84 </text:list-level-style-bullet>
-1 85 <text:list-level-style-bullet text:level="3" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 86 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 87 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-0.635cm" fo:margin-left="2.54cm"/>
-1 88 </style:list-level-properties>
-1 89 </text:list-level-style-bullet>
-1 90 <text:list-level-style-bullet text:level="4" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 91 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 92 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.175cm" fo:text-indent="-0.635cm" fo:margin-left="3.175cm"/>
-1 93 </style:list-level-properties>
-1 94 </text:list-level-style-bullet>
-1 95 <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 96 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 97 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.81cm" fo:text-indent="-0.635cm" fo:margin-left="3.81cm"/>
-1 98 </style:list-level-properties>
-1 99 </text:list-level-style-bullet>
-1 100 <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 101 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 102 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
-1 103 </style:list-level-properties>
-1 104 </text:list-level-style-bullet>
-1 105 <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 106 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 107 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
-1 108 </style:list-level-properties>
-1 109 </text:list-level-style-bullet>
-1 110 <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="◦">
-1 111 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 112 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
-1 113 </style:list-level-properties>
-1 114 </text:list-level-style-bullet>
-1 115 <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="▪">
-1 116 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 117 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
-1 118 </style:list-level-properties>
-1 119 </text:list-level-style-bullet>
-1 120 <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
-1 121 <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
-1 122 <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
-1 123 </style:list-level-properties>
-1 124 </text:list-level-style-bullet>
-1 125 </text:list-style>
-1 126 </office:automatic-styles>
-1 127 <office:body>
-1 128 <office:text>
-1 129 <text:sequence-decls>
-1 130 <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
-1 131 <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
-1 132 <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
-1 133 <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
-1 134 <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
-1 135 </text:sequence-decls>
-1 136 <text:p text:style-name="Title">Example contract</text:p>
-1 137 <text:p text:style-name="Text_20_body"/>
-1 138 <text:p text:style-name="P1">This is an example contract. You can generate your own by following these steps:</text:p>
-1 139 <text:list xml:id="list4083489409" text:style-name="L1">
-1 140 <text:list-item>
-1 141 <text:p text:style-name="P2">Create a contract.odt in libreoffice</text:p>
-1 142 </text:list-item>
-1 143 <text:list-item>
-1 144 <text:p text:style-name="P2">Unzip the contract.odt file to get content.xml</text:p>
-1 145 </text:list-item>
-1 146 <text:list-item>
-1 147 <text:p text:style-name="P2">Use django templating in content.xml so that RebelStuff can automatically insert relevant information</text:p>
-1 148 </text:list-item>
-1 149 <text:list-item>
-1 150 <text:p text:style-name="P2">Store contract.odt and content.xml on your server</text:p>
-1 151 </text:list-item>
-1 152 <text:list-item>
-1 153 <text:p text:style-name="P2">Update CONTRACT_REFERENCE and CONTRACT_CONTENT in settings.py to point to these files</text:p>
-1 154 </text:list-item>
-1 155 </text:list>
-1 156 <text:p text:style-name="P1"/>
-1 157 <text:p text:style-name="P1">Name: {{ object.name }}</text:p>
-1 158 <text:p text:style-name="P1">Items:</text:p>
-1 159 <text:list xml:id="list1251435249" text:style-name="L2">
-1 160 {% for item in object.bookingitem_set.all %}
-1 161 <text:list-item>
-1 162 <text:p text:style-name="P3">{{ item.amount }}x {{ item.stuff.name }}</text:p>
-1 163 </text:list-item>
-1 164 {% endfor %}
-1 165 </text:list>
-1 166 <text:p text:style-name="P1">Duration: {{ object.start|date }} - {{ object.end|date }}</text:p>
-1 167 <text:p text:style-name="P1">Price: {{ object.price }} $</text:p>
-1 168 </office:text>
-1 169 </office:body>
-1 170 </office:document-content>
diff --git a/example/contract.odt b/example/contract.odt
Binary files differ.diff --git a/settings/dev.py b/settings/dev.py
@@ -23,3 +23,6 @@ DATABASES = {
23 23 }
24 24
25 25 PRICE_BASE = 10
-1 26
-1 27 CONTRACT_TEMPLATE = os.path.join(BASE_DIR, 'example', 'content.xml')
-1 28 CONTRACT_REFERENCE = os.path.join(BASE_DIR, 'example', 'contract.odt')