1
1
from django .db import models
2
2
3
+ # DJANGO
4
+
3
5
class Texto (models .Model ):
4
6
texto = models .TextField ()
5
7
@@ -8,3 +10,139 @@ class Ubicacion(models.Model):
8
10
longi = models .FloatField ()
9
11
usuario = models .CharField (max_length = 50 ) # TODO model
10
12
tiempo = models .DateTimeField (auto_now = True ) # redundante?
13
+
14
+ # WORDPRESS unmanaged
15
+ # obtained by inspectdb
16
+
17
+ class WpPosts (models .Model ):
18
+ id = models .BigAutoField (db_column = 'ID' , primary_key = True ) # Field name made lowercase.
19
+ post_author = models .BigIntegerField ()
20
+ post_date = models .DateTimeField ()
21
+ post_date_gmt = models .DateTimeField ()
22
+ post_content = models .TextField ()
23
+ post_title = models .TextField ()
24
+ post_excerpt = models .TextField ()
25
+ post_status = models .CharField (max_length = 20 )
26
+ comment_status = models .CharField (max_length = 20 )
27
+ ping_status = models .CharField (max_length = 20 )
28
+ post_password = models .CharField (max_length = 255 )
29
+ post_name = models .CharField (max_length = 200 )
30
+ to_ping = models .TextField ()
31
+ pinged = models .TextField ()
32
+ post_modified = models .DateTimeField ()
33
+ post_modified_gmt = models .DateTimeField ()
34
+ post_content_filtered = models .TextField ()
35
+ post_parent = models .BigIntegerField ()
36
+ guid = models .CharField (max_length = 255 )
37
+ menu_order = models .IntegerField ()
38
+ post_type = models .CharField (max_length = 20 )
39
+ post_mime_type = models .CharField (max_length = 100 )
40
+ comment_count = models .BigIntegerField ()
41
+
42
+ class Meta :
43
+ managed = False
44
+ db_table = 'wp_posts'
45
+
46
+ class WpPostmeta (models .Model ):
47
+ meta_id = models .BigAutoField (primary_key = True )
48
+ post_id = models .BigIntegerField ()
49
+ meta_key = models .CharField (max_length = 255 , blank = True , null = True )
50
+ meta_value = models .TextField (blank = True , null = True )
51
+
52
+ class Meta :
53
+ managed = False
54
+ db_table = 'wp_postmeta'
55
+
56
+ class WpComments (models .Model ):
57
+ comment_id = models .BigAutoField (db_column = 'comment_ID' , primary_key = True ) # Field name made lowercase.
58
+ comment_post_id = models .BigIntegerField (db_column = 'comment_post_ID' ) # Field name made lowercase.
59
+ comment_author = models .TextField ()
60
+ comment_author_email = models .CharField (max_length = 100 )
61
+ comment_author_url = models .CharField (max_length = 200 )
62
+ comment_author_ip = models .CharField (db_column = 'comment_author_IP' , max_length = 100 ) # Field name made lowercase.
63
+ comment_date = models .DateTimeField ()
64
+ comment_date_gmt = models .DateTimeField ()
65
+ comment_content = models .TextField ()
66
+ comment_karma = models .IntegerField ()
67
+ comment_approved = models .CharField (max_length = 20 )
68
+ comment_agent = models .CharField (max_length = 255 )
69
+ comment_type = models .CharField (max_length = 20 )
70
+ comment_parent = models .BigIntegerField ()
71
+ user_id = models .BigIntegerField ()
72
+
73
+ class Meta :
74
+ managed = False
75
+ db_table = 'wp_comments'
76
+
77
+ class WpCommentmeta (models .Model ):
78
+ meta_id = models .BigAutoField (primary_key = True )
79
+ comment_id = models .BigIntegerField ()
80
+ meta_key = models .CharField (max_length = 255 , blank = True , null = True )
81
+ meta_value = models .TextField (blank = True , null = True )
82
+
83
+ class Meta :
84
+ managed = False
85
+ db_table = 'wp_commentmeta'
86
+
87
+ class WpLinks (models .Model ):
88
+ link_id = models .BigAutoField (primary_key = True )
89
+ link_url = models .CharField (max_length = 255 )
90
+ link_name = models .CharField (max_length = 255 )
91
+ link_image = models .CharField (max_length = 255 )
92
+ link_target = models .CharField (max_length = 25 )
93
+ link_description = models .CharField (max_length = 255 )
94
+ link_visible = models .CharField (max_length = 20 )
95
+ link_owner = models .BigIntegerField ()
96
+ link_rating = models .IntegerField ()
97
+ link_updated = models .DateTimeField ()
98
+ link_rel = models .CharField (max_length = 255 )
99
+ link_notes = models .TextField ()
100
+ link_rss = models .CharField (max_length = 255 )
101
+
102
+ class Meta :
103
+ managed = False
104
+ db_table = 'wp_links'
105
+
106
+ class WpTerms (models .Model ):
107
+ term_id = models .BigAutoField (primary_key = True )
108
+ name = models .CharField (max_length = 200 )
109
+ slug = models .CharField (max_length = 200 )
110
+ term_group = models .BigIntegerField ()
111
+
112
+ class Meta :
113
+ managed = False
114
+ db_table = 'wp_terms'
115
+
116
+ class WpTermTaxonomy (models .Model ):
117
+ term_taxonomy_id = models .BigAutoField (primary_key = True )
118
+ term_id = models .BigIntegerField ()
119
+ taxonomy = models .CharField (max_length = 32 )
120
+ description = models .TextField ()
121
+ parent = models .BigIntegerField ()
122
+ count = models .BigIntegerField ()
123
+
124
+ class Meta :
125
+ managed = False
126
+ db_table = 'wp_term_taxonomy'
127
+ unique_together = (('term_id' , 'taxonomy' ),)
128
+
129
+ class WpTermRelationships (models .Model ):
130
+ object_id = models .BigIntegerField (primary_key = True )
131
+ term_taxonomy_id = models .BigIntegerField ()
132
+ term_order = models .IntegerField ()
133
+
134
+ class Meta :
135
+ managed = False
136
+ db_table = 'wp_term_relationships'
137
+ unique_together = (('object_id' , 'term_taxonomy_id' ),)
138
+
139
+ class WpTermmeta (models .Model ):
140
+ meta_id = models .BigAutoField (primary_key = True )
141
+ term_id = models .BigIntegerField ()
142
+ meta_key = models .CharField (max_length = 255 , blank = True , null = True )
143
+ meta_value = models .TextField (blank = True , null = True )
144
+
145
+ class Meta :
146
+ managed = False
147
+ db_table = 'wp_termmeta'
148
+
0 commit comments