first commit mostly done

This commit is contained in:
2018-03-14 07:31:46 -06:00
commit 423b27b0b3
37 changed files with 503 additions and 0 deletions

View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
cs2610hw5/Blog/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

5
cs2610hw5/Blog/apps.py Normal file
View File

@@ -0,0 +1,5 @@
from django.apps import AppConfig
class BlogConfig(AppConfig):
name = 'Blog'

View File

3
cs2610hw5/Blog/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,111 @@
.header{
background: url("Images/headerphoto.jpg") no-repeat;
width: 100%;
height: 156px;
background-size: 100%;
text-align: center;
}
div nav {
display: flex;
flex-direction: row;
justify-content: space-evenly;
}
.pageHeader {
font-family: 'Arial', "Arial Black", sans-serif ;
letter-spacing: 1px;
text-align: center;
font-size: x-large;
}
.blogAsideH2 {
align-self: flex-end;
font-family: Impact, Charcoal, sans-serif;
letter-spacing: 1px;
font-size: x-large;
text-emphasis-color: blue;
}
.mainBody {
display: flex;
flex-wrap: wrap;
}
body {
background-color: lightgray;
}
.mainBody .techTips p {
flex-direction: column;
order: 1;
}
.mainBody .techTips img {
order: 2;
}
.blogA {
flex: 2;
flex-wrap: wrap;
order: 1;
font-family: 'helvetica neue', helvetica, sans-serif;
letter-spacing: 1px;
padding: 3px 10px;
margin: 10px;
cursor: pointer;
}
.blogPosts {
border-radius: 10px;
border: 2px solid;
margin-bottom: 5px;
background-color: darkgray;
}
aside {
flex: 1;
order: 2;
}
aside h1 {
text-decoration: underline;
}
aside img {
max-width:100%;
max-height:100%;
}
.bioDiv {
display:flex;
flex-direction: row;
}
.bioPhoto img {
flex: 0 0 60%;
}
.BIOFAVS {
flex: 0 0 20%;
}
image {
max-width:100%;
max-height:100%;
}
.blogHeader {
font-family: 'Arial', "Arial Black", sans-serif ;
letter-spacing: 1px;
text-align: center;
font-size: large;
}
footer {
font-family: 'Arial', "Arial Black", sans-serif ;
letter-spacing: 1px;
text-align: center;
font-size: x-small;
}

View File

@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
{% load static %}
<meta charset="utf-8">
<link rel="stylesheet" href="{% static "Blog/style.css" %}">
<title>Welcome</title>
</head>
<body>
<div class="header">
<h1>Crucio Assignment</h1>
</div>
<div>
<nav>
<a class="NavLinks" href= "{% url 'bio' %}"><h2>BIO</h2></a>
<a class="NavLinks" href="{% url 'techTips' %}"><h2>Tech Tips</h2></a>
<a class="NavLinks" href="{% url 'index' %}"><h2>Home</h2></a>
</nav>
</div>
</body>
<main class="bioMainBody">
<div class="bioDiv">
<image>
<img class = "bioPhoto" src ="{% static "Blog/Images/hd-harry-potter-free-wallpapers-free-download.jpg" %}">
</image>
<aside class="BIOFAVS">
<h1>My Favorite Things</h1>
<h2>My Girlfriend Ginny</h2>
<img src="{% static "Blog/Images/Ginny.jpg"%}">
<h2>My Pet Owl</h2>
<img src="{% static "Blog/Images/Hedwig.jpg"%}">
<h2>Dueling with my friend Lord Voldemort</h2>
<p>(He plays dirty though, have to watch him!)</p>
<img src="{% static "Blog/Images/Dueling.jpg"%}">
</aside>
</div>
<article class="blogPosts">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero.
</p>
<p>
Sed dignissim lacinia nunc. Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit.
</p>
<p>
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante. Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis. Nulla facilisi. Ut fringilla. Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna.
</p>
<p>
Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi.
</p>
<p>
Integer lacinia sollicitudin massa. Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo.
</p>
</article>
</main>
<footer>This is my footer and its super duper awesome. See!</footer>
</html>

