Forums

SECRET_KEY error problem

Hi Everyone, I am trying to deploy my Django project on Pythonanywhere and I am following this link When I want to do Database setup by inserting ./manage.py migrate I get this error: here Ho can I fix it? In addition, I would like to say that in my setting.py file I have this record: SECRET_KEY = config('SECRET_KEY') I have an .env file where I have already inserted my security key. I am new to python. Thanks so much for your help and support! Hooman

Hi, did you go through the last section of the help page you're referring to? That should direct you to this page https://help.pythonanywhere.com/pages/environment-variables-for-web-apps/ which should provide some hints.

Thank you for your suggestion but unfortunately I could not solve the problem . I followed all the directions of the link but in Bash I receive this error "bash: !?" >> .env: event not found". In my tab file i can see .env enter link Tab file screenshot but in Bash i cannot find it. This is the bash screeshot enter link of screenshot what can I do? where am i going wrong?

Thank you

What was the command you run to create your .env file?