py_script.mp4
This is a repository of Python scripts that can be used for creating Auto Django project. Here are some features of this repository:
import os
------
INSTALLED_APPS = [
----------
"test_app",
]
TEMPLATES = [
----------
'DIRS': [os.path.join(BASE_DIR, 'templates')],
----------
]
STATIC_ROOT = (os.path.join(BASE_DIR, 'static'),)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATIC_URL = "static/"
- The script will create
templates
andstatic
folder - & also create
forms.py
,urls.py
# example modified urls.py
from django.urls import path
from .views import *
app_name = 'test_app'
urlpatterns = [
path('', home, name='home'),
]
# example modified views.py
from django.http import HttpResponse
from django.shortcuts import render
# Create your views here.
def home(request):
return HttpResponse("<h1 style='text-align: center; margin-top: 10rem;'>Everything Good!</h1>")
This repository is open source and licensed under the MIT License. You are free to use, modify, and distribute the scripts as long as you give credit to the original author and include the license file. If you find any bugs or have any suggestions for improvement, please open an issue or a pull request on GitHub. Thank you for using these Python scripts!