Brilliant. Thanks James.
I went down this path of thinking but tried blank=True instead of
required=False which, when it failed, confused my underslept mind :)
Appreciate it.
Andrew.
On Dec 10, 1:03 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 9, 2008 at 7:5
If I do this in admin.py
class UnitAdminModelForm(forms.ModelForm):
optional_field = forms.CharField(widget=WYMEditor())
class Meta:
model = Unit
"optional_field" becomes a required field in the Admin. I assume
something is overriding the model's blank=True for this field.
If i
def post_save_user_handler(sender, **kwargs):
user = kwargs['instance']
if user.is_staff:
# only give add_staffprofile permissions to staff
p_add_perm = Permission.objects.get
(codename='add_staffprofile')
p_change_perm = Permission.objects.get
(codename='change_st
I have a ModelForm:
RequestForExtensionForm
which is built from a model:
RequestForExtension
Basic stuff so far...
The RequestForExtension model has a ForeignKey to the Unit model (Unit
is a study course offered that a student can request an extension on
via this form)
My problem is that in Un
I'm trying to prepopulate a slug field with newforms-admin.
It works fine for the 'normal' Article model, but the inline Photo
model's slug field won't prepopulate from it's title field.
(If the code below doesn't make sense, I can paste the whole model.)
Two models: Article and Photo in the same
I'm trying to prepopulate a slug field with newforms-admin.
It works fine for the 'normal' Article model, but the inline Photo
model's slug field won't prepopulate from it's title field.
(If the code below doesn't make sense, I can paste the whole model.)
Two models: Article and Photo in the same
Ha ha! It works!! This is exactly what I was trying to get at!
Thanks a lot Karen.
...funny thing is I had a browser tab open on that very docs page!
Concentration levels must be dropping off... time for food.
--~--~-~--~~~---~--~~
You received this message becaus
Apologies if this is obvious. I'm still coming to grips with Views in
general...
I want to get a QuerySet of Items filtered by their ProductType for
use in a template. [Model below]
I want to display a page of all the Items of a given ProductType. ie.
all the different versions (Items) of Roadcas
8 matches
Mail list logo