Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » "startapp" now creates views.py, not views package [RSS Feed]

#1 Nov. 16, 2005 05:53:19

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

"startapp" now creates views.py, not views package


Earlier today I made a small change to the output of "django-admin.py
startapp" -- it creates a file "views.py" instead of a directory
"views". This is for simplicity's sake. It means fewer files called
(in the case of the tutorial example) "polls.py", and a lighter
directory structure in general.

This is fully backwards-compatible. If you want to keep your views in
a "views" directory, that's perfectly all right. The thinking is that
the common case will only need a single file called views.py.

IMPORTANT NOTE: "svn update" probably won't delete the directory
"django/conf/app_template/views" in your Django distribution. You'll
need to delete this file manually. Otherwise, "startproject" will
create both a views.py and a "views" directory, which will confuse
Python.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#2 Nov. 16, 2005 15:35:48

Simon W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

"startapp" now creates views.py, not views package


On 16 Nov 2005, at 05:53, Adrian Holovaty wrote:This is fully backwards-compatible. If you want to keep your views in
a "views" directory, that's perfectly all right. The thinking is that
the common case will only need a single file called views.py.Nice change. The less directory hierarchy by default the better!

Offline

  • Root
  • » Django
  • » "startapp" now creates views.py, not views package [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support