Commit 170b4942 authored by ibuler's avatar ibuler

change date_added -> date_created

parent 07dd6d11
...@@ -24,7 +24,7 @@ class IDC(models.Model): ...@@ -24,7 +24,7 @@ class IDC(models.Model):
phone = models.CharField(max_length=32, blank=True, verbose_name=_('Phone')) phone = models.CharField(max_length=32, blank=True, verbose_name=_('Phone'))
address = models.CharField(max_length=128, blank=True, verbose_name=_("Address")) address = models.CharField(max_length=128, blank=True, verbose_name=_("Address"))
network = models.TextField(blank=True, verbose_name=_('Network')) network = models.TextField(blank=True, verbose_name=_('Network'))
date_added = models.DateField(auto_now=True, null=True, verbose_name=_('Date added')) date_created = models.DateField(auto_now=True, null=True, verbose_name=_('Date added'))
operator = models.CharField(max_length=32, blank=True, verbose_name=_('Operator')) operator = models.CharField(max_length=32, blank=True, verbose_name=_('Operator'))
created_by = models.CharField(max_length=32, blank=True, verbose_name=_('Created by')) created_by = models.CharField(max_length=32, blank=True, verbose_name=_('Created by'))
comment = models.TextField(blank=True, verbose_name=_('Comment')) comment = models.TextField(blank=True, verbose_name=_('Comment'))
...@@ -40,7 +40,7 @@ class AssetExtend(models.Model): ...@@ -40,7 +40,7 @@ class AssetExtend(models.Model):
key = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('KEY')) key = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('KEY'))
value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE')) value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE'))
created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by")) created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by"))
date_added = models.DateTimeField(auto_now=True, null=True, blank=True) date_created = models.DateTimeField(auto_now=True, null=True, blank=True)
comment = models.TextField(blank=True, verbose_name=_('Comment')) comment = models.TextField(blank=True, verbose_name=_('Comment'))
def __unicode__(self): def __unicode__(self):
...@@ -57,7 +57,7 @@ class AdminUser(models.Model): ...@@ -57,7 +57,7 @@ class AdminUser(models.Model):
private_key = models.CharField(max_length=4096, null=True, blank=True, verbose_name=_('SSH private key')) private_key = models.CharField(max_length=4096, null=True, blank=True, verbose_name=_('SSH private key'))
is_default = models.BooleanField(default=True, verbose_name=_('As default')) is_default = models.BooleanField(default=True, verbose_name=_('As default'))
auto_update = models.BooleanField(default=True, verbose_name=_('Auto update pass/key')) auto_update = models.BooleanField(default=True, verbose_name=_('Auto update pass/key'))
date_added = models.DateTimeField(auto_now=True, null=True, blank=True) date_created = models.DateTimeField(auto_now=True, null=True, blank=True)
create_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by')) create_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by'))
comment = models.TextField(blank=True, verbose_name=_('Comment')) comment = models.TextField(blank=True, verbose_name=_('Comment'))
...@@ -86,7 +86,7 @@ class SysUser(models.Model): ...@@ -86,7 +86,7 @@ class SysUser(models.Model):
shell = models.CharField(max_length=64, blank=True, verbose_name=_('Shell')) shell = models.CharField(max_length=64, blank=True, verbose_name=_('Shell'))
home = models.CharField(max_length=64, blank=True, verbose_name=_('Home')) home = models.CharField(max_length=64, blank=True, verbose_name=_('Home'))
uid = models.IntegerField(blank=True, verbose_name=_('Uid')) uid = models.IntegerField(blank=True, verbose_name=_('Uid'))
date_added = models.DateTimeField(auto_now=True, null=True) date_created = models.DateTimeField(auto_now=True, null=True)
create_by = models.CharField(max_length=32, blank=True, verbose_name=_('Created by')) create_by = models.CharField(max_length=32, blank=True, verbose_name=_('Created by'))
comment = models.CharField(max_length=128, blank=True, verbose_name=_('Comment')) comment = models.CharField(max_length=128, blank=True, verbose_name=_('Comment'))
...@@ -124,7 +124,7 @@ class Asset(models.Model): ...@@ -124,7 +124,7 @@ class Asset(models.Model):
sn = models.CharField(max_length=128, null=True, blank=True, unique=True, verbose_name=_('Serial number')) sn = models.CharField(max_length=128, null=True, blank=True, unique=True, verbose_name=_('Serial number'))
created_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by')) created_by = models.CharField(max_length=32, null=True, blank=True, verbose_name=_('Created by'))
is_active = models.BooleanField(default=True, verbose_name=_('Is active')) is_active = models.BooleanField(default=True, verbose_name=_('Is active'))
date_added = models.DateTimeField(auto_now=True, null=True, blank=True, verbose_name=_('Date added')) date_created = models.DateTimeField(auto_now=True, null=True, blank=True, verbose_name=_('Date added'))
comment = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Comment')) comment = models.CharField(max_length=128, null=True, blank=True, verbose_name=_('Comment'))
def __unicode__(self): def __unicode__(self):
...@@ -143,7 +143,7 @@ class Label(models.Model): ...@@ -143,7 +143,7 @@ class Label(models.Model):
value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE')) value = models.CharField(max_length=64, null=True, blank=True, verbose_name=_('VALUE'))
asset = models.ForeignKey(Asset, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_('Asset')) asset = models.ForeignKey(Asset, null=True, blank=True, on_delete=models.SET_NULL, verbose_name=_('Asset'))
created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by")) created_by = models.CharField(max_length=32, blank=True, verbose_name=_("Created by"))
date_added = models.DateTimeField(auto_now=True, null=True) date_created = models.DateTimeField(auto_now=True, null=True)
comment = models.CharField(max_length=128, blank=True, verbose_name=_('Comment')) comment = models.CharField(max_length=128, blank=True, verbose_name=_('Comment'))
def __unicode__(self): def __unicode__(self):
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</tr> </tr>
<tr> <tr>
<td class="text-navy">添加日期</td> <td class="text-navy">添加日期</td>
<td>{{ asset.date_added|date:"Y-m-d H:i:s" }}</td> <td>{{ asset.date_created|date:"Y-m-d H:i:s" }}</td>
</tr> </tr>
<tr> <tr>
<td class="text-navy">备注</td> <td class="text-navy">备注</td>
......
...@@ -24,7 +24,7 @@ from django.core import signing ...@@ -24,7 +24,7 @@ from django.core import signing
# verbose_name='permissions', # verbose_name='permissions',
# blank=True, # blank=True,
# ) # )
# date_added = models.DateTimeField(auto_now_add=True) # date_created = models.DateTimeField(auto_now_add=True)
# created_by = models.CharField(max_length=100) # created_by = models.CharField(max_length=100)
# comment = models.CharField(max_length=80, blank=True) # comment = models.CharField(max_length=80, blank=True)
# #
...@@ -59,7 +59,7 @@ from django.core import signing ...@@ -59,7 +59,7 @@ from django.core import signing
class UserGroup(models.Model): class UserGroup(models.Model):
name = models.CharField(max_length=100, unique=True, verbose_name=_('Name')) name = models.CharField(max_length=100, unique=True, verbose_name=_('Name'))
comment = models.TextField(blank=True, verbose_name=_('Comment')) comment = models.TextField(blank=True, verbose_name=_('Comment'))
date_added = models.DateTimeField(auto_now_add=True) date_created = models.DateTimeField(auto_now_add=True)
created_by = models.CharField(max_length=100) created_by = models.CharField(max_length=100)
def __unicode__(self): def __unicode__(self):
......
...@@ -169,7 +169,7 @@ class UserGroupListView(AdminUserRequiredMixin, ListView): ...@@ -169,7 +169,7 @@ class UserGroupListView(AdminUserRequiredMixin, ListView):
paginate_by = settings.CONFIG.DISPLAY_PER_PAGE paginate_by = settings.CONFIG.DISPLAY_PER_PAGE
context_object_name = 'user_group_list' context_object_name = 'user_group_list'
template_name = 'users/user_group_list.html' template_name = 'users/user_group_list.html'
ordering = '-date_added' ordering = '-date_created'
def get_queryset(self): def get_queryset(self):
self.queryset = super(UserGroupListView, self).get_queryset() self.queryset = super(UserGroupListView, self).get_queryset()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment