Skip to content

Cannot access Django administrator site in Django-3

Successfully created an admin user using py manage.py createsuperuser. Entered username, e-mail, password but whenever I try to access this link http://127.0.0.1:8000/admin/ it says “This site can’t be reached” and “127.0.0.1 refused to connect, ” How do I fix this error and access the…

How to evaluate a variable within a dict in jinja

I would like to evaluate a variable within a dict object in Jinja. Is that possible? In the example, {{ obj_list }} is treated as text. Is there a syntax to evaluate this variable within? Answer You can use ~ to include variables within strings: {%- set long_dict_set = {“key”:”text text &#82…

Assign multiple variables from a list of file names

I have a list of file and a list of variables names I want to assign every item in var_names a read_spss function. so that ill get Thanks Answer Like the comment above the easiest way to do this is with a dictionary. That way then you can just access it like this files[‘var1’] to get the content o…