Re: Generate admin files. Views and Templates with Django?

2008-08-29 Thread V

Actually, there is an admin interface built into django.
You can get it running by simply adding django.contrib.admin to your
settings.py INSTALLED_APPS variable and reading through the comments
of your urls.py and uncommenting the corresponding lines.

Still, by default this admin is not extremely useful as your own
models are not present yet. (If I'm not mistaken this is what
scaffolding is good for.) In this sense there is no scaffolding
present, but there is scaffolding with a "small twist".

So to get your own models show up in the admin you should write some
admin.py files as described at http://www.djangoproject.com/documentation/admin/

You can have a very powerful admin site generate by wrinting a simple
admin.py file. I think this would be the django equivalent of
scaffolding.

If you would like to customize a given generated page even more, there
is some (still valid and) useful information in the djangobook
http://www.djangobook.com/en/1.0/chapter17/

V

On Aug 28, 6:50 pm, "James Matthews" <[EMAIL PROTECTED]> wrote:
> When you create a project you run a command (python manage.py startapp test)
> that creates the directory and the model and view files. However if you want
> the app to use the admin interface you must explicitly state it in your
> models.py file or admin.py (which you need to create) If you wish to
> automatically include some files you can specify these files in
> \django\conf\project_template
>
> On Thu, Aug 28, 2008 at 8:06 AM, Daniel A. <[EMAIL PROTECTED]> wrote:
>
> > I'm a Rails switcher to Django. In Rails there's an option to generate
> > all the scaffold files, ie, there's a command line script that creates
> > all the files in the project folder of the admin interface. I want to
> > know if there's something similar for Django. Thanks
>
> --http://www.goldwatches.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Generate admin files. Views and Templates with Django?

2008-08-28 Thread James Matthews
When you create a project you run a command (python manage.py startapp test)
that creates the directory and the model and view files. However if you want
the app to use the admin interface you must explicitly state it in your
models.py file or admin.py (which you need to create) If you wish to
automatically include some files you can specify these files in
\django\conf\project_template

On Thu, Aug 28, 2008 at 8:06 AM, Daniel A. <[EMAIL PROTECTED]> wrote:

>
> I'm a Rails switcher to Django. In Rails there's an option to generate
> all the scaffold files, ie, there's a command line script that creates
> all the files in the project folder of the admin interface. I want to
> know if there's something similar for Django. Thanks
> >
>


-- 
http://www.goldwatches.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---