commit a58b7ec818b3d36f96202f9aecceb0202f636b37 Author: sipp11 Date: Fri Nov 4 21:34:48 2022 +0700 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d9631d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +__pycache__ +*.pyc +.vscode +*.sqlite3 diff --git a/Djangoproject/__init__.py b/Djangoproject/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Djangoproject/asgi.py b/Djangoproject/asgi.py new file mode 100644 index 0000000..1e69474 --- /dev/null +++ b/Djangoproject/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for Djangoproject project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Djangoproject.settings') + +application = get_asgi_application() diff --git a/Djangoproject/settings.py b/Djangoproject/settings.py new file mode 100644 index 0000000..712aaf5 --- /dev/null +++ b/Djangoproject/settings.py @@ -0,0 +1,136 @@ +""" +Django settings for Djangoproject project. + +Generated by 'django-admin startproject' using Django 3.1. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/3.1/ref/settings/ +""" + +from pathlib import Path +import os +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve(strict=True).parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '9t4uov^!)o-08xxy^)(h9n7_a_tl_=j81ugwv&wl-)%n$pf3hs' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = ['*'] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'Mywebsite', + 'ckeditor', + 'django_wysiwyg', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'Djangoproject.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR,'Mywebsite', 'templates')], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'Djangoproject.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/3.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'NAME': 'db.sqlite3', + 'ENGINE': 'django.db.backends.sqlite3', + 'USER': '', + 'PASSWORD': '' + }, + # 'default': { + # 'ENGINE': 'django.db.backends.mysql', + # 'NAME':'mydjango', + # 'USER':'root', + # 'HOST':'localhost', + # 'PORT':'' + # }, +} + + +# Password validation +# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/3.1/topics/i18n/ + +LANGUAGE_CODE = 'th-TH' + +TIME_ZONE = 'Asia/Bangkok' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/3.1/howto/static-files/ + +STATIC_URL = '/static/' +MEDIA_ROOT = os.path.join(BASE_DIR,'media') +MEDIA_URL = '/media/' + +DJANGO_WYSIWYG_FLAVOR = "ckeditor" \ No newline at end of file diff --git a/Djangoproject/urls.py b/Djangoproject/urls.py new file mode 100644 index 0000000..a6a35c7 --- /dev/null +++ b/Djangoproject/urls.py @@ -0,0 +1,24 @@ +"""Djangoproject URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/3.1/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: path('', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.urls import include, path + 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) +""" +from django.contrib import admin +from django.urls import path,include + +urlpatterns = [ + path('admin/', admin.site.urls), + path('',include('Mywebsite.urls')), +] +handler404 = 'Mywebsite.views.handler404' + diff --git a/Djangoproject/wsgi.py b/Djangoproject/wsgi.py new file mode 100644 index 0000000..faff3e8 --- /dev/null +++ b/Djangoproject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for Djangoproject project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Djangoproject.settings') + +application = get_wsgi_application() diff --git a/Mywebsite/__init__.py b/Mywebsite/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Mywebsite/admin.py b/Mywebsite/admin.py new file mode 100644 index 0000000..a891645 --- /dev/null +++ b/Mywebsite/admin.py @@ -0,0 +1,4 @@ +from django.contrib import admin +from .models import tb_news +# Register your models here. +admin.site.register(tb_news) diff --git a/Mywebsite/apps.py b/Mywebsite/apps.py new file mode 100644 index 0000000..6312dc4 --- /dev/null +++ b/Mywebsite/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class MywebsiteConfig(AppConfig): + name = 'Mywebsite' diff --git a/Mywebsite/migrations/0001_initial.py b/Mywebsite/migrations/0001_initial.py new file mode 100644 index 0000000..0ac0d4e --- /dev/null +++ b/Mywebsite/migrations/0001_initial.py @@ -0,0 +1,24 @@ +# Generated by Django 3.1 on 2020-08-30 09:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='tb_news', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('news_title', models.CharField(max_length=300)), + ('news_detail', models.TextField()), + ('news_photo', models.ImageField(default='', upload_to='photo')), + ('news_date', models.DateTimeField(auto_now=True)), + ], + ), + ] diff --git a/Mywebsite/migrations/0002_auto_20200902_0053.py b/Mywebsite/migrations/0002_auto_20200902_0053.py new file mode 100644 index 0000000..966a633 --- /dev/null +++ b/Mywebsite/migrations/0002_auto_20200902_0053.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1 on 2020-09-01 17:53 + +import ckeditor.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('Mywebsite', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='tb_news', + name='news_detail', + field=ckeditor.fields.RichTextField(blank=True, null=True), + ), + ] diff --git a/Mywebsite/migrations/0003_auto_20200902_1445.py b/Mywebsite/migrations/0003_auto_20200902_1445.py new file mode 100644 index 0000000..cf77e23 --- /dev/null +++ b/Mywebsite/migrations/0003_auto_20200902_1445.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-09-02 07:45 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('Mywebsite', '0002_auto_20200902_0053'), + ] + + operations = [ + migrations.AlterField( + model_name='tb_news', + name='news_detail', + field=models.TextField(default=''), + ), + ] diff --git a/Mywebsite/migrations/0004_auto_20200902_1534.py b/Mywebsite/migrations/0004_auto_20200902_1534.py new file mode 100644 index 0000000..e076e8c --- /dev/null +++ b/Mywebsite/migrations/0004_auto_20200902_1534.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1 on 2020-09-02 08:34 + +import ckeditor.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('Mywebsite', '0003_auto_20200902_1445'), + ] + + operations = [ + migrations.AlterField( + model_name='tb_news', + name='news_detail', + field=ckeditor.fields.RichTextField(blank=True, null=True), + ), + ] diff --git a/Mywebsite/migrations/__init__.py b/Mywebsite/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Mywebsite/models.py b/Mywebsite/models.py new file mode 100644 index 0000000..9427492 --- /dev/null +++ b/Mywebsite/models.py @@ -0,0 +1,15 @@ +from django.db import models +from django.core.files.storage import FileSystemStorage +import os +from ckeditor.fields import RichTextField +# Create your models here. + +class tb_news(models.Model): + news_title = models.CharField(max_length=300) + #news_detail = models.TextField(default='') + news_detail = RichTextField(blank=True,null=True) + news_photo = models.ImageField(upload_to='photo',default='') + news_date = models.DateTimeField(auto_now=True,blank=False) + + + diff --git a/Mywebsite/static/css/mycss.css b/Mywebsite/static/css/mycss.css new file mode 100644 index 0000000..efc0f67 --- /dev/null +++ b/Mywebsite/static/css/mycss.css @@ -0,0 +1,13 @@ + +body{ + background-color: rgb(251, 251, 251); +} + + +img { + max-width: 100%; + height: auto !important; + display: block; + margin-left: auto; + margin-right: auto; +} \ No newline at end of file diff --git a/Mywebsite/static/images/brand.jpg b/Mywebsite/static/images/brand.jpg new file mode 100644 index 0000000..645d308 Binary files /dev/null and b/Mywebsite/static/images/brand.jpg differ diff --git a/Mywebsite/static/images/logo.jpg b/Mywebsite/static/images/logo.jpg new file mode 100644 index 0000000..e3ced84 Binary files /dev/null and b/Mywebsite/static/images/logo.jpg differ diff --git a/Mywebsite/static/images/stop.png b/Mywebsite/static/images/stop.png new file mode 100644 index 0000000..3596947 Binary files /dev/null and b/Mywebsite/static/images/stop.png differ diff --git a/Mywebsite/static/js/js1.js b/Mywebsite/static/js/js1.js new file mode 100644 index 0000000..89a92a1 --- /dev/null +++ b/Mywebsite/static/js/js1.js @@ -0,0 +1,9 @@ +function js1(){ + alert("คุณยังไม่ได้รับอนุญาติในการเพิ่มข้อมูลข่าว กรุณารอ admin ตรวจสอบข้อมูล") + +} + +function js2(){ + alert("ไม่อนุญาติให้ลบข้อมูลครับ") + + } diff --git a/Mywebsite/templates/Mywebsite/404error.html b/Mywebsite/templates/Mywebsite/404error.html new file mode 100644 index 0000000..1759a71 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/404error.html @@ -0,0 +1,13 @@ + +{% extends 'Mywebsite/header.html' %} +{% block content %} +{% load static %} + + + +
+ +

