confirmation of inability to have filter parameter names contain a period with a '.'

10 views
Skip to first unread message

aa...@skilljar.com

unread,
Apr 6, 2019, 4:19:40 PM4/6/19
to django-filter

I'm porting an API that has filter query parameters such as vilt_session.lesson.course.id

I'm hoping to preserve their names, but can't find a way and just wanted to confirm there is no such way.
i.e. doing so would mean I'd need a FilterSet such as

    class MyFilter(FilterSet):
        vilt_session.lesson.course.id = CharFilter(field_name='session__lesson__course__id', help_text='blah blah')

But clearly this is an illegal Python variable name.

Is there a way to map the class member variable name to an arbitrary string, and have that show up in the auto-generated docs instead of the class member variable name itself?  

Thanks again for all the help.
Appreciated.

Reply all
Reply to author
Forward
0 new messages