1. Pedro Lobo
  2. Gedit Django Tools
Issue #1 on hold

had to modify new-django-project

Anonymous created an issue

As new-django-project did not work, I had to modify it:

{{{

!/usr/bin/python

import os import subprocess as sp

if name == 'main': pj = sp.Popen("zenity --entry --text 'Enter project name'", shell=True, stdout=sp.PIPE) project = pj.communicate()[0].strip("\n")

f = sp.Popen("zenity --file-selection --directory --title 'Choose a directory for %s':" %project, shell=True, stdout=sp.PIPE)
dirname = f.communicate()[0].strip("\n")
os.chdir(dirname)

sp.Popen('django-admin.py startproject %s' %project, shell=True)

project_settings = os.path.join(dirname, project, 'settings.py')
sp.Popen('gedit "%s"' %project_settings, shell=True)

os.path.join(dirname, project, 'settings.py') }}}

Cezar

Comments (1)

  1. Log in to comment