Skip to content

Commit ad96bfd

Browse files
updated location + added readme.md
1 parent 79820eb commit ad96bfd

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
The script `templaterenderer.py' can be used to combine a django-template in plain xml and a xml-skeleton into one view-template that holds the skeleton and the (partially) html-encoded django-template which can be imported into RDMO.
2+
3+
just start the script from your command line:
4+
5+
```bash
6+
python templaterenderer.py
7+
```
8+
9+
It looks in the directory templaterenderer-djangotemplates for a pair of files. One ending with `.django`, one with `.xmlskeleton`.
10+
11+
It exports a file into the shared folder.

tools/templaterenderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
except IndexError:
2222
print('# The files do not hold a template-section. We try the next one.\n')
2323
continue
24-
outfile_path = os.path.join(os.getcwd(), 'rdmorganiser/views', os.path.basename(template).rsplit('.',1)[0] + '.xml')
24+
outfile_path = os.path.join(os.path.dirname(__file__), '..', 'shared', os.path.basename(template).rsplit('.',1)[0] + '.xml')
2525
with open(
2626
outfile_path,
2727
'w',

0 commit comments

Comments
 (0)