django - pycharm is not showing autocomplete for my own modules -
i using pycharm django project. made app named 'music' , there created model named 'album'.
inside views using loop details stored in database this
all_albums = album.objects.all() album in all_albums: album.artist
however when type album.
don't autocomplete suggestions artist
or else have defined in class.
how make pycharm include own modules in autocomplete?
one way, using docstrings:
for each in qs: payment = each """@type : payment """ print payment.deadline
another way, using assert:
for each in qs: assert isinstance(each, payment) print each.deadline
you can google 'pycharm type hinting' or similar find out more.