Hi Peter,

You can access MyExtensionClass.instance.settings, which should give you what 
you want.

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org 
Beanbag, Inc. - https://www.beanbaginc.com


On September 25, 2014 at 1:07:29 PM, Peter Williams 
(i.ask.django.questi...@gmail.com) wrote:
> Hey Christian,
> 
> I would be glad to submit a patch.
> 
> However, is there a clean way to gain access to an Extension object's
> .setting attribute within a Field? For example, I have a configuration form
> for my extension and this updates a setting dict. The setting dict exists
> in an Extension object which then calls something like:
> 
> def initialize(self):
> ReviewRequestFieldsHook(self, 'main', [OutputField])
> 
> Is there a clean way for OutputField to retrieve the settings dict?
> 
> -P
> 
> On Tuesday, September 23, 2014 3:36:47 PM UTC-7, Christian Hammond wrote:
> >
> > Hi Peter,
> >
> > There is no official way of doing this, but you can probably try to
> > override the load_value() function and have it return some default text if
> > not otherwise specified.
> >
> > I'd be happy to take a patch that implements default values cleanly.
> >
> > Christian
> >
> > --
> > Christian Hammond - chri...@beanbaginc.com 
> > Review Board - https://www.reviewboard.org
> > Beanbag, Inc. - https://www.beanbaginc.com
> >
> >
> > On September 23, 2014 at 3:33:53 PM, Peter Williams (
> > i.ask.djang...@gmail.com ) wrote:
> > > Hello RB users / admins,
> > >
> > > Is there a way to specify default text within a BaseTextAreaField?
> > >
> > > My current field looks something like below:
> > >
> > >
> > > from reviewboard.reviews.fields import BaseTextAreaField
> > >
> > >
> > > class OutputField(BaseTextAreaField):
> > > field_id = testme'
> > > label = 'test label'
> > >
> > > I couldn't see any mention of this in the API and digging through the
> > code
> > > suggests that you can't but I may be wrong.
> > >
> > > Thanks for any help.
> > >
> > > -P
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> > > ---
> > > Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> > > ---
> > > Happy user? Let us know at http://www.reviewboard.org/users/
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "reviewboard"
> > > group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to reviewboard...@googlegroups.com .
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> >
> 
> --
> Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
> ---
> Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
> ---
> Happy user? Let us know at http://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups 
> "reviewboard" 
> group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to reviewboard+unsubscr...@googlegroups.com. 
> For more options, visit https://groups.google.com/d/optout.
> 

-- 
Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/
---
Sign up for Review Board hosting at RBCommons: https://rbcommons.com/
---
Happy user? Let us know at http://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to