Ask coding questions

← Back to all posts
SECRET_KEY setting must not be empty
A036Nikhil

So, when I run, I get his error but I don't know what is causing this error?

Answered by MrVoo [earned 5 cycles]
View Answer
Voters
SixBeeps
A036Nikhil
Comments
hotnewtop
MrVoo

You may need an environment variable called SECRET_KEY

A036Nikhil

@MrVoo My sign up button is not working. Can you please help?

MrVoo

@A036Nikhil Not sure if this helps or not, but don't use SQLite on replit, use ReplDB

A036Nikhil

@MrVoo I am new to web development, is there any guide on How to use replit database?

MrVoo

@A036Nikhil If you press the database button, which looks like a pancake, it will show you all the things you need to know

CosmicBear

You need an environment variable called "mysecretkey"

A036Nikhil

@CosmicBear I don't understand what you mean. I created a secret key and named it mysecret key, so what exactly you meaN?

MrVoo

@CosmicBear It gives that error because only the project owner can access environment variables

VulcanWM

do:
app.config[‘SECRET_KEY’] = “random_key”

A036Nikhil

@VulcanWM My sign up button is not working. Can you please help?

VulcanWM

Where is the signup button? @A036Nikhil

A036Nikhil

@VulcanWM in users app- template-users-register