View File

@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
{% load static %}
<meta charset="utf-8">
<link rel="stylesheet" href= "{% static "Blog/style.css" %}">
<title>Welcome</title>
</head>
<body>
<div class="header">
<h1>Crucio Assignment</h1>
</div>
<div>
<nav>
<a class="NavLinks" href= "{% url 'bio' %}"><h2>BIO</h2></a>
<a class="NavLinks" href="{% url 'techTips' %}"><h2>Tech Tips</h2></a>
<a class="NavLinks" href="{% url 'index' %}"><h2>Home</h2></a>
</nav>
</div>
<main class="mainBody">
<aside>
<h1>
Unforgivable Curses
</h1>
<a href="http://harrypotter.wikia.com/wiki/Killing_Curse"><h2 class="blogAsideH2">Avada Kedavra</h2></a>
<a href="http://harrypotter.wikia.com/wiki/Imperius_Curse"><h2 class="blogAsideH2">Imperio</h2></a>
<a href="http://harrypotter.wikia.com/wiki/Cruciatus_Curse"><h2 class="blogAsideH2">Crucio</h2></a>
</aside>
<article class="blogA">
<div class="blogPosts">
<header class="blogHeader"><h1>Lorem Ipsum Dolor</h1></header>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec venenatis ullamcorper dui fringilla lacinia. Aenean nec felis mauris. Curabitur volutpat diam risus, vel placerat diam aliquam pretium. Suspendisse condimentum leo mauris, vel pulvinar ex efficitur quis. Duis convallis purus tellus, non fermentum quam ultricies sit amet. Quisque convallis, nunc eget hendrerit pharetra, mauris leo venenatis eros, nec pulvinar ipsum lectus eget nisl. In eu posuere tortor, eu dignissim ipsum. In id feugiat sem. Etiam feugiat maximus pretium. Quisque sed nisi sed lacus faucibus tristique. Ut eu ultrices felis. In dui ante, fringilla at augue id, porta finibus est. Vestibulum consectetur vel lacus nec blandit. Vivamus non lacus eros. Nunc commodo commodo ullamcorper. Vestibulum sed erat in justo ultrices fermentum in feugiat orci.
Cras at maximus enim. Etiam eu felis vel nisi hendrerit hendrerit. Mauris fermentum, urna et accumsan tincidunt, purus tellus fermentum libero, id laoreet est magna sed felis. Nam fermentum interdum nunc vel tristique. Integer accumsan ipsum quis est convallis dapibus. Curabitur varius bibendum diam quis eleifend. Vestibulum quis semper erat. Duis vel maximus tortor. Sed vehicula ullamcorper libero, quis rhoncus erat condimentum sit amet. Etiam quispurus quam.
</p>
</div>
<div class="blogPosts">
<header class="blogHeader"><h1>Vestibulum Ante Ipsum</h1></header>
<p>
Etiam ac leo nec risus mattis finibus non in dolor. Vivamus aliquam scelerisque risus, a convallis diam mattis id. Mauris sit amet erat ipsum. Vestibulum auctor, ex id vehicula accumsan, magna eros volutpat neque, id iaculis enimdolor eu dui. In hac habitasse platea dictumst. Cras rutrum enim at tellus blandit euismod. Praesent cursus liberodiam, in tempor lectus bibendum quis. Vestibulum interdum convallis tortor, ullamcorper ullamcorper augue feugiatvel. Sed sollicitudin nulla est, eget consequat quam molestie in. Nunc augue neque, rhoncus vitae ullamcorper tristique, bibendum nec dolor. Mauris faucibus aliquam magna eget commodo.
</p>
</div>
<div class="blogPosts">
<header class="blogHeader"><h1>In Varius Leo Vel Velit</h1></header>
<p>
Maecenas suscipit tempus neque non dapibus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In hachabitasse platea dictumst. Maecenas vehicula consectetur dignissim. Suspendisse egestas maximus turpis quiseuismod. Morbi pulvinar metus justo, quis aliquam leo pellentesque sed. Morbi sagittis laoreet orci, in pharetra tortor faucibus id.
</p>
</div>
</article>
</main>
<footer>This is my footer and its super duper awesome. See! {% now "jS F Y H:i" %}</footer>
</body>
</html>

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html>
<!-- A00987897 Brady Bodily -->
<head>
{% load static %}
<meta charset="UTF-8">
<link rel="stylesheet" href="{% static "Blog/style.css" %}">
<title>GIT Cheat Sheet!</title>
</head>
<body>
<div class="header">
<h1>GIT Cheat Sheet!</h1>
</div>
<div>
<nav>
<a class="NavLinks" href= "{% url 'bio' %}"><h2>BIO</h2></a>
<a class="NavLinks" href="{% url 'techTips' %}"><h2>Tech Tips</h2></a>
<a class="NavLinks" href="{% url 'index' %}"><h2>Home</h2></a>
</nav>
</div>
<main class="mainBody">
<article class="techTips">
<h1>GIT Commands</h1>
<h2>Getting started with git</h2>
<ol>
<li>Create a Repo
<ul>
<li>
Initialize Repo - <code>git init</code>
<li>
Stage files to Repo - <code>git add .</code>
</li>
</ul>
</li>
</ol>
<h1>GIT Command Descriptions</h1>
<h2>What do they do?</h2>
<ol>
<li>Descriptions
<ul>
<li>
<p>Initialize Repo - This creates the .git direcories allowing for version control</p>
</li>
</ul>
<ul>
<li>
<p>Add files to Repo - This stages all of your files in the directory,
so that they can be commited to the .git.</p>
</li>
</ul>
</li>
</ol>
<h2>For a full cheat sheet use the <a href="https://education.github.com/git-cheat-sheet-education.pdf">Github cheat sheet</a>.</h2>
</article>
<aside>
<img src="{% static "Blog/Images/Voldemort.jpg"%}">
<img src="{% static "Blog/Images/images.jpg"%}">
<img src="{% static "Blog/Images/python.jpg"%}">
<img src="https://octodex.github.com/images/dojocat.jpg" alt="GitHub Ninja Cat">
</aside>
</main>
</body>
</html>

