Re: Initial data for ManyToMany field

2011-09-16 Thread Danfi
this initial can be a queryset or a list, but the list must use its primary key like sform = SymptomeForm(initial={'parent':[1,2]}) On 9月7日, 上午4时30分, Thomas49 wrote: > Hello, > > I have two models, and the second contains a ManyToMany relationship: > > class

Re: models queryset and permissions

2011-01-05 Thread Danfi
Esame: name = models.Foreignkey(User) ... Then queryset=Esame.name.get_rows_with_permission(Ecg(),'add') On 1月4日, 下午8时02分, MarcoS wrote: > Hi people, probably I'm making a mountain out of a molehill but I > can't figure > how to solve this problem; > > I've a form with a

Re: Reorder fields in tabular admin inline

2010-05-21 Thread Danfi
use filedsets can dispaly them in that way , but it looks differently from django.contrib import admin from models import * class BarAdmin(admin.ModelAdmin): fieldsets = [ (None, { 'classes': ('field3',), 'fields': ['field3'] }), (None, {

Re: Problems with url encoding

2010-05-21 Thread Danfi
maybe you lack of "?"before {{slug_plataform}} Return to list On 5月20日, 上午10时25分, Caumons wrote: > Hi everybody. > > I am having problems with the urlencoding. I explain. In a template I > have the following code: > > class="link">Return to list > > In the view I pass the

Re: is it possible ?

2010-05-21 Thread Danfi
ChangeList is in the file /python**/Lib/site-packages/django/contrib/ admin/views/main.py ,and we use ModelAdmin so change_view function can direct to be used. On 5月21日, 下午2时08分, rahul jain <jainwolver...@gmail.com> wrote: > Hi Danfi, > > Thanks for your quick response. But

Re: is it possible ?

2010-05-20 Thread Danfi
In Auth group you can create a group and set the limits. see different panel maybe use changelist_view I saw this just be similar to yours' class Part(models.Model): is_deleted = models.BooleanField() // class PartAdmin(admin.ModelAdmin): actions

Re: Django list_filter

2010-05-20 Thread Danfi
go-treebeard/ > A much better place to start. > > On 20 May, 07:06, Danfi <tda...@gmail.com> wrote: > > > > > Hi, > > In my models, I use "parent = models.ForeignKey('self', blank = True, > > null = True) " create a Folder tree > > lik

Django list_filter

2010-05-20 Thread Danfi
Hi, In my models, I use "parent = models.ForeignKey('self', blank = True, null = True) " create a Folder tree like : A -a1 -a2 --a21 --a211 --a22 B -b1 and I use the "parent" as list_filter ,but I get a problem , when I click 'a1' ,it only show the information in a1, but I want it also show its