Reviewed by Sébastien Granjoux <seb.sfo@free.fr>:
[anjuta-git-plugin.git] / plugins / project-wizard / templates / django.wiz
blobd040780e8c5e04ab40db06c699fa44a618a6d04e
1 <project-wizard>
2         <name>Django Project</name>
3         <description>Python webproject using Django Web Framework</description>
4         <icon>django-logo.png</icon>
5         <category>Python</category>
6         <required-program>django-admin.py</required-program>
7 </project-wizard>
9 <page name="basic" _label="Django Project information" _description="General Project Information">
10         <property type="string" name="Name" _label="Project Name:" _description="project name" default="myweb" summary="yes" restriction="filename" mandatory="yes"/>
11         <property type="directory" name="Destination" _label="Destination:" _description="" default="[+AnjutaProjectDirectory+]/[+(string-downcase (get "Name"))+]" mandatory="yes" exist="no" summary="yes"/>
12         
13 </page>
16 <content>
17     <directory source="python" destination="[+Destination+]">
18                 <file destination="[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+].anjuta" source="project.anjuta"/>
19     </directory>
20 </content>
22 <action>
23         <!-- It seems that Debian package uses django-admin instead of django-admin.py -->
24         <run command="sh -c &quot;cd [+(raw-shell-str (get "Destination"))+] &amp;&amp; if [ ''`which django-admin` != '' ]; then `which django-admin` startproject [+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]; else `which django-admin.py` startproject [+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]; fi;&quot;"/>
25         <open file="[+Destination+]/[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+].anjuta"/>
26         <open file="[+Destination+]/[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]/settings.py"/>
27 </action>