Re: Dojo LayoutContainer and ContentPane as application frame?

2007-07-31 Thread [EMAIL PROTECTED]

ok the solution was

dojo.io.bind({
url: "/projects/",
load: function(type, data, evt){ docPane.setContent(data); },
mimetype: "text/html"
});

sorry ...


On 31 Jul., 22:37, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello Group,
>
> I tried to setup a kind of frame architecture with the dojo layout
> container widget.
> The idea is to load the menu (fisheye widget menu) only once and let
> the django page itself load asynchronously into a ContentPane.
> A dojo menu widget loads an url in the content pane like this:
>
> function load_app(id){
> var docPane = dojo.widget.byId("docpane");
> if (id == 6) {
> docPane.setUrl("/projects/");
> }
> }
>
> Projects is an application of my site. The main urls.py includes the
> url of the projects application:
> (r'^projects/', include('mugdisite.apps.projects.urls')),
>
> The project app urls.py has the following:
> .
> info_dict = {
> 'queryset': Project.objects.all(),}
>
> urlpatterns = patterns('',
> (r'^$', 'django.views.generic.list_detail.object_list',
> dict(info_dict, paginate_by=10)),
> ...
>
> The urlpatterns work ok when I enter localhost:8000/projects directly.
>
> However, in the dojo ContentPane the result is "Error loading '/
> projects/' (200 OK)".
>
> When I modify the main urls.py to direct to a HTML template directly,
> the inclusion works
> (r'^projects/', 'django.views.generic.simple.direct_to_template',
> {'template': 'projects-entry.html'}),
>
> Do you think it is somehow possible to trick the dojo widget which
> expects a HTML file, I think?
> I am using the django trunk version and dojo 0.4.
>
> Would be happy for any help.
>
> Dennis


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Dojo LayoutContainer and ContentPane as application frame?

2007-07-31 Thread [EMAIL PROTECTED]

Hello Group,

I tried to setup a kind of frame architecture with the dojo layout
container widget.
The idea is to load the menu (fisheye widget menu) only once and let
the django page itself load asynchronously into a ContentPane.
A dojo menu widget loads an url in the content pane like this:

function load_app(id){
var docPane = dojo.widget.byId("docpane");
if (id == 6) {
docPane.setUrl("/projects/");
}
}

Projects is an application of my site. The main urls.py includes the
url of the projects application:
(r'^projects/', include('mugdisite.apps.projects.urls')),

The project app urls.py has the following:
.
info_dict = {
'queryset': Project.objects.all(),
}
urlpatterns = patterns('',
(r'^$', 'django.views.generic.list_detail.object_list',
dict(info_dict, paginate_by=10)),
...

The urlpatterns work ok when I enter localhost:8000/projects directly.

However, in the dojo ContentPane the result is "Error loading '/
projects/' (200 OK)".

When I modify the main urls.py to direct to a HTML template directly,
the inclusion works
(r'^projects/', 'django.views.generic.simple.direct_to_template',
{'template': 'projects-entry.html'}),


Do you think it is somehow possible to trick the dojo widget which
expects a HTML file, I think?
I am using the django trunk version and dojo 0.4.

Would be happy for any help.

Dennis


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---