3
cs2610hw5/Blog/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

9
cs2610hw5/Blog/urls.py Normal file
View File

@@ -0,0 +1,9 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('bio/', views.bio, name='bio'),
path('techTips/', views.techTips, name='techTips')
]

12
cs2610hw5/Blog/views.py Normal file
View File

@@ -0,0 +1,12 @@
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'Blog/index.html', {})
def techTips(request):
return render(request, 'Blog/techTips.html', {})
def bio(request):
return render(request, 'Blog/bio.html', {})

View File

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,121 @@
"""
Django settings for cs2610hw5 project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '9l#&_q$*b=js@hum#_(k^ot#=)=gnstg9!2=x2kn7o@xbc6e__'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'Blog.apps.BlogConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
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 = 'cs2610hw5.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'cs2610hw5.wsgi.application'
# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Password validation
# https://docs.djangoproject.com/en/2.0/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/2.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/
STATIC_URL = '/static/'

View File

@@ -0,0 +1,23 @@
"""cs2610hw5 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/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('Blog/',include('Blog.urls')),
path('admin/', admin.site.urls),
]

View File

@@ -0,0 +1,16 @@
"""
WSGI config for cs2610hw5 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/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cs2610hw5.settings")
application = get_wsgi_application()

BIN
cs2610hw5/db.sqlite3 Normal file

Binary file not shown.

15
cs2610hw5/manage.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cs2610hw5.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)