def dashboard(request): event_url = 'all_events/' admin = False events = CalendarEvent.objects.filter(user_id=request.user.id) # adminGroup, group = Group.objects.get_or_create(name='adminGroup') if request.user.groups.filter(name='adminGroup'): admin = True workers = AdminModel.objects.get( user_id=request.user.id).doctorsToVerify workerList = workers.split(', ') workerObjects = [] for i in range(len(workerList)): if not workerList[i] == '': workerObjects.append( WorkerModel.objects.get(user_id=workerList[i])) return render( request, 'HNApp/dashboard.html', { 'admin': admin, 'calendar_config_options': calendar_options( event_url, OPTIONS), 'workerObjects': workerObjects, 'events': events }) return render( request, 'HNApp/dashboard.html', { 'admin': admin, 'calendar_config_options': calendar_options(event_url, OPTIONS), 'events': events })
def get(self, request): form = EventForm() return render(request, self.template_name, {'calendar_config_options': calendar_options(self.event_url, OPTIONS), 'form':form} )
def index(request): """ Uses Django port for fullcalendar. Landing page with calendar, actions and day at a glance. Template: index.html """ event_url = 'all_events/' today = date.today() user = request.user profile = Profile.objects.get(user__id=user.id) today_events = CalendarEvent.objects.filter( start=date.today(), profile__id=profile.id).exclude(title__icontains="born") return render( request, 'records/index.html', { 'calendar_config_options': calendar_options(event_url, OPTIONS), "today": today, "today_events": today_events, })
def calendar(request): event_url = 'all_events/' return render(request, 'events/cl.html', {'calendar_config_options': calendar_options(event_url, OPTIONS)})
def index(request): event_url = 'all_events/' return render( request, 'index.html', {'calendar_config_options': calendar_options(event_url, OPTIONS)})
def index(request): event_url = "all_events/" return render(request, "demo/index.html", {"calendar_config_options": calendar_options(event_url, OPTIONS)})