Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Initial results from inspectdb

  • Loading branch information...
commit 79d432f6667d0269e55292fee936ebec19cd5994 0 parents
Shabda Raaj authored
10  .gitignore
... ...
@@ -0,0 +1,10 @@
  1
+*.pyc
  2
+*.log
  3
+*.temp
  4
+localsettings.py
  5
+*secrets.py
  6
+*secret.py
  7
+*.wpr
  8
+*.kpf
  9
+*.pydev*
  10
+*.project
0  __init__.py
No changes.
11  manage.py
... ...
@@ -0,0 +1,11 @@
  1
+#!/usr/bin/env python
  2
+from django.core.management import execute_manager
  3
+try:
  4
+    import settings # Assumed to be in the same directory.
  5
+except ImportError:
  6
+    import sys
  7
+    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__)
  8
+    sys.exit(1)
  9
+
  10
+if __name__ == "__main__":
  11
+    execute_manager(settings)
81  settings.py
... ...
@@ -0,0 +1,81 @@
  1
+# Django settings for wp_backport project.
  2
+
  3
+DEBUG = True
  4
+TEMPLATE_DEBUG = DEBUG
  5
+
  6
+ADMINS = (
  7
+    # ('Your Name', 'your_email@domain.com'),
  8
+)
  9
+
  10
+MANAGERS = ADMINS
  11
+
  12
+DATABASE_ENGINE = 'mysql'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
  13
+DATABASE_NAME = 'carkitchen_ut_b'             # Or path to database file if using sqlite3.
  14
+DATABASE_USER = 'root'             # Not used with sqlite3.
  15
+DATABASE_PASSWORD = 'shabda'         # Not used with sqlite3.
  16
+DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
  17
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
  18
+
  19
+# Local time zone for this installation. Choices can be found here:
  20
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  21
+# although not all choices may be available on all operating systems.
  22
+# If running in a Windows environment this must be set to the same as your
  23
+# system time zone.
  24
+TIME_ZONE = 'America/Chicago'
  25
+
  26
+# Language code for this installation. All choices can be found here:
  27
+# http://www.i18nguy.com/unicode/language-identifiers.html
  28
+LANGUAGE_CODE = 'en-us'
  29
+
  30
+SITE_ID = 1
  31
+
  32
+# If you set this to False, Django will make some optimizations so as not
  33
+# to load the internationalization machinery.
  34
+USE_I18N = True
  35
+
  36
+# Absolute path to the directory that holds media.
  37
+# Example: "/home/media/media.lawrence.com/"
  38
+MEDIA_ROOT = ''
  39
+
  40
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
  41
+# trailing slash if there is a path component (optional in other cases).
  42
+# Examples: "http://media.lawrence.com", "http://example.com/media/"
  43
+MEDIA_URL = ''
  44
+
  45
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
  46
+# trailing slash.
  47
+# Examples: "http://foo.com/media/", "/media/".
  48
+ADMIN_MEDIA_PREFIX = '/media/'
  49
+
  50
+# Make this unique, and don't share it with anybody.
  51
+SECRET_KEY = '@cu79xj-4n7aenosbs#v0j(bj$$0#)h457=9k+wkm7jkxi**_%'
  52
+
  53
+# List of callables that know how to import templates from various sources.
  54
+TEMPLATE_LOADERS = (
  55
+    'django.template.loaders.filesystem.load_template_source',
  56
+    'django.template.loaders.app_directories.load_template_source',
  57
+#     'django.template.loaders.eggs.load_template_source',
  58
+)
  59
+
  60
+MIDDLEWARE_CLASSES = (
  61
+    'django.middleware.common.CommonMiddleware',
  62
+    'django.contrib.sessions.middleware.SessionMiddleware',
  63
+    'django.middleware.csrf.CsrfViewMiddleware',
  64
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
  65
+)
  66
+
  67
+ROOT_URLCONF = 'wp_backport.urls'
  68
+
  69
+TEMPLATE_DIRS = (
  70
+    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  71
+    # Always use forward slashes, even on Windows.
  72
+    # Don't forget to use absolute paths, not relative paths.
  73
+)
  74
+
  75
+INSTALLED_APPS = (
  76
+    'django.contrib.auth',
  77
+    'django.contrib.contenttypes',
  78
+    'django.contrib.sessions',
  79
+    'django.contrib.sites',
  80
+    "wp",
  81
+)
17  urls.py
... ...
@@ -0,0 +1,17 @@
  1
+from django.conf.urls.defaults import *
  2
+
  3
+# Uncomment the next two lines to enable the admin:
  4
+# from django.contrib import admin
  5
+# admin.autodiscover()
  6
+
  7
