Skip to content

Commit

Permalink
updated location + added readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jannefleischer committed Jan 16, 2025
1 parent 79820eb commit ad96bfd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tools/templaterenderer-djangotemplates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
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.

just start the script from your command line:

```bash
python templaterenderer.py
```

It looks in the directory templaterenderer-djangotemplates for a pair of files. One ending with `.django`, one with `.xmlskeleton`.

It exports a file into the shared folder.
2 changes: 1 addition & 1 deletion tools/templaterenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
except IndexError:
print('# The files do not hold a template-section. We try the next one.\n')
continue
outfile_path = os.path.join(os.getcwd(), 'rdmorganiser/views', os.path.basename(template).rsplit('.',1)[0] + '.xml')
outfile_path = os.path.join(os.path.dirname(__file__), '..', 'shared', os.path.basename(template).rsplit('.',1)[0] + '.xml')
with open(
outfile_path,
'w',
Expand Down

0 comments on commit ad96bfd

Please sign in to comment.