How to use the pretalx.person.models.SpeakerProfile.objects.filter function in pretalx

To help you get started, we’ve selected a few pretalx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pretalx / pretalx / src / pretalx / api / views / speaker.py View on Github external
def get_base_queryset(self):
        if self.request.user.has_perm("orga.view_speakers", self.request.event):
            return SpeakerProfile.objects.filter(
                event=self.request.event, user__isnull=False
            )
        if (
            self.request.event.current_schedule
            and self.request.event.settings.show_schedule
        ):
            return SpeakerProfile.objects.filter(
                user__submissions__slots__in=self.request.event.current_schedule.talks.all()
            ).distinct()
        return SpeakerProfile.objects.none()
github pretalx / pretalx / src / pretalx / event / models / event.py View on Github external
self.logged_actions(),
            self.queued_mails.all(),
            self.cfp,
            self.mail_templates.all(),
            self.information.all(),
            TalkSlot.objects.filter(schedule__event=self),
            Feedback.objects.filter(talk__event=self),
            Resource.objects.filter(submission__event=self),
            Answer.objects.filter(question__event=self),
            AnswerOption.objects.filter(question__event=self),
            Question.all_objects.filter(event=self),
            Submission.all_objects.filter(event=self),
            self.tracks.all(),
            self.submission_types.all(),
            self.schedules.all(),
            SpeakerProfile.objects.filter(event=self),
            self.rooms.all(),
            ActivityLog.objects.filter(event=self),
            self,
        ]

        self._delete_mail_templates()
        for entry in deletion_order:
            entry.delete()
github pretalx / pretalx / src / pretalx / agenda / views / speaker.py View on Github external
def get_object(self, queryset=None):
        return SpeakerProfile.objects.filter(
            event=self.request.event, user__code__iexact=self.kwargs["code"]
        ).first()
github pretalx / pretalx / src / pretalx / agenda / views / htmlexport.py View on Github external
)
        )

    @staticmethod
    def get_url(obj):
        return obj.urls.ical

    def get_content(self):
        return self.get(self.request, self._exporting_event).content

    def get_build_path(self, obj):
        return self.get_file_build_path(obj)


class ExportSpeakerView(PretalxExportContextMixin, BuildableDetailView, SpeakerView):
    queryset = SpeakerProfile.objects.filter(
        user__submissions__slots__schedule__published__isnull=False
    ).select_related('user', 'event').prefetch_related('user__submissions').distinct()
github pretalx / pretalx / src / pretalx / api / views / speaker.py View on Github external
def get_base_queryset(self):
        if self.request.user.has_perm("orga.view_speakers", self.request.event):
            return SpeakerProfile.objects.filter(
                event=self.request.event, user__isnull=False
            )
        if (
            self.request.event.current_schedule
            and self.request.event.settings.show_schedule
        ):
            return SpeakerProfile.objects.filter(
                user__submissions__slots__in=self.request.event.current_schedule.talks.all()
            ).distinct()
        return SpeakerProfile.objects.none()