Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed May 15, 2019
2 parents 92a8464 + 7a3aa16 commit d5b7663
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 28 deletions.
58 changes: 58 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
- "[Status] Maybe Later"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: true

# Label to use when marking as stale
staleLabel: wontfix

# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.

# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
# only: issues

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.

# issues:
# exemptLabels:
# - confirmed
6 changes: 3 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include tags_input
recursive-include tags_input *.py
recursive-include tags_input/templates *.html
recursive-include tags_input/static *.js
recursive-include tags_input/static *.css
recursive-include tags_input/static *.png
include tags_input/static *.min.js
include tags_input/static *.min.css
include tags_input/static *.png

6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ To test the project simply clone the repository, install and run the example:

.. code-block:: bash
# mkvirtualenv is part of virtualenvwrapper, using a regular virtualenv, pyvenv or pipenv is also possible
# Or even without any type of virtualenv at all
mkvirtualenv django-tags-input
git clone https://github.com/WoLpH/django-tags-input.git
pip install -e django-tags-input
# Tested with up to Django 2.1
pip install django
pip install -e 'django-tags-input[tests]'
cd django-tags-input/example
python manage.py runserver
Expand Down
3 changes: 0 additions & 3 deletions example/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ def run_tests(self):
package_data={
'tags_input': [
'templates/*.html',
'static/js/*.js',
'static/css/*.css',
'static/css/base/*.css',
'static/css/base/images/*.png',
'static/*.min.js',
'static/*.min.css',
],
},
extras_require={
'docs': [
'django<2',
'django<2.1',
'mock',
'sphinx>=1.7.2',
],
Expand Down
2 changes: 1 addition & 1 deletion tags_input/__about__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__package_name__ = 'django-tags-input'
__version__ = '4.3.0'
__version__ = '4.4.2'
__author__ = 'Rick van Hattem'
__author_email__ = 'wolph@wol.ph'
__description__ = ' '.join('''
Expand Down
3 changes: 0 additions & 3 deletions tags_input/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ def formfield_for_manytomany(self, db_field, request=None, **kwargs):
tag_fields = self.get_tag_fields()

if tag_fields and db_field.name not in tag_fields:
print('in fields', tag_fields, db_field.name)
return super(TagsInputMixin, self).formfield_for_manytomany(
db_field, request, **kwargs)
else:
print('nin fields', tag_fields, db_field.name)

queryset = db_field.related_model._default_manager.get_queryset()
# queryset = db_field.rel.to._default_manager.get_queryset()
Expand Down
7 changes: 7 additions & 0 deletions tags_input/static/jquery-ui-1.12.1.min.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions tags_input/static/jquery-ui-1.12.1.min.js

Large diffs are not rendered by default.

Binary file removed tags_input/static/jquery-ui-1.12.1.zip
Binary file not shown.
1 change: 1 addition & 0 deletions tags_input/static/jquery.tagsinput-revisited-2.0.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tags_input/static/jquery.tagsinput-revisited-2.0.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 8 additions & 12 deletions tags_input/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,18 @@ class Media:

css = {
'all': (
'jquery-tagsinput-revisited-2.0/dist/'
'jquery.tagsinput-revisited.min.css',
'jquery.tagsinput-revisited-2.0.min.css',
),
}
js = (
'jquery-tagsinput-revisited-2.0/dist/'
'jquery.tagsinput-revisited.min.js',
'jquery.tagsinput-revisited-2.0.min.js',
)
enable_jquery = getattr(settings, 'TAGS_INPUT_INCLUDE_JQUERY', True)
if enable_jquery: # pragma: no cover
css['all'] += 'jquery-ui-1.12.1/jquery-ui.min.css',
css['all'] += 'jquery-ui-1.12.1.min.css',
js = (
'jquery-3.2.1.min.js',
'jquery-ui-1.12.1/jquery-ui.min.js',
'jquery-ui-1.12.1.min.js',
) + js


Expand All @@ -117,15 +115,13 @@ class Media:

css = getattr(settings, 'TAGS_INPUT_ADMIN_CSS', {
'all': (
'jquery-tagsinput-revisited-2.0/dist/'
'jquery.tagsinput-revisited.min.css',
'jquery-ui-1.12.1/jquery-ui.min.css',
'jquery.tagsinput-revisited-2.0.min.css',
'jquery-ui-1.12.1.min.css',
),
})
js = getattr(settings, 'TAGS_INPUT_ADMIN_JS', (
'jquery-3.2.1.min.js',
'jquery-ui-1.12.1/jquery-ui.min.js',
'jquery-tagsinput-revisited-2.0/dist/'
'jquery.tagsinput-revisited.min.js',
'jquery-ui-1.12.1.min.js',
'jquery.tagsinput-revisited-2.0.min.js',
))

0 comments on commit d5b7663

Please sign in to comment.