Re: Django Admin Filtering Drop Down Menu by Date

2018-10-15 Thread mab . mobile . 01
Hello Nelson, I may need you to walk me through this more. I am relatively new to Django. I modified my admin.py and added from django import forms and added the following code in the admin.py file. It's still giving me an error ... "type object 'EmployeeSchedule' has no attribute 'events'"

Re: Django Admin Filtering Drop Down Menu by Date

2018-10-15 Thread mab . mobile . 01
Thank you Nelson. I will try this option. On Friday, October 12, 2018 at 9:57:31 AM UTC-5, Nelson Varela wrote: > > You could make a custom form for your admin which is a model form which >> points to EmployeeSchedule. And in the form its init you can change the >> queryset of the events

Re: Django Admin Filtering Drop Down Menu by Date

2018-10-12 Thread Nelson Varela
> > You could make a custom form for your admin which is a model form which > points to EmployeeSchedule. And in the form its init you can change the > queryset of the events field: > self.fields['events'].queryset = WineryEvents.objects.filter(publish='Y').

Re: Django Admin Filtering Drop Down Menu by Date

2018-10-12 Thread Derek
Your question does not make sense (as written): "To add a new event I would like to pick from a drop down list of only the events that are in the future" .. Why should adding a new event depend on you selecting another event? Are the events related or dependant in some way; that is not clear?

Django Admin Filtering Drop Down Menu by Date

2018-10-09 Thread mab . mobile . 01
Hello, I am trying to develop an employee schedule based on upcoming events and I only need to make additions or updates in Django Admin. To add a new event I would like to pick from a drop down list of only the events that are in the future or on todays date not the entire table list of