forked from agiliq/django-wordpress
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 79d432f
Showing
9 changed files
with
307 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.pyc | ||
*.log | ||
*.temp | ||
localsettings.py | ||
*secrets.py | ||
*secret.py | ||
*.wpr | ||
*.kpf | ||
*.pydev* | ||
*.project |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
from django.core.management import execute_manager | ||
try: | ||
import settings # Assumed to be in the same directory. | ||
except ImportError: | ||
import sys | ||
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) | ||
sys.exit(1) | ||
|
||
if __name__ == "__main__": | ||
execute_manager(settings) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Django settings for wp_backport project. | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
ADMINS = ( | ||
# ('Your Name', 'your_email@domain.com'), | ||
) | ||
|
||
MANAGERS = ADMINS | ||
|
||
DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | ||
DATABASE_NAME = 'carkitchen_ut_b' # Or path to database file if using sqlite3. | ||
DATABASE_USER = 'root' # Not used with sqlite3. | ||
DATABASE_PASSWORD = 'shabda' # Not used with sqlite3. | ||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. | ||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. | ||
|
||
# Local time zone for this installation. Choices can be found here: | ||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name | ||
# although not all choices may be available on all operating systems. | ||
# If running in a Windows environment this must be set to the same as your | ||
# system time zone. | ||
TIME_ZONE = 'America/Chicago' | ||
|
||
# Language code for this installation. All choices can be found here: | ||
# http://www.i18nguy.com/unicode/language-identifiers.html | ||
LANGUAGE_CODE = 'en-us' | ||
|
||
SITE_ID = 1 | ||
|
||
# If you set this to False, Django will make some optimizations so as not | ||
# to load the internationalization machinery. | ||
USE_I18N = True | ||
|
||
# Absolute path to the directory that holds media. | ||
# Example: "/home/media/media.lawrence.com/" | ||
MEDIA_ROOT = '' | ||
|
||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a | ||
# trailing slash if there is a path component (optional in other cases). | ||
# Examples: "http://media.lawrence.com", "http://example.com/media/" | ||
MEDIA_URL = '' | ||
|
||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a | ||
# trailing slash. | ||
# Examples: "http://foo.com/media/", "/media/". | ||
ADMIN_MEDIA_PREFIX = '/media/' | ||
|
||
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = '@cu79xj-4n7aenosbs#v0j(bj$$0#)h457=9k+wkm7jkxi**_%' | ||
|
||
# List of callables that know how to import templates from various sources. | ||
TEMPLATE_LOADERS = ( | ||
'django.template.loaders.filesystem.load_template_source', | ||
'django.template.loaders.app_directories.load_template_source', | ||
# 'django.template.loaders.eggs.load_template_source', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
'django.middleware.common.CommonMiddleware', | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
) | ||
|
||
ROOT_URLCONF = 'wp_backport.urls' | ||
|
||
TEMPLATE_DIRS = ( | ||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | ||
# Always use forward slashes, even on Windows. | ||
# Don't forget to use absolute paths, not relative paths. | ||
) | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.sites', | ||
"wp", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from django.conf.urls.defaults import * | ||
|
||
# Uncomment the next two lines to enable the admin: | ||
# from django.contrib import admin | ||
# admin.autodiscover() | ||
|
||
urlpatterns = patterns('', | ||
# Example: | ||
# (r'^wp_backport/', include('wp_backport.foo.urls')), | ||
|
||
# Uncomment the admin/doc line below and add 'django.contrib.admindocs' | ||
# to INSTALLED_APPS to enable admin documentation: | ||
# (r'^admin/doc/', include('django.contrib.admindocs.urls')), | ||
|
||
# Uncomment the next line to enable the admin: | ||
# (r'^admin/', include(admin.site.urls)), | ||
) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
# This is an auto-generated Django model module. | ||
# You'll have to do the following manually to clean this up: | ||
# * Rearrange models' order | ||
# * Make sure each model has one field with primary_key=True | ||
# Feel free to rename the models, but don't rename db_table values or field names. | ||
# | ||
# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]' | ||
# into your database. | ||
|
||
from django.db import models | ||
|
||
class WpCommentmeta(models.Model): | ||
meta_id = models.IntegerField(primary_key=True) | ||
comment_id = models.IntegerField() | ||
meta_key = models.CharField(max_length=765, blank=True) | ||
meta_value = models.TextField(blank=True) | ||
class Meta: | ||
db_table = u'wp_commentmeta' | ||
|
||
class WpComments(models.Model): | ||
comment_id = models.IntegerField(primary_key=True, db_column='comment_ID') # Field name made lowercase. | ||
comment_post_id = models.IntegerField(db_column='comment_post_ID') # Field name made lowercase. | ||
comment_author = models.TextField() | ||
comment_author_email = models.CharField(max_length=300) | ||
comment_author_url = models.CharField(max_length=600) | ||
comment_author_ip = models.CharField(max_length=300, db_column='comment_author_IP') # Field name made lowercase. | ||
comment_date = models.DateTimeField() | ||
comment_date_gmt = models.DateTimeField() | ||
comment_content = models.TextField() | ||
comment_karma = models.IntegerField() | ||
comment_approved = models.CharField(max_length=60) | ||
comment_agent = models.CharField(max_length=765) | ||
comment_type = models.CharField(max_length=60) | ||
comment_parent = models.IntegerField() | ||
user_id = models.IntegerField() | ||
class Meta: | ||
db_table = u'wp_comments' | ||
|
||
class WpLinks(models.Model): | ||
link_id = models.IntegerField(primary_key=True) | ||
link_url = models.CharField(max_length=765) | ||
link_name = models.CharField(max_length=765) | ||
link_image = models.CharField(max_length=765) | ||
link_target = models.CharField(max_length=75) | ||
link_category = models.IntegerField() | ||
link_description = models.CharField(max_length=765) | ||
link_visible = models.CharField(max_length=60) | ||
link_owner = models.IntegerField() | ||
link_rating = models.IntegerField() | ||
link_updated = models.DateTimeField() | ||
link_rel = models.CharField(max_length=765) | ||
link_notes = models.TextField() | ||
link_rss = models.CharField(max_length=765) | ||
class Meta: | ||
db_table = u'wp_links' | ||
|
||
class WpOptions(models.Model): | ||
option_id = models.IntegerField(primary_key=True) | ||
blog_id = models.IntegerField() | ||
option_name = models.CharField(unique=True, max_length=192) | ||
option_value = models.TextField() | ||
autoload = models.CharField(max_length=60) | ||
class Meta: | ||
db_table = u'wp_options' | ||
|
||
class WpPostmeta(models.Model): | ||
meta_id = models.IntegerField(primary_key=True) | ||
post_id = models.IntegerField() | ||
meta_key = models.CharField(max_length=765, blank=True) | ||
meta_value = models.TextField(blank=True) | ||
class Meta: | ||
db_table = u'wp_postmeta' | ||
|
||
class WpPosts(models.Model): | ||
id = models.IntegerField(db_column='ID') # Field name made lowercase. | ||
post_author = models.IntegerField() | ||
post_date = models.DateTimeField() | ||
post_date_gmt = models.DateTimeField() | ||
post_content = models.TextField() | ||
post_title = models.TextField() | ||
post_category = models.IntegerField() | ||
post_excerpt = models.TextField() | ||
post_status = models.CharField(max_length=60) | ||
comment_status = models.CharField(max_length=60) | ||
ping_status = models.CharField(max_length=60) | ||
post_password = models.CharField(max_length=60) | ||
post_name = models.CharField(max_length=600) | ||
to_ping = models.TextField() | ||
pinged = models.TextField() | ||
post_modified = models.DateTimeField() | ||
post_modified_gmt = models.DateTimeField() | ||
post_content_filtered = models.TextField() | ||
post_parent = models.IntegerField() | ||
guid = models.CharField(max_length=765) | ||
menu_order = models.IntegerField() | ||
post_type = models.CharField(max_length=60) | ||
post_mime_type = models.CharField(max_length=300) | ||
comment_count = models.IntegerField() | ||
class Meta: | ||
db_table = u'wp_posts' | ||
|
||
class WpTermRelationships(models.Model): | ||
object_id = models.IntegerField(primary_key=True) | ||
term_taxonomy_id = models.IntegerField() | ||
term_order = models.IntegerField() | ||
class Meta: | ||
db_table = u'wp_term_relationships' | ||
|
||
class WpTermTaxonomy(models.Model): | ||
term_taxonomy_id = models.IntegerField(primary_key=True) | ||
term_id = models.IntegerField(unique=True) | ||
taxonomy = models.CharField(max_length=96) | ||
description = models.TextField() | ||
parent = models.IntegerField() | ||
count = models.IntegerField() | ||
class Meta: | ||
db_table = u'wp_term_taxonomy' | ||
|
||
class WpTerms(models.Model): | ||
term_id = models.IntegerField(primary_key=True) | ||
name = models.CharField(max_length=600) | ||
slug = models.CharField(unique=True, max_length=600) | ||
term_group = models.IntegerField() | ||
class Meta: | ||
db_table = u'wp_terms' | ||
|
||
class WpUsermeta(models.Model): | ||
umeta_id = models.IntegerField(primary_key=True) | ||
user_id = models.IntegerField() | ||
meta_key = models.CharField(max_length=765, blank=True) | ||
meta_value = models.TextField(blank=True) | ||
class Meta: | ||
db_table = u'wp_usermeta' | ||
|
||
class WpUsers(models.Model): | ||
id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase. | ||
user_login = models.CharField(max_length=180) | ||
user_pass = models.CharField(max_length=192) | ||
user_nicename = models.CharField(max_length=150) | ||
user_email = models.CharField(max_length=300) | ||
user_url = models.CharField(max_length=300) | ||
user_registered = models.DateTimeField() | ||
user_activation_key = models.CharField(max_length=180) | ||
user_status = models.IntegerField() | ||
display_name = models.CharField(max_length=750) | ||
class Meta: | ||
db_table = u'wp_users' | ||
|
||
class WpYarppKeywordCache(models.Model): | ||
id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase. | ||
body = models.TextField() | ||
title = models.TextField() | ||
date = models.DateTimeField() | ||
class Meta: | ||
db_table = u'wp_yarpp_keyword_cache' | ||
|
||
class WpYarppRelatedCache(models.Model): | ||
reference_id = models.IntegerField(primary_key=True, db_column='reference_ID') # Field name made lowercase. | ||
id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase. | ||
score = models.FloatField() | ||
date = models.DateTimeField() | ||
class Meta: | ||
db_table = u'wp_yarpp_related_cache' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This file demonstrates two different styles of tests (one doctest and one | ||
unittest). These will both pass when you run "manage.py test". | ||
Replace these with more appropriate tests for your application. | ||
""" | ||
|
||
from django.test import TestCase | ||
|
||
class SimpleTest(TestCase): | ||
def test_basic_addition(self): | ||
""" | ||
Tests that 1 + 1 always equals 2. | ||
""" | ||
self.failUnlessEqual(1 + 1, 2) | ||
|
||
__test__ = {"doctest": """ | ||
Another way to test that 1 + 1 is equal to 2. | ||
>>> 1 + 1 == 2 | ||
True | ||
"""} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Create your views here. |