hooks/post_gen_project.py
def create_env_file(self):
        """Create env file from the template."""
        env_template = Path(".env.tpl").read_text()
        env_text = env_template.replace(
            "__SECRETKEY__", secrets.token_urlsafe(40)
        ).replace("__PASSWORD__", secrets.token_urlsafe(8))
        Path(".env").write_text(env_text)
Create env file from the template.
Create env file from the template.
Create env file from the template .
def create_env_file(self):
        env_template = Path(".env.tpl").read_text()
        env_text = env_template.replace(
            "__SECRETKEY__", secrets.token_urlsafe(40)
        ).replace("__PASSWORD__", secrets.token_urlsafe(8))
        Path(".env").write_text(env_text)
def create_env_file ( self ) : env_template = Path ( ".env.tpl" ) . read_text ( ) env_text = env_template . replace ( "__SECRETKEY__" , secrets . token_urlsafe ( 40 ) ) . replace ( "__PASSWORD__" , secrets . token_urlsafe ( 8 ) ) Path ( ".env" ) . write_text ( env_text )
Create env file from the template.
Create env file from the template .
"""Create env file from the template."""
self