Hi guys!
I'm porting a webware application to django. I really like
the
autogenerated admin interface of django and the url design
is terrific
,
these project I'm porting has an own way to manipulate the
data
from database, it uses MochiKit and SQLObject to do that.
So I change from SQLObject to django models but I wanted to
keep the
admin interface I devel on webware. No problem. I start to
made views
extending the admin/base_site.html. I could get the same
layout of the
other admin sections. Now, my questions:
1) I couldn't hack the /admin/appname/modelname/ url,
instead of this,
I need to rewrite the index page of administration and point
to another
url like /appname/admin/, I think this is because admin
URLConf is
loaded after my application URLConf (even if my application
is the last
of the INSTALLED_APPS. Is there a way to hack that url?
2) I could use the same layout of the admin pages extending
admin/base_site.html but I couldn't use the login
information, e.g the
welcome line does not appear on the top of admin page, nor
the logout
link. Can I have access to user login?
3) My application is a yoga scholl website, the part I want
to keep my
way is a classes manipulation. First I give to the user a
calendar with
the 3 next months, it should select a day and with
MochiKit+json I do
all the insert/remove/update of classes. I work with dates,
the
database model return the dates as datetime.date or
datetime.time
objects. When I used sqlobject I do a property that converts
the date
to a proper strftime string. What is the recommended
approach with
django? I can do a property like in sqlobject but I want to
know if
it's better to keep this conversion on the view instead of
the model.
4) I make use of json in my application, reading the django
docs I
don't find anything pointing on how to work with json so I
think on 2
ways, the first I could make an decorator to the function,
the function
will return a python object and the decorator should take
care of
create the HttpResponse and write the json to it. This way
is too
turbogears , on a
django way I can make a shortcut function, say
json_to_response. I already done this function, do you are
interested
in this function (it's very simple, it made use of
simplejson), I can
send a patch to the django/shortcuts.py.
Well, I certainly have more questions I can't remember now,
it's 3:00
am, sorry . I'm
very happy with django, thanks for this great
framework. I only miss a independent form validation, or I
don't find
it yet, but i'm reading all I can ;).
Regards,
--~--~---------~--~----~------------~-------~--~----~
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
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|