404 ERROR

+กลับไปยังหน้าหลัก + +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/addnews.html b/Mywebsite/templates/Mywebsite/addnews.html new file mode 100644 index 0000000..d7b3bcb --- /dev/null +++ b/Mywebsite/templates/Mywebsite/addnews.html @@ -0,0 +1,27 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +{% load wysiwyg %} +{% wysiwyg_setup %} +
+

เพิ่มข้อมูลข่าวสาร

+
+ {% csrf_token %} +
+ + +
+
+ + +
+ +
+ + +
+ + + +
+{% wysiwyg_editor "detail" %} +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/contentedit.html b/Mywebsite/templates/Mywebsite/contentedit.html new file mode 100644 index 0000000..afc57f4 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/contentedit.html @@ -0,0 +1,24 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +
+

แก้ไขข้อมูล

+{% for data in result %} +
+ {% csrf_token %} + +
+ + +
+
+ + +
+
+ Card image cap +
+ + +
+{%endfor%} +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/contentnewsmanager.html b/Mywebsite/templates/Mywebsite/contentnewsmanager.html new file mode 100644 index 0000000..32ebd99 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/contentnewsmanager.html @@ -0,0 +1,94 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +{% load static %} + +
+

ข้อมูลข่าวสาร

+ + + + + + + + + + + + {% for data in news %} + + + + + + {% if user.first_name == 'worrachag' %} + + + {% else %} + + + {% endif %} + + + + + + + + + + + + + + + + + + {% endfor %} + +
IDหัวข้อวันที่แก้ไขลบ
{{data.id}}{{data.news_title}}{{data.news_date}} +
+ + +
+
+ + + +
+ + + +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/header.html b/Mywebsite/templates/Mywebsite/header.html new file mode 100644 index 0000000..04c709e --- /dev/null +++ b/Mywebsite/templates/Mywebsite/header.html @@ -0,0 +1,99 @@ + +{% load static %} + + + + + + + + Django Web + + + + + + + + + + + +
+ + {% block content %} + + {% endblock %} + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/index.html b/Mywebsite/templates/Mywebsite/index.html new file mode 100644 index 0000000..ad13563 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/index.html @@ -0,0 +1,30 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +{% load static %} +
+ + + +
+ +
+{% for data in news %} +
+
+ + Card image cap +
+
{{data.news_title}}
+

{{data.news_date}}

+ +
+
+
+{%endfor%} +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/login.html b/Mywebsite/templates/Mywebsite/login.html new file mode 100644 index 0000000..a98b315 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/login.html @@ -0,0 +1,23 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +
+

Login เข้าใช้งานระบบ

+{% for msg in messages %} + +{% endfor %} + +
+ {% csrf_token %} +
+ + +
+
+ + +
+ +
+{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/postfrom.html b/Mywebsite/templates/Mywebsite/postfrom.html new file mode 100644 index 0000000..7724266 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/postfrom.html @@ -0,0 +1,13 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +
+

เพิ่มข้อมูลข่าวสาร

+
+ {% csrf_token %} + {{ form.as_p }} + + + +
+ +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/regisuser.html b/Mywebsite/templates/Mywebsite/regisuser.html new file mode 100644 index 0000000..f281b49 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/regisuser.html @@ -0,0 +1,47 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +
+

ลงทะเบียนผู้ใช้งาน

+{% for msg in messages %} + +{% endfor %} + +
+ {% csrf_token %} +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/result.html b/Mywebsite/templates/Mywebsite/result.html new file mode 100644 index 0000000..2e60d7f --- /dev/null +++ b/Mywebsite/templates/Mywebsite/result.html @@ -0,0 +1,19 @@ +{% extends 'Mywebsite/header.html' %} +{% block content %} +
+ +{% for data in result %} + +
+

{{data.news_title}}

+
+ + +
+ +
+

{{data.news_detail | safe }}

+
+
+{%endfor%} +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/templates/Mywebsite/warning.html b/Mywebsite/templates/Mywebsite/warning.html new file mode 100644 index 0000000..c8413b0 --- /dev/null +++ b/Mywebsite/templates/Mywebsite/warning.html @@ -0,0 +1,12 @@ + +{% extends 'Mywebsite/header.html' %} +{% block content %} +{% load static %} + + + +
+ +

คุณยังไม่ได้รับอนุญาติในการเพิ่มข้อมูลข่าว กรุณารอ admin ตรวจสอบข้อมูล

+ +{% endblock %} \ No newline at end of file diff --git a/Mywebsite/tests.py b/Mywebsite/tests.py new file mode 100644 index 0000000..de8bdc0 --- /dev/null +++ b/Mywebsite/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/Mywebsite/urls.py b/Mywebsite/urls.py new file mode 100644 index 0000000..e51302f --- /dev/null +++ b/Mywebsite/urls.py @@ -0,0 +1,24 @@ +from django.urls import path +from . import views +from django.conf import settings +from django.conf.urls.static import static + + + +urlpatterns = [ + path('',views.index), + path('addnews/',views.addnews), + path('addnewsdata/',views.addnewsdata,name='addnewsdata'), + path('contentmanager/',views.contentmanager), + path('contentedit/',views.contentedit,name='contentedit'), + path('contentupdate/',views.contentupdate,name='contentupdate'), + path('contentdelete/',views.contentdelete,name='contentdelete'), + path('contentresult/',views.contentresult,name='contentresult'), + path('regisuser/',views.regisuser), + path('regisuserdata/',views.regisuserdata,name='regisuserdata'), + path('login/',views.login), + path('logincheck/',views.logincheck,name='logincheck'), + path('logoff/',views.logoff), + path('warning/',views.warning) +] + static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) + static(settings.STATIC_URL,document_root=settings.STATIC_ROOT) + diff --git a/Mywebsite/views.py b/Mywebsite/views.py new file mode 100644 index 0000000..4807f0a --- /dev/null +++ b/Mywebsite/views.py @@ -0,0 +1,131 @@ +from django.shortcuts import render,redirect +from django.http import HttpResponse +from .models import tb_news +from django.contrib.auth.models import User,auth +from django.contrib import messages +from django.contrib.auth.decorators import login_required,permission_required + +# Create your views here. + + + +def handler404(request, exception): + return render(request,'Mywebsite/404error.html') + +def index(request): + content = tb_news.objects.all().order_by("-id") + return render(request,'Mywebsite/index.html',{'news':content}) + +@login_required(login_url='/login') +@permission_required('is_staff',login_url='/warning') +def addnews(request): + return render(request,'Mywebsite/addnews.html') + +#news_title news_detail news_photo news_date +def addnewsdata(request): + news_title = request.POST['news_title'] + news_detail = request.POST['news_detail'] + news_photo = request.FILES['news_photo'] + content = tb_news(news_title=news_title,news_detail=news_detail,news_photo=news_photo) + content.save() + return redirect("/contentmanager") + +@login_required(login_url='/login') +@permission_required('is_staff',login_url='/warning') +def contentmanager(request): + mydatanews = tb_news.objects.all() + return render(request,'Mywebsite/contentnewsmanager.html',{'news':mydatanews}) + +def contentedit(request): + id = request.GET['id'] + result = tb_news.objects.filter(pk=id) + print(result) + return render(request,'Mywebsite/contentedit.html',{'result':result}) + +def contentupdate(request): + id = request.POST['id'] + news_title = request.POST['news_title'] + news_detail = request.POST['news_detail'] + + try: + news_photo = request.FILES['news_photo'] + except KeyError: + news_photo = None + + content = tb_news.objects.get(pk=id) + content.news_title = news_title + content.news_detail = news_detail + if news_photo is not None: + content.news_photo = news_photo + content.save() + return redirect("/contentmanager") + + +def contentdelete(request): + id = request.POST['id'] + content = tb_news.objects.get(pk=id) + content.delete() + return redirect("/contentmanager") + +def contentresult(request): + id = request.GET['id'] + content = tb_news.objects.filter(pk=id) + return render(request,'Mywebsite/result.html',{'result':content}) + +def regisuser(request): + return render(request,'Mywebsite/regisuser.html') + +def regisuserdata(request): + fname = request.POST['fname'] + lname = request.POST['lname'] + email = request.POST['email'] + username = request.POST['username'] + password = request.POST['password'] + repassword = request.POST['repassword'] + + if password == repassword: + if User.objects.filter(username=username).exists(): + messages.error(request,"Username ซ้ำในระบบ") + return redirect("/regisuser") + elif User.objects.filter(email=email).exists(): + messages.error(request,"Email ซ้ำในระบบ") + return redirect("/regisuser") + else: + user = User.objects.create_user( + first_name=fname, + last_name=lname, + username=username, + password=password, + email=email + ) + user.save() + return redirect("/") + else: + messages.error(request,"Password และ Repassword ไม่ตรงกัน") + return redirect("/regisuser") + +def login(request): + if request.user.is_authenticated: + return redirect("/") + return render(request,'Mywebsite/login.html') + +def logincheck(request): + username = request.POST['username'] + password = request.POST['password'] + user = auth.authenticate(username=username,password=password) + if user is not None: + auth.login(request,user) + return redirect('/') + else: + messages.error(request,"ไม่พบผู้ใช้งานในระบบ") + return redirect('/login') + +def logoff(request): + auth.logout(request) + return redirect("/login") + + + + +def warning(request): + return render(request,'Mywebsite/warning.html') \ No newline at end of file diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..a6ba3cf --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Djangoproject.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a2efc5d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +django +django_wysiwyg +django-ckeditor +Pillow \ No newline at end of file