+urlpatterns = patterns('',
  8
+    # Example:
  9
+    # (r'^wp_backport/', include('wp_backport.foo.urls')),
  10
+
  11
+    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
  12
+    # to INSTALLED_APPS to enable admin documentation:
  13
+    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
  14
+
  15
+    # Uncomment the next line to enable the admin:
  16
+    # (r'^admin/', include(admin.site.urls)),
  17
+)
0  wp/__init__.py
No changes.
164  wp/models.py
... ...
@@ -0,0 +1,164 @@
  1
+# This is an auto-generated Django model module.
  2
+# You'll have to do the following manually to clean this up:
  3
+#     * Rearrange models' order
  4
+#     * Make sure each model has one field with primary_key=True
  5
+# Feel free to rename the models, but don't rename db_table values or field names.
  6
+#
  7
+# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
  8
+# into your database.
  9
+
  10
+from django.db import models
  11
+
  12
+class WpCommentmeta(models.Model):
  13
+    meta_id = models.IntegerField(primary_key=True)
  14
+    comment_id = models.IntegerField()
  15
+    meta_key = models.CharField(max_length=765, blank=True)
  16
+    meta_value = models.TextField(blank=True)
  17
+    class Meta:
  18
+        db_table = u'wp_commentmeta'
  19
+
  20
+class WpComments(models.Model):
  21
+    comment_id = models.IntegerField(primary_key=True, db_column='comment_ID') # Field name made lowercase.
  22
+    comment_post_id = models.IntegerField(db_column='comment_post_ID') # Field name made lowercase.
  23
+    comment_author = models.TextField()
  24
+    comment_author_email = models.CharField(max_length=300)
  25
+    comment_author_url = models.CharField(max_length=600)
  26
+    comment_author_ip = models.CharField(max_length=300, db_column='comment_author_IP') # Field name made lowercase.
  27
+    comment_date = models.DateTimeField()
  28
+    comment_date_gmt = models.DateTimeField()
  29
+    comment_content = models.TextField()
  30
+    comment_karma = models.IntegerField()
  31
+    comment_approved = models.CharField(max_length=60)
  32
+    comment_agent = models.CharField(max_length=765)
  33
+    comment_type = models.CharField(max_length=60)
  34
+    comment_parent = models.IntegerField()
  35
+    user_id = models.IntegerField()
  36
+    class Meta:
  37
+        db_table = u'wp_comments'
  38
+
  39
+class WpLinks(models.Model):
  40
+    link_id = models.IntegerField(primary_key=True)
  41
+    link_url = models.CharField(max_length=765)
  42
+    link_name = models.CharField(max_length=765)
  43
+    link_image = models.CharField(max_length=765)
  44
+    link_target = models.CharField(max_length=75)
  45
+    link_category = models.IntegerField()
  46
+    link_description = models.CharField(max_length=765)
  47
+    link_visible = models.CharField(max_length=60)
  48
+    link_owner = models.IntegerField()
  49
+    link_rating = models.IntegerField()
  50
+    link_updated = models.DateTimeField()
  51
+    link_rel = models.CharField(max_length=765)
  52
+    link_notes = models.TextField()
  53
+    link_rss = models.CharField(max_length=765)
  54
+    class Meta:
  55
+        db_table = u'wp_links'
  56
+
  57
+class WpOptions(models.Model):
  58
+    option_id = models.IntegerField(primary_key=True)
  59
+    blog_id = models.IntegerField()
  60
+    option_name = models.CharField(unique=True, max_length=192)
  61
+    option_value = models.TextField()
  62
+    autoload = models.CharField(max_length=60)
  63
+    class Meta:
  64
+        db_table = u'wp_options'
  65
+
  66
+class WpPostmeta(models.Model):
  67
+    meta_id = models.IntegerField(primary_key=True)
  68
+    post_id = models.IntegerField()
  69
+    meta_key = models.CharField(max_length=765, blank=True)
  70
+    meta_value = models.TextField(blank=True)
  71
+    class Meta:
  72
+        db_table = u'wp_postmeta'
  73
+
  74
+class WpPosts(models.Model):
  75
+    id = models.IntegerField(db_column='ID') # Field name made lowercase.
  76
+    post_author = models.IntegerField()
  77
+    post_date = models.DateTimeField()
  78
+    post_date_gmt = models.DateTimeField()
  79
+    post_content = models.TextField()
  80
+    post_title = models.TextField()
  81
+    post_category = models.IntegerField()
  82
+    post_excerpt = models.TextField()
  83
+    post_status = models.CharField(max_length=60)
  84
+    comment_status = models.CharField(max_length=60)
  85
+    ping_status = models.CharField(max_length=60)
  86
