The web2py admin works diferently to the django admin.

The web2py admin is for install apps and manage instances.

2011/12/23 Bruce Wade <bruce.w...@gmail.com>

> I am guessing from the lack of responses this is not possible with
> Web2py's current admin?
>
>
> On Wed, Dec 21, 2011 at 4:49 PM, Bruce Wade <bruce.w...@gmail.com> wrote:
>
>> Hello, I know django has this ability so I am assuming web2py also does.
>> (Here is to hoping :D)
>>
>> First the models:
>> db.define_table('adreports',
>>     Field('reporttype', unique=True)
>> )
>>
>> db.define_table('ads',
>>     Field('member_id', db.auth_user, default=auth.user_id),
>>     Field('points', 'integer', default=0),
>>     Field('url'),
>>     Field('language'),
>>     Field('location'),
>>     Field('accepted', 'boolean', default=False),
>>     Field('viewable', 'boolean'),
>>     Field('updated_at','datetime', default=request.now),
>>     Field('added_at','datetime', default=request.now)
>> )
>>
>> db.define_table('keywords',
>>     Field('isapproved', 'boolean', default=False),
>>     Field('key')
>> )
>>
>> db.define_table('ad_report',
>>     Field('ad_id', db.ads),
>>     Field('reportad_id', db.adreports)
>> )
>>
>> db.define_table('ad_keyword',
>>     Field('ad_id', db.ads),
>>     Field('keyword_id', db.keywords)
>> )
>>
>> db.ads.url.requires = (IS_URL(), IS_NOT_IN_DB(db, db.ads.url))
>>
>> db.ad_report.ad_id.requires = IS_IN_DB(db, db.ads.id, "%(url)s")
>> db.ad_report.reportad_id.requires = IS_IN_DB(db, db.adreports.id,
>> "%(reporttype)s")
>>
>> db.ad_keyword.ad_id.requires = IS_IN_DB(db, db.ads.id, "%(url)s")
>> db.ad_keyword.keyword_id.requires = IS_IN_DB(db, db.keywords.id,
>> "%(key)s")
>>
>> ------------------------------------------------------
>> Now I would like to be able, from the admin create a new ad and on the
>> same page add multiple keywords and/or reports for the ad. This would have
>> to happen with creating a new ad as well as when editing an existing ad.
>>
>> With Django you use: admin.TabularInline and inlines on admin.ModelAdmin
>> classes
>>
>> https://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodeladmin-objects
>>
>> Has something similar being developed for web2py admin application?
>> --
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.warplydesigned.com
>> http://www.fitnessfriendsfinder.com
>>
>
>
>
> --
> --
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.warplydesigned.com
> http://www.fitnessfriendsfinder.com
>



-- 
Alvaro Lizama Molina  - http://alvarolizama.net

Reply via email to