Skip to content

Testing Code on a live HubSpot Site

Look, don't do this, don't! DON'T!!!

But...if you're going to do this, use this code:

{% if request.query_dict.test == "true" %}

HERE'S SOME TEST CONTENT

{% endif %}

 

Then you can go to yoursite.com?test=true and your code will show up. Without the query string set to true it won't.

Test it out on this page. Add ?test=true to the url of this post to see my hidden message below: