Skip to content
Open

New #16

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
114 changes: 114 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Byte-compiled / optimized / DLL files
__pycache__/
*.pyc
*.py[cod]
*$py.class
cert/
# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/
.vscode
# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

.DS_Store
db.sqlite3
*.sqlite3
media/
*.pyc
*.db
*.pid
# django migrations
**/migrations/**
!**/migrations
!**/migrations/__init__.py
Binary file added DevjamProject/.urls.py.swp
Binary file not shown.
Binary file removed DevjamProject/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/settings.cpython-37.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/wsgi.cpython-36.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/wsgi.cpython-37.pyc
Binary file not shown.
Binary file removed DevjamProject/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
16 changes: 9 additions & 7 deletions DevjamProject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '&t1m1hm&w7aiuq=x7x1!4z4wo0wwilkd6f@u*o8)e-n@&=r&t('

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

ALLOWED_HOSTS = []
myDomainName='motiopolis.ddns.net'
ALLOWED_HOSTS = ['localhost',myDomainName,'13.76.41.218']


# Application definition

INSTALLED_APPS = [
'sslserver',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand All @@ -48,7 +49,6 @@
'Group',
'django_summernote',
'materializecssform',

]

MIDDLEWARE = [
Expand All @@ -59,6 +59,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.http.ConditionalGetMiddleware',
]

ROOT_URLCONF = 'DevjamProject.urls'
Expand All @@ -84,9 +85,10 @@
]

WSGI_APPLICATION = 'DevjamProject.wsgi.application'


SESSION_COOKIE_DOMAIN = ".motiopolis.ddns.net"
SECURE_SSL_REDIRECT = True
# Database

# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

DATABASES = {
Expand Down Expand Up @@ -150,7 +152,7 @@

EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST ='smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_PORT = 25
EMAIL_USE_TLS = True
EMAIL_HOST_USER = "divanimax@gmail.com"
EMAIL_HOST_PASSWORD = "xedgeqtgxpzwfxpx"
Expand Down
15 changes: 11 additions & 4 deletions DevjamProject/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from user import views as user_views
from django.conf import settings
from django.conf.urls.static import static

from django.conf.urls import include,url
from django.views.static import serve
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('Post.urls')),
Expand All @@ -18,7 +19,13 @@
path('user/',include('user.urls')),
path('group/',include('Group.urls')),
path('summernote/', include('django_summernote.urls')),
]
]
#+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if not settings.DEBUG:
urlpatterns += [
url(r'^media/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT}),
url(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
]

if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# if not settings.DEBUG:
# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Binary file removed Group/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed Group/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file removed Group/__pycache__/forms.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/forms.cpython-38.pyc
Binary file not shown.
Binary file removed Group/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file removed Group/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed Group/__pycache__/views.cpython-37.pyc
Binary file not shown.
Binary file removed Group/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0001_initial.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0003_groupmember_auth.cpython-37.pyc
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0004_channel.cpython-37.pyc
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0005_group_created_by.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0008_group_logo.cpython-37.pyc
Binary file not shown.
Binary file modified Group/migrations/__pycache__/0009_group_link.cpython-37.pyc
Binary file not shown.
Binary file modified Group/migrations/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed Post/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file removed Post/__pycache__/apps.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/apps.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/forms.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/forms.cpython-38.pyc
Binary file not shown.
Binary file removed Post/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file removed Post/__pycache__/urls.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file removed Post/__pycache__/views.cpython-36.pyc
Binary file not shown.
Binary file removed Post/__pycache__/views.cpython-37.pyc
Binary file not shown.
Binary file removed Post/__pycache__/views.cpython-38.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0001_initial.cpython-36.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0001_initial.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0002_post_views.cpython-36.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0002_post_views.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0003_post_tags.cpython-36.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0003_post_tags.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0004_grouppost.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0005_poll_pollchoice.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0006_auto_20200517_1027.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0007_delete_poll.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/0008_poll.cpython-37.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified Post/migrations/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/admin.cpython-38.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file removed Tag/__pycache__/models.cpython-38.pyc
Binary file not shown.
Binary file modified Tag/migrations/__pycache__/0001_initial.cpython-36.pyc
Binary file not shown.
Binary file modified Tag/migrations/__pycache__/0001_initial.cpython-37.pyc
Binary file not shown.
Binary file modified Tag/migrations/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file modified Tag/migrations/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file removed db.sqlite3
Binary file not shown.
18 changes: 18 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
boto3==1.13.9
botocore==1.16.9
decorator==4.4.0
Django==3.0.3
django-crispy-forms==1.9.0
django-dev==0.2.1
django-materializecss-form==1.1.17
django-mathfilters==1.0.0
django-misaka==0.2.1
django-rest-framework==0.1.0
django-summernote==0.8.11.6
djangorestframework==3.11.0
docutils==0.15.2
misaka==2.1.1
numpy==1.18.1
Pillow==5.4.1
requests==2.21.0
s3transfer==0.3.3
4 changes: 4 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# python3 ./manage.py migrate
# python3 ./manage.py runserver 0.0.0.0:8000
python3 manage.py runserver --insecure
Loading