Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
django-taggit
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
76cdc835
authored
Mar 13, 2013
by
Florian Apolloner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added initial migrations via South.
parent
1bebe4aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
taggit/migrations/0001_initial.py
+61
-0
taggit/migrations/__init__.py
+0
-0
No files found.
taggit/migrations/0001_initial.py
0 → 100644
View file @
76cdc835
# -*- coding: utf-8 -*-
import
datetime
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
django.db
import
models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Adding model 'Tag'
db
.
create_table
(
u'taggit_tag'
,
(
(
u'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'name'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
100
)),
(
'slug'
,
self
.
gf
(
'django.db.models.fields.SlugField'
)(
unique
=
True
,
max_length
=
100
)),
))
db
.
send_create_signal
(
u'taggit'
,
[
'Tag'
])
# Adding model 'TaggedItem'
db
.
create_table
(
u'taggit_taggeditem'
,
(
(
u'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'tag'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
related_name
=
u'taggit_taggeditem_items'
,
to
=
orm
[
'taggit.Tag'
])),
(
'object_id'
,
self
.
gf
(
'django.db.models.fields.IntegerField'
)(
db_index
=
True
)),
(
'content_type'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
related_name
=
u'taggit_taggeditem_tagged_items'
,
to
=
orm
[
'contenttypes.ContentType'
])),
))
db
.
send_create_signal
(
u'taggit'
,
[
'TaggedItem'
])
def
backwards
(
self
,
orm
):
# Deleting model 'Tag'
db
.
delete_table
(
u'taggit_tag'
)
# Deleting model 'TaggedItem'
db
.
delete_table
(
u'taggit_taggeditem'
)
models
=
{
u'contenttypes.contenttype'
:
{
'Meta'
:
{
'ordering'
:
"('name',)"
,
'unique_together'
:
"(('app_label', 'model'),)"
,
'object_name'
:
'ContentType'
,
'db_table'
:
"'django_content_type'"
},
'app_label'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
u'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'model'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
})
},
u'taggit.tag'
:
{
'Meta'
:
{
'object_name'
:
'Tag'
},
u'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'name'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'100'
}),
'slug'
:
(
'django.db.models.fields.SlugField'
,
[],
{
'unique'
:
'True'
,
'max_length'
:
'100'
})
},
u'taggit.taggeditem'
:
{
'Meta'
:
{
'object_name'
:
'TaggedItem'
},
'content_type'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'related_name'
:
"u'taggit_taggeditem_tagged_items'"
,
'to'
:
u"orm['contenttypes.ContentType']"
}),
u'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
}),
'object_id'
:
(
'django.db.models.fields.IntegerField'
,
[],
{
'db_index'
:
'True'
}),
'tag'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'related_name'
:
"u'taggit_taggeditem_items'"
,
'to'
:
u"orm['taggit.Tag']"
})
}
}
complete_apps
=
[
'taggit'
]
\ No newline at end of file
taggit/migrations/__init__.py
0 → 100644
View file @
76cdc835
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment