awesome-stacks icon indicating copy to clipboard operation
awesome-stacks copied to clipboard

Added Smartlook

Open superasperatus opened this issue 5 years ago • 2 comments

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

superasperatus avatar Sep 10 '20 06:09 superasperatus

Deploy request for awesomestacks accepted.

Accepted with commit b87383e0b12207400d8253617551a501edf95aea

https://app.netlify.com/sites/awesomestacks/deploys/5f59c879026a7900087210cc

netlify[bot] avatar Sep 10 '20 06:09 netlify[bot]

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')

balajirajput96 avatar Mar 17 '24 09:03 balajirajput96