I have the following string:
nginx_conf = '''
server {
listen 80;
server_name dev.{project_url};
location / {
proxy_pass http://127.0.0.1:8080;
include /etc/nginx/proxy.conf;
}
location /media {
alias /home/mariano/PycharmProjects/{project
Hi I'm trying to create a class from a string
This is my code, but is not working
'myshop.models.base'
module_name, class_name = model.rsplit(".", 1)
module = importlib.import_module(module_name)
class_ = getattr(module, class_name)()
Anyone know what I'm doing wrong or another way?