Skip to content

Commit

Permalink
Creating models
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorv-webdesign committed Apr 10, 2017
1 parent acd5bbe commit 2bd7d6e
Show file tree
Hide file tree
Showing 59 changed files with 620 additions and 235 deletions.
17 changes: 0 additions & 17 deletions .gitattributes

This file was deleted.

47 changes: 0 additions & 47 deletions .gitignore

This file was deleted.

Binary file removed polls/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file removed polls/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file removed polls/__pycache__/apps.cpython-35.pyc
Binary file not shown.
Binary file removed polls/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file removed polls/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file removed polls/__pycache__/views.cpython-35.pyc
Binary file not shown.
5 changes: 0 additions & 5 deletions polls/apps.py

This file was deleted.

38 changes: 0 additions & 38 deletions polls/migrations/0001_initial.py

This file was deleted.

Binary file not shown.
Binary file removed polls/migrations/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
23 changes: 0 additions & 23 deletions polls/models.py

This file was deleted.

12 changes: 0 additions & 12 deletions polls/templates/polls/detail.html

This file was deleted.

9 changes: 0 additions & 9 deletions polls/templates/polls/index.html

This file was deleted.

9 changes: 0 additions & 9 deletions polls/templates/polls/results.html

This file was deleted.

15 changes: 0 additions & 15 deletions polls/urls.py

This file was deleted.

44 changes: 0 additions & 44 deletions polls/views.py

This file was deleted.

Binary file removed takesides/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file removed takesides/__pycache__/settings.cpython-35.pyc
Binary file not shown.
Binary file removed takesides/__pycache__/wsgi.cpython-35.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion manage.py → yaorna/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "takesides.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "yaorna.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
Expand Down
File renamed without changes.
Binary file added yaorna/yaorna/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added yaorna/yaorna/__pycache__/settings.cpython-35.pyc
Binary file not shown.
Binary file not shown.
Binary file added yaorna/yaorna/__pycache__/wsgi.cpython-35.pyc
Binary file not shown.
Binary file renamed db.sqlite3 → yaorna/yaorna/database.db
Binary file not shown.
29 changes: 22 additions & 7 deletions takesides/settings.py → yaorna/yaorna/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for takesides project.
Django settings for yaorna project.
Generated by 'django-admin startproject' using Django 1.10.6.
Expand All @@ -12,6 +12,9 @@

import os

PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
LOGIN_URL = '/'

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

Expand All @@ -20,7 +23,7 @@
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'jm06&nkpo&yh%e==fq!+v2sws*$h-kuwecn+cj#%tnh#yagm1c'
SECRET_KEY = '^ufsgs-w@k+h%vh50d&sb1!nz1*f1!u5vy05=6%)cvk7787s*g'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
Expand All @@ -31,13 +34,14 @@
# Application definition

INSTALLED_APPS = [
'polls.apps.PollsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'yaorna_app',
]

MIDDLEWARE = [
Expand All @@ -50,7 +54,7 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'takesides.urls'
ROOT_URLCONF = 'yaorna.urls'

TEMPLATES = [
{
Expand All @@ -68,16 +72,20 @@
},
]

WSGI_APPLICATION = 'takesides.wsgi.application'
WSGI_APPLICATION = 'yaorna.wsgi.application'


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

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': os.path.join(PROJECT_PATH, 'database.db'), # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}

Expand Down Expand Up @@ -115,7 +123,14 @@
USE_TZ = True


# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/

STATIC_URL = '/static/'

57 changes: 57 additions & 0 deletions yaorna/yaorna/templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet/less" href="{{ STATIC_URL }}style.less">
<script src="{{ STATIC_URL }}less.js"></script>
</head>
<body>
<header>
<div class="wrapper">
<img src="{{ STATIC_URL }}gfx/logo.png">
<span>Twitter Clone</span>
{% block login %}
<a href="/">Home</a>
<a href="/users/">Public Profiles</a>
<a href="/users/{{ username }}">My Profile</a>
<a href="/ribbits">Public Ribbits</a>
<form action="/logout">
<input type="submit" id="btnLogOut" value="Log Out">
</form>
{% endblock %}
</div>
</header>
<div id="content">
<div class="wrapper">
{% block flash %}
{% if auth_form.non_field_errors or user_form.non_field_errors or ribbit_form.errors %}
<div class="flash error">
{{ auth_form.non_field_errors }}
{{ user_form.non_field_errors }}
{{ ribbit_form.content.errors }}
</div>
{% endif %}
{% if notice %}
<div class="flash notice">
{{ notice }}
</div>
{% endif %}
{% endblock %}

{% block content %}

{% endblock %}
</div>
</div>
<footer>
<div class="wrapper">
Ribbit - A Twitter Clone Tutorial
<a href="http://net.tutsplus.com">
<img src="{{ STATIC_URL }}gfx/logo-nettuts.png">
</a>
<a href="http://www.djangoproject.com/">
<img src="https://www.djangoproject.com/m/img/badges/djangomade124x25.gif" border="0" alt="Made with Django." title="Made with Django." />
</a>
</div>
</footer>
</body>
</html>
Loading

0 comments on commit 2bd7d6e

Please sign in to comment.