Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pillow from 7.0.0 to 7.1.0 #4

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions LICENSE

This file was deleted.

Empty file added Login/__init__.py
Empty file.
Binary file added Login/__pycache__/__init__.cpython-36.pyc
Binary file not shown.
Binary file added Login/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added Login/__pycache__/settings.cpython-36.pyc
Binary file not shown.
Binary file added Login/__pycache__/settings.cpython-38.pyc
Binary file not shown.
Binary file added Login/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added Login/__pycache__/wsgi.cpython-38.pyc
Binary file not shown.
16 changes: 16 additions & 0 deletions Login/asgi.py
@@ -0,0 +1,16 @@
"""
ASGI config for Login 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', 'Login.settings')

application = get_asgi_application()
123 changes: 123 additions & 0 deletions Login/settings.py
@@ -0,0 +1,123 @@

import os
from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().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 = '&z9yaki6^*-kmxxw)q@%&5s8(b=&=e04%-pb7vs8ne&bwh9#m0'

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

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'django.contrib.sites',
'django.contrib.admin',
'registration',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'bootstrap4',
'Login',
]

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 = 'Login.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '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 = 'Login.wsgi.application'


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

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'djangologin',
'USER': 'karis',
'PASSWORD': 'K@r!s##!',
}
}


# 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 = 'en-us'

TIME_ZONE = 'Africa/Nairobi'

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



ACCOUNT_ACTIVATION_DAYS = 7 # One-Week Activation Expiry
REGISTRATION_AUTO_LOGIN = True # Automatically Log the User In.
SITE_ID = 1
LOGIN_REDIRECT_URL = '/'
14 changes: 14 additions & 0 deletions Login/urls.py
@@ -0,0 +1,14 @@
"""Login URL Configuration"""

# Imports Views For Success to Render Content.
from Success import views
from django.urls import include

from django.contrib import admin
from django.urls import path

urlpatterns = [
path('admin/', admin.site.urls),
# Includes Success url patterns
path('', include('Success.urls')),
]
16 changes: 16 additions & 0 deletions Login/wsgi.py
@@ -0,0 +1,16 @@
"""
WSGI config for Login 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', 'Login.settings')

application = get_wsgi_application()
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: gunicorn Login.wsgi
144 changes: 10 additions & 134 deletions README.md
@@ -1,151 +1,27 @@
# DESCRIPTION
# Login

This is a **shell script** that that allows **execution of Django** a python based framework.
# Description

A shell script is a **computer program** designed to be run by the Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts ***include file manipulation, program execution, and printing text.*** A script which sets up the environment, runs the program, and does any necessary cleanup, logging, etc. is called a wrapper.

Django is a **high-level Python Web framework** that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel.

# **WHAT THIS DJANGO-SHELL-SCRIPT DOES FOR YOU.**

**{Please go through what this shell-script does for you. It will help you avoid bugs in your code. In case you use a technology that might cause failure of your code to run}**

1. Creates a **folder** for you.

2. Initializes Empty **Git Repository**.

3. Installs **Django 2.0.7** (Can be updated to latest version).

4. Installs **Django-bootstrap4.**

5. Installs **pillow** for Image Integration.

6. Installs **dj-database-url.**

7. Installs **gunicorn.**

8. Installs **psycopg2.**

9. Installs **whitenoise.**

10. Installs **python-decouple.**

11. Installs **wheel**


**CREATED FILES**
The script also **helps in creating some files** and this making it easy for you to code as you no longer hav to create them on your own.

It simply creates files and adds the preset standard code thats will not change in any given file structure.


1. Creates **static** file together with **css files.**

2. Creates **templates**

3. Creates **base.html** and **adds it to** the templates folder.

4. Creates **index.html**, **links it to base.html using {% extends ' '%}** then **adds it to** templates folder.

5. Creates **virtual environment**.

6. Creates **.env** file and **sets DEBUG = True**

7. Creates **.gitignore** and adds **(virtual/ | *.pyc | .env | migrations/ )** to .gitignore.

8. Creates **Procfile**

9. Creates **README.md**

10. Creates **requirements.txt**

* You are now ready to code.



# Prerequisites.

* You need to have nano text editor installed. you can find out whether you have it installed by typing nano --version in your terminal. For most linux distributions, it is installed by default.

* To work with the script you have to clone Django-shell-script on my github repo.

Link:-> ```https://github.com/zecollokaris/Django-shell-script```

**Installing Nano Text Editor.**

-However, if you don't have it installed, you can quicky do that by typing:


```
sudo apt-get install nano
```

* You need to have (python3.6) installed in your machine.

-To check if you already have python3.6 before installing type:



```
python3.6 -V
```

**Installing Python3.6**

To install python3.6 you can quicky do that by typing:



```
sudo apt-get install python3.6
```
# Prerequisites

# Setup/Installation Reqiurements.

**{follow the below instructions for set up.}**

1. You will need **Internet connection.**

2. You will also need a Webpage URL to load in URL's:

3. To **get to use Django-shell-script** fist you need to get to the **Django-shell-script repository.**

Link:-> ```https://github.com/zecollokaris/Django-shell-script```

4. From there you can access Django-shell-script.

5. **Clone** the project.

6. **Once you done with cloning** and project is on your device.
# Technologies Used

7. **get into project folder** (cd into project).
# Support and Contact

-Mobile number: (+254) 798731203

-Email Address: collo.kariss@gmail.com

# **HOW TO USE.**

**To work With this Django-shell-script**

1. **Make sure your inside folder containing script.**

2. Create **Django folder structure**

```
source newDjango.sh (PROJECTNAME) (APPNAME)
```

3. From there the it will **prompt you to create a PostgreSQL Database** an object-relational database management system.

4. You Django is ready **HAPPY CODING :-)**

---
-github-username: zecollokaris

## License

The app is licensed by MIT.

MIT (c) 2018 - 2020
Collins Kariuki - MIT (c)2018 LICENSE


Feel FREE to contribute to make the **script** better for others.

---
Empty file added Success/__init__.py
Empty file.
Binary file added Success/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file added Success/__pycache__/urls.cpython-38.pyc
Binary file not shown.
Binary file added Success/__pycache__/views.cpython-38.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions Success/admin.py
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions Success/apps.py
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class SuccessConfig(AppConfig):
name = 'Success'
Empty file added Success/migrations/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions Success/models.py
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
22 changes: 22 additions & 0 deletions Success/templates/Success/base.html
@@ -0,0 +1,22 @@
{%load bootstrap4 %}
{% load static %}
<html>
<head>
<meta charset="utf-8">
<title> Login</title>
{%block styles%}
{%bootstrap_css%}
<link rel="stylesheet" href="{%static 'css/Success.css'%}">
{% endblock %}

</head>
<body>
{%block content%}
{% endblock %}
{% block scripts %}
<script src="//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/ScrollMagic.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> {% bootstrap_javascript %} {% endblock %}
</body>
</html>

2 changes: 2 additions & 0 deletions Success/templates/Success/index.html
@@ -0,0 +1,2 @@
{%extends 'Success/base.html'%}
{%block content%}