marcopompili / django-instagram

Instagram application for Django.
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

Using a context variable as input instead of a raw string. #22

Closed marcopompili closed 4 years ago

marcopompili commented 5 years ago

I pass a variable to the template that I call username. It contains the username of the instagram user. When I try to do this for example :

<p>{{ username }}</p>. It works perfectly. It's displaying the good username.

But when I use the tag {% instagram_user_recent_media username %}, it takes username as a string. So the app search on Instagram with the username "username". Obviously it don't find anything. I also tried to do that : {% instagram_user_recent_media {{ username }} %}

Originally posted by @Abdullahabid3691 in https://github.com/marcopompili/django-instagram/issues/18#issuecomment-538883881

As @Abdullahabid3691 made me notice, the tag {% instagram_user_recent_media %} only accepts raw strings. It would make more sense to use a context variable.

marcopompili commented 5 years ago

Addressed on commit: https://github.com/marcopompili/django-instagram/commit/73e698a305f65ef780652268c83eaa507927c01e

Guest007 commented 4 years ago

Addressed on commit: 73e698a

Great! But 0.3.1 version still not available on pypi :-(

marcopompili commented 4 years ago

It's up now!