# Path: 文章/models.py
# class 何澤政文章(models.Model):
#     頭一擺翻譯時間 = models.DateField(auto_now_add=True)
#     上尾修改時間 = models.DateField(auto_now=True)
#     分類 = models.CharField(max_length=100)
#     原本標題 = models.CharField(max_length=255)
#     原本內容 = models.TextField()
#     斷詞標題 = models.CharField(blank=True, max_length=255)
#     斷詞內容 = models.TextField(blank=True)
# # 	assign_name = models.CharField(max_length=100)
#     # 原本欲審核用，已經無效
# # 	status_m = models.SmallIntegerField()
# # 	status_p = models.SmallIntegerField()
# # 	status_t = models.SmallIntegerField()
# # 	status_f = models.SmallIntegerField()
#     教羅標題 = models.CharField(blank=True, max_length=255)
# # 	TaiLuo = models.TextField(blank=True)
#     教羅內容 = models.TextField(blank=True)
# # 	TongYong = models.TextField(blank=True)
# # 	HaoLuo = models.TextField(blank=True)
# # 	is_backed_up = models.BooleanField()
# 
#     def __str__(self):
#         return self.原本標題
# 
#     @classmethod
#     def 這標題有用過無(cls, 原本標題):
#         return cls.objects.filter(原本標題=原本標題).exists()
# 
#     def save(self, *args, **kwargs):
#         self.斷詞標題 = 文章整理工具.轉文章空白(self.斷詞標題)
#         self.斷詞內容 = 文章整理工具.轉文章空白(self.斷詞內容)
#         self.教羅標題 = 文章整理工具.轉文章空白(self.教羅標題)
#         self.教羅內容 = 文章整理工具.轉文章空白(self.教羅內容)
#         super(何澤政文章, self).save(*args, **kwargs)
# 
#     def 自動斷詞(self):
#         if self.斷詞標題 == '':
#             try:
#                 self.斷詞標題 = 斷詞(self.原本標題)
#                 self.save()
#             except:
#                 pass
#         if self.斷詞內容 == '':
#             try:
#                 self.斷詞內容 = 斷詞(self.原本內容)
#                 self.save()
#             except:
#                 pass
# 
#     def 自動翻譯(self):
#         if self.教羅標題 == '':
#             try:
#                 self.教羅標題 = 翻譯(self.斷詞標題)
#                 self.save()
#             except:
#                 pass
#         if self.教羅內容 == '':
#             try:
#                 self.教羅內容 = 翻譯(self.斷詞內容)
#                 self.save()
#             except:
#                 pass


from django.forms import ModelForm
from django.forms import Textarea
from django.forms import Select
from 文章.models import 何澤政文章

class 文章全部表格(ModelForm):
	class Meta:
		model = 何澤政文章
		fields = '__all__'

分類=[("政治","政治"),
	("社會","社會"),
	("地方","地方"),
	("國際","國際"),
	("財經","財經"),
	("運動","運動"),
	("健康","健康"),
	("教育","教育"),
	("藝文","藝文"),
	("影劇","影劇"),
	("旅遊","旅遊"),
	("生活","生活"),
	("科技","科技"),
	("環境","環境")]
                                                            
class 加新文章表格(ModelForm):
	class Meta:

# Path: 文章/models.py
# class 何澤政文章(models.Model):
#     頭一擺翻譯時間 = models.DateField(auto_now_add=True)
#     上尾修改時間 = models.DateField(auto_now=True)
#     分類 = models.CharField(max_length=100)
#     原本標題 = models.CharField(max_length=255)
#     原本內容 = models.TextField()
#     斷詞標題 = models.CharField(blank=True, max_length=255)
#     斷詞內容 = models.TextField(blank=True)
# # 	assign_name = models.CharField(max_length=100)
#     # 原本欲審核用，已經無效
# # 	status_m = models.SmallIntegerField()
# # 	status_p = models.SmallIntegerField()
# # 	status_t = models.SmallIntegerField()
# # 	status_f = models.SmallIntegerField()
#     教羅標題 = models.CharField(blank=True, max_length=255)
# # 	TaiLuo = models.TextField(blank=True)
#     教羅內容 = models.TextField(blank=True)
# # 	TongYong = models.TextField(blank=True)
# # 	HaoLuo = models.TextField(blank=True)
# # 	is_backed_up = models.BooleanField()
# 
#     def __str__(self):
#         return self.原本標題
# 
#     @classmethod
#     def 這標題有用過無(cls, 原本標題):
#         return cls.objects.filter(原本標題=原本標題).exists()
# 
#     def save(self, *args, **kwargs):
#         self.斷詞標題 = 文章整理工具.轉文章空白(self.斷詞標題)
#         self.斷詞內容 = 文章整理工具.轉文章空白(self.斷詞內容)
#         self.教羅標題 = 文章整理工具.轉文章空白(self.教羅標題)
#         self.教羅內容 = 文章整理工具.轉文章空白(self.教羅內容)
#         super(何澤政文章, self).save(*args, **kwargs)
# 
#     def 自動斷詞(self):
#         if self.斷詞標題 == '':
#             try:
#                 self.斷詞標題 = 斷詞(self.原本標題)
#                 self.save()
#             except:
#                 pass
#         if self.斷詞內容 == '':
#             try:
#                 self.斷詞內容 = 斷詞(self.原本內容)
#                 self.save()
#             except:
#                 pass
# 
#     def 自動翻譯(self):
#         if self.教羅標題 == '':
#             try:
#                 self.教羅標題 = 翻譯(self.斷詞標題)
#                 self.save()
#             except:
#                 pass
#         if self.教羅內容 == '':
#             try:
#                 self.教羅內容 = 翻譯(self.斷詞內容)
#                 self.save()
#             except:
#                 pass


# Path: 文章/文章表格.py
from django.forms import ModelForm
from django.forms import Textarea
from django.forms import Select
from 文章.models import 何澤政文章


class 文章全部表格(ModelForm):
	class Meta:
		model = 何澤政文章
		fields = '__all__'

分類=[("政治","政治"),
	("社會","社會"),
	("地方","地方"),
	("國際","國際"),
	("財經","財經"),
	("運動","運動"),
	("健康","健康"),
	("教育","教育"),
	("藝文","藝文"),
	("影劇","影劇"),
	("旅遊","旅遊"),
	("生活","生活"),
	("科技","科技"),
	("環境","環境")]
                                                            
class 加新文章表格(ModelForm):
	class Meta:

		model = 何澤政文章