On Pzt, 2009-08-24 at 07:14 -0700, Daniel Roseman wrote: > On Aug 24, 2:45 pm, Hotmail <gungorb...@hotmail.com> wrote: > > On Pzt, 2009-08-24 at 06:17 -0700, Daniel Roseman wrote: > > > > > On Aug 24, 12:51 pm, Gungor <gungorb...@gmail.com> wrote: > > > > I have a register() takes at most 3 arguments (4 given) problem with > > > > these codes. > > > > > > from randevu.rts.models import Randevu > > > > from django.contrib import admin > > > > from datetime import datetime > > > > > > class Admin_Panel(admin.ModelAdmin): > > > > list_display=("name","surname","date","time") > > > > ordering=["-date","time"] > > > > search_fields=("name","surname","date") > > > > class Filtre(): > > > > fil = Randevu.objects.filter(date__gte = datetime(2009,8,24)) > > > > #fil2 = fil.filter(fil.time__equ = Time(time)) > > > > > > admin.site.register(Randevu,Admin_Panel,Filtre) > > > > > What are you trying to do with this? What is Filtre, and why are you > > > trying to register it in the admin? As the error says, register > > > accepts the model and the admin class as parameters, it doesn't expect > > > a third argument. > > > -- > > > DR. > > > > filtre is filter in Turkish meaning.I am trying to develop an appoinment > > application.here is a problem with the date and time filter. if smbd have > > an appoinment at that time, anybody can not have an appointment. > > > > ex: > > John Malcovich at 9:00am 20 July 2009 (has an appoinment) > > Benjamin Button want to take an appoinment at 9:00am .But the system > > does not give the permission. > > > > Fine, but you can't just randomly create classes and assign them to > things and expect it to just work. How are you expecting this filter > class to work? Where is the filter going to be applied? What is it > going to filter? Where are the results going to be displayed? > > If you just want to ensure that a field is unique across all instances > of a model, use unique=True in the field definition. > -- > DR. > > >
I am a new guy.I don't know how to do a filter.Can you help me for this? -- Force will be with you... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---