Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Application Integration
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nico C.  
View profile  
 More options May 4 2011, 7:26 am
From: "Nico C." <caniart.nico...@gmail.com>
Date: Wed, 4 May 2011 04:26:46 -0700 (PDT)
Local: Wed, May 4 2011 7:26 am
Subject: Application Integration
Hi !

  Has anyone used app integration ? I add the call to register_urlconf
in my « master app » urls.py. Registration does seem to work as the
following lines:

    from pages.urlconf_registry import register_urlconf, registry as
pages_urlconf_registry
    register_urlconf(_noop('My App'), 'pagecms.myapp.urls',
label=_('Display App'))
    print pages_urlconf_registry

do produce the following output in the server log :
[('My App', 'pagescms.myapp.urls', 'Display App', 'pages.myapp.urls')]

Yet nothing changes in the pages admin site, or maybe I'm blind.
Where  « the delegate to list with a 'Display App' item in it » is
supposed to appear exactly ? I imagined near the redirect to input,
looked every where.
Does third party app integration needs to be enabled somewhere else ?
The does project in the source tree does not make any call to
register_urlconf, so I looked at the tests, but did not find much more
info there.

Thanks,
Nicolas.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
faden  
View profile  
 More options May 4 2011, 8:01 am
From: faden <batiste.bie...@gmail.com>
Date: Wed, 4 May 2011 05:01:27 -0700 (PDT)
Local: Wed, May 4 2011 8:01 am
Subject: Re: Application Integration
Hi,

I just found you that it's necessary to execute the registry before
the admin is discovered, therefor in urls.py you need to do this:

from pages.urlconf_registry import register_urlconf
register_urlconf('test', 'pages.testsproject.documents.urls')

admin.autodiscover()

This is because the admin fields are handled in a rather static way.

On May 4, 1:26 pm, "Nico C." <caniart.nico...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nico C.  
View profile  
 More options May 4 2011, 8:27 am
From: "Nico C." <caniart.nico...@gmail.com>
Date: Wed, 4 May 2011 05:27:37 -0700 (PDT)
Local: Wed, May 4 2011 8:27 am
Subject: Re: Application Integration
Yes, further digging into the code, I found that out too. So moving
the call a few lines up in my urls.py did the trick.

This because you should not have conditionnal fields inside the
FormAdmin class declaration, as the class declaration will be
only evaluated only once. If you want to add/remove fields
dynamically you must override the FormAdmin class __init__()
method.

I guess a little warning in the doc could help. I'm not very pleased
with the overriding __init__() thing, but it does work, I did that for
the
app i'm trying to integrate, which has forms that cope with
polymorphic
models. The code is a bit ugly and not so DRY in the end but it works.

Cheers.

On 4 mai, 14:01, faden <batiste.bie...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »