Re: app model

2009-10-15 Thread Zilva

Find way

models.py

.
uid= models.IntegerField(blank = True, null = True, ...


admin.py


class Media:
js = (
'js/jquery.min.js',
'js/us.js'
)


us.js

$(document).ready(function(){
$(".form-row.uid").css("display","none");
u=$("#uid").attr("value");
$("#id_uid").attr("value",u);
});

in  /django/contrib/admin/templates/admin/base.html

add 

that`s  work :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: app model

2009-10-14 Thread Zilva

like auto_now_add
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



app model

2009-10-14 Thread Zilva


Hi,

seeking a way how user ID automatically add in to the integer field,
Django model.
Would anyone know any simple solution?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---