can anyone help or point me to some simple django based app that I can
study to understand more ?

On Feb 8, 2:07 am, SimpleDimple <farhandevelo...@gmail.com> wrote:
> I can live w/o AJAX for now to keep it simple.
>
> What I am not clear is on how to do the postback from javascript ?  I
> mean on what URL and pass on which variables ? and thru GET or POST or
> shall i do form.submit()  ??
>
> On Feb 8, 1:45 am, Joel Goldstick <joel.goldst...@gmail.com> wrote:
>
> > On Mon, Feb 7, 2011 at 3:38 PM, SimpleDimple 
> > <farhandevelo...@gmail.com>wrote:
>
> > > I am new to django and building a school system but am experience
> > > developer otherwise having firm grip over rails, php, .net and java.
>
> > > I have student table and in list I can see list of all students/
> > > records in student table....(pasted below is my code)
>
> > > what I want here is a custom dropdown listing the classes in school
> > > from class table, and when you select/change the class the list of
> > > students should get filtered accordingly....can someone please give me
> > > hints or guide me a bit ?
>
> > > class StudentAdmin(admin.ModelAdmin):
> > >    fields        = ['xclass', 'name', 'reg_no' , 'roll_no' ]
> > >    list_display  = ['xclass', 'name', 'reg_no' , 'roll_no' ]
> > >    list_filter   = ['name', 'reg_no' , 'roll_no' ]
> > >    search_fields = ['name', 'reg_no' , 'roll_no' ]
>
> > >    form          =  StudentForm
>
> > >    def queryset(self, request):
> > >        school_id = request.session['school_id']
> > >        qs = self.model._default_manager.filter(school=school_id)
> > >        return qs
>
> > >    def save_model(self, request, obj, form, change):
> > >        school_id = request.session['school_id']
> > >        school = School.objects.get(id=school_id)
> > >        obj.school = school
> > >        obj.save()
>
> > > --
> > > 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.
>
> > This topic has come up recently under different specifics.  When you change
> > your filter (by selecting a specific class) you need to requery with that
> > condition.  This can be done by submitting the form to get a new dataset, or
> > by using AJAX style to have the data retrieved on the fly to repopulate your
> > form.
>
> > --
> > Joel Goldstick

-- 
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.

Reply via email to