Skip to content

Commit

Permalink
model type
Browse files Browse the repository at this point in the history
  • Loading branch information
gojuukaze committed Jun 3, 2021
1 parent 7436ec6 commit a86479f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ django tag input field
```shell
pip install django-tagify2
or
pip install --index-url https://pypi.org/simple/django-tagify2
pip install --index-url https://pypi.org/simple/ django-tagify2
```

* Add 'tagify' application to the INSTALLED_APPS
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ django-tagify2

django tag input field

.. figure:: https://github.com/gojuukaze/django-tagify2/blob/master/demo.gif?raw=true
.. figure:: https://github.com/gojuukaze/django-tagify2/blob/master/demo2.gif?raw=true
:alt: alt tag

alt tag
Expand Down Expand Up @@ -42,7 +42,7 @@ Installation
pip install django-tagify2
or
pip install --index-url https://pypi.org/simple/django-tagify2
pip install --index-url https://pypi.org/simple/ django-tagify2
- Add ‘tagify’ application to the INSTALLED_APPS

Expand Down
2 changes: 1 addition & 1 deletion example/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.1.8 on 2021-06-03 08:51
# Generated by Django 3.1.8 on 2021-06-03 11:16

from django.db import migrations, models
import tagify.models
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='django-tagify2',
version='1.0.4',
version='1.0.5',
description='django tag input field using tagify.js',
url='https://github.com/gojuukaze/django-tagify2',
author="gojuukaze",
Expand Down
5 changes: 1 addition & 4 deletions tagify/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ def __init__(self, place_holder='', delimiters=' ', data_list=None,
self.tag_args['max_tags'] = max_tags

def get_internal_type(self):
return "CharField"

def get_prep_value(self, value):
return self.delimiters.join(value)
return "TextField"

def get_db_prep_value(self, value, connection, prepared=False):
return self.delimiters.join(value)
Expand Down

0 comments on commit a86479f

Please sign in to comment.