awesome-stacks
awesome-stacks copied to clipboard
Added Smartlook
For all PRs
- [x] I read the Contribution Guide
For new stacks
- [ ] I followed the do's and don'ts
- [ ] This stack does not already exist
Deploy request for awesomestacks accepted.
Accepted with commit b87383e0b12207400d8253617551a501edf95aea
https://app.netlify.com/sites/awesomestacks/deploys/5f59c879026a7900087210cc
Import the necessary libraries
import os import django
Set the project directory
project_dir = os.path.dirname(os.path.abspath(file))
Create a Django project
django.setup(project_dir)
Create a new app
os.system('python manage.py startapp digital_marketing')
Add the app to the INSTALLED_APPS setting
with open(os.path.join(project_dir, 'settings.py'), 'a') as f: f.write(" 'digital_marketing',\n")
Create a model
os.system('python manage.py makemigrations digital_marketing') os.system('python manage.py migrate')
Create a view
with open(os.path.join(project_dir, 'digital_marketing/views.py'), 'w') as f: f.write(""" from django.shortcuts import render
def home(request): return render(request, 'digital_marketing/home.html') """)
Create a template
with open(os.path.join(project_dir, 'digital_marketing/templates/digital_marketing/home.html'), 'w') as f: f.write(""" {% extends 'base.html' %}
{% block content %}
Welcome to the Digital Marketing website!
{% endblock %} """)Start the server
os.system('python manage.py runserver')