On Oct 2, 8:58 am, Matt Schinckel wrote:
> On Oct 2, 3:20 am, booty wrote:> I am creating an
> application where I want the admin site to display
>
> > But I am not able to sort by these values (nor filter, nor search).
>
I seem to have missed this line.
You can use things in the search_fi
On Oct 2, 3:20 am, booty wrote:
> I am creating an application where I want the admin site to display
> the User and the UserProfile (my extensions to the User class)
> together in the list view.
>
[snip]
> My problem is that I want my User Profile fields to be displayed in
> the User list page
I am creating an application where I want the admin site to display
the User and the UserProfile (my extensions to the User class)
together in the list view.
Currently, I have something like:
class UserProfile(models.Model):
" User profile class "
# That field link toward the django user
Nevermind.
Thank you Russ and BTW if someone is thinking "How can i make a generic
callback function for that purpose?"
http://www.djangosnippets.org/snippets/209/
Regards,
--
Martín Conte Mac Donell
http://www.catartico.com
On 5/3/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
>
>
> On 5/
On 5/4/07, Mi Reflejo <[EMAIL PROTECTED]> wrote:
> I just figured i can use a callback function in form_for_model. Something
> like:
>
> def uform_callback(f, **kwargs):
> "tell forms to ignore other fields differents for visible_field"
> visible_fields = ['username', 'password', 'first_na
Mi Reflejo wrote:
> Thank you, it helps me.
>
> Now lets supose that i don't want to show some fields from Users model. For
> example: last_login
>
> The only way that I've found is
> del UserFormModel.base_fields['last_login']
>
> But in the other hand, i need to fill this value with datetime.
I just figured i can use a callback function in form_for_model. Something
like:
def uform_callback(f, **kwargs):
"tell forms to ignore other fields differents for visible_field"
visible_fields = ['username', 'password', 'first_name', 'last_name']
if f.name not in visible_fields:
Thank you, it helps me.
Now lets supose that i don't want to show some fields from Users model. For
example: last_login
The only way that I've found is
del UserFormModel.base_fields['last_login']
But in the other hand, i need to fill this value with datetime.datetime.now
().
So i can't just del
On 5/3/07, Mi Reflejo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I don't know how to do it using form_for_model (I want to keep my "labels",
> "help_text", etc from models). Of course i could make my own Form class with
> each field but it's redundant and if i change my database struct i should
> change
Hi,
I'm facing a problem and i don't know how to solve it.
I'm using the User class "expanded" by ForeingKey [UserProfile] and I need
to make a frontend (newforms) for signup. The form should show User fields
(first_name, last_name, user, pass) and UserProfile fields.
So there is the problem:
I
10 matches
Mail list logo