+    post_password = models.CharField(max_length=60)
  87
+    post_name = models.CharField(max_length=600)
  88
+    to_ping = models.TextField()
  89
+    pinged = models.TextField()
  90
+    post_modified = models.DateTimeField()
  91
+    post_modified_gmt = models.DateTimeField()
  92
+    post_content_filtered = models.TextField()
  93
+    post_parent = models.IntegerField()
  94
+    guid = models.CharField(max_length=765)
  95
+    menu_order = models.IntegerField()
  96
+    post_type = models.CharField(max_length=60)
  97
+    post_mime_type = models.CharField(max_length=300)
  98
+    comment_count = models.IntegerField()
  99
+    class Meta:
  100
+        db_table = u'wp_posts'
  101
+
  102
+class WpTermRelationships(models.Model):
  103
+    object_id = models.IntegerField(primary_key=True)
  104
+    term_taxonomy_id = models.IntegerField()
  105
+    term_order = models.IntegerField()
  106
+    class Meta:
  107
+        db_table = u'wp_term_relationships'
  108
+
  109
+class WpTermTaxonomy(models.Model):
  110
+    term_taxonomy_id = models.IntegerField(primary_key=True)
  111
+    term_id = models.IntegerField(unique=True)
  112
+    taxonomy = models.CharField(max_length=96)
  113
+    description = models.TextField()
  114
+    parent = models.IntegerField()
  115
+    count = models.IntegerField()
  116
+    class Meta:
  117
+        db_table = u'wp_term_taxonomy'
  118
+
  119
+class WpTerms(models.Model):
  120
+    term_id = models.IntegerField(primary_key=True)
  121
+    name = models.CharField(max_length=600)
  122
+    slug = models.CharField(unique=True, max_length=600)
  123
+    term_group = models.IntegerField()
  124
+    class Meta:
  125
+        db_table = u'wp_terms'
  126
+
  127
+class WpUsermeta(models.Model):
  128
+    umeta_id = models.IntegerField(primary_key=True)
  129
+    user_id = models.IntegerField()
  130
+    meta_key = models.CharField(max_length=765, blank=True)
  131
+    meta_value = models.TextField(blank=True)
  132
+    class Meta:
  133
+        db_table = u'wp_usermeta'
  134
+
  135
+class WpUsers(models.Model):
  136
+    id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase.
  137
+    user_login = models.CharField(max_length=180)
  138
+    user_pass = models.CharField(max_length=192)
  139
+    user_nicename = models.CharField(max_length=150)
  140
+    user_email = models.CharField(max_length=300)
  141
+    user_url = models.CharField(max_length=300)
  142
+    user_registered = models.DateTimeField()
  143
+    user_activation_key = models.CharField(max_length=180)
  144
+    user_status = models.IntegerField()
  145
+    display_name = models.CharField(max_length=750)
  146
+    class Meta:
  147
+        db_table = u'wp_users'
  148
+
  149
+class WpYarppKeywordCache(models.Model):
  150
+    id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase.
  151
+    body = models.TextField()
  152
+    title = models.TextField()
  153
+    date = models.DateTimeField()
  154
+    class Meta:
  155
+        db_table = u'wp_yarpp_keyword_cache'
  156
+
  157
+class WpYarppRelatedCache(models.Model):
  158
+    reference_id = models.IntegerField(primary_key=True, db_column='reference_ID') # Field name made lowercase.
  159
+    id = models.IntegerField(primary_key=True, db_column='ID') # Field name made lowercase.
  160
+    score = models.FloatField()
  161
+    date = models.DateTimeField()
  162
+    class Meta:
  163
+        db_table = u'wp_yarpp_related_cache'
  164
+
23  wp/tests.py
... ...
@@ -0,0 +1,23 @@
  1
+"""
  2
+This file demonstrates two different styles of tests (one doctest and one
  3
+unittest). These will both pass when you run "manage.py test".
  4
+
  5
+Replace these with more appropriate tests for your application.
  6
+"""
  7
+
  8
+from django.test import TestCase
  9
+
  10
+class SimpleTest(TestCase):
  11
+    def test_basic_addition(self):
  12
+        """
  13
+        Tests that 1 + 1 always equals 2.
  14
+        """
  15
+        self.failUnlessEqual(1 + 1, 2)
  16
+
  17
+__test__ = {"doctest": """
  18
+Another way to test that 1 + 1 is equal to 2.
  19
+
  20
+>>> 1 + 1 == 2
  21
+True
  22
+"""}
  23
+
1  wp/views.py
... ...
@@ -0,0 +1 @@
  1
+# Create your views here.

0 notes on commit 79d432f

Please sign in to comment.
Something went wrong with that request. Please try again.