django-custom-base-models-uz 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: django_custom_base_models_uz
3
+ Version: 0.0.1
4
+ Summary: test upload
5
+ Author: Abbosjon
6
+ Author-email: mail@example.com
7
+ License: MIT
8
+ Dynamic: author
9
+ Dynamic: author-email
10
+ Dynamic: license
11
+ Dynamic: summary
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: django_custom_base_models_uz
3
+ Version: 0.0.1
4
+ Summary: test upload
5
+ Author: Abbosjon
6
+ Author-email: mail@example.com
7
+ License: MIT
8
+ Dynamic: author
9
+ Dynamic: author-email
10
+ Dynamic: license
11
+ Dynamic: summary
@@ -0,0 +1,8 @@
1
+ setup.py
2
+ django_custom_base_models_uz.egg-info/PKG-INFO
3
+ django_custom_base_models_uz.egg-info/SOURCES.txt
4
+ django_custom_base_models_uz.egg-info/dependency_links.txt
5
+ django_custom_base_models_uz.egg-info/not-zip-safe
6
+ django_custom_base_models_uz.egg-info/top_level.txt
7
+ my_base_models/__init__.py
8
+ my_base_models/models.py
@@ -0,0 +1,21 @@
1
+ from django.db import models
2
+ from django.utils.text import slugify
3
+
4
+ class CreatedBaseModel(models.Model):
5
+ created_at = models.DateTimeField(auto_now_add=True)
6
+ updated_at = models.DateTimeField(auto_now=True)
7
+
8
+ class Meta:
9
+ abstract = True
10
+
11
+ class SlugBasedModel(models.Model):
12
+ name = models.CharField(max_length=255)
13
+ slug = models.SlugField(unique=True, blank=True)
14
+
15
+ class Meta:
16
+ abstract = True
17
+
18
+ def save(self, *args, **kwargs):
19
+ if not self.slug:
20
+ self.slug = slugify(self.name)
21
+ super().save(*args, **kwargs)
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,12 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='django_custom_base_models_uz',
5
+ version='0.0.1',
6
+ description='test upload',
7
+ author='Abbosjon',
8
+ author_email='mail@example.com',
9
+ license='MIT',
10
+ packages=find_packages(),
11
+ zip_safe=False
12
+ )