Skip to content

Commit

Permalink
Merge pull request #237 from Ilhasoft/develop
Browse files Browse the repository at this point in the history
Version 1.18.0
  • Loading branch information
Douglas Paz committed Dec 18, 2018
2 parents 2d5c285 + 302a0f1 commit a1a80d3
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 17 deletions.
30 changes: 15 additions & 15 deletions Pipfile.lock

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

2 changes: 1 addition & 1 deletion bothub/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ class RepositoryUpdatesViewSet(
mixins.ListModelMixin,
GenericViewSet):
queryset = RepositoryUpdate.objects.filter(
training_started_at__isnull=False)
training_started_at__isnull=False).order_by('-trained_at')
serializer_class = RepositoryUpdateSerializer
filter_class = RepositoryUpdatesFilter
permission_classes = [
Expand Down
1 change: 1 addition & 0 deletions bothub/api/v2/repository/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Meta:
fields = [
'id',
'name',
'icon',
]


Expand Down
9 changes: 9 additions & 0 deletions bothub/common/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from bothub.common.models import Repository
from bothub.common.models import RepositoryUpdate
from bothub.common.models import RepositoryCategory


class RepositoryUpdateInline(admin.TabularInline):
Expand Down Expand Up @@ -57,3 +58,11 @@ class RepositoryAdmin(admin.ModelAdmin):
inlines = [
RepositoryUpdateInline,
]


@admin.register(RepositoryCategory)
class RepositoryCategoryAdmin(admin.ModelAdmin):
list_display = [
'__str__',
'icon',
]
18 changes: 18 additions & 0 deletions bothub/common/migrations/0027_repositorycategory_icon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.1.3 on 2018-12-07 12:56

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('common', '0026_auto_20181010_1704'),
]

operations = [
migrations.AddField(
model_name='repositorycategory',
name='icon',
field=models.CharField(default='botinho', max_length=16, verbose_name='icon'),
),
]
4 changes: 4 additions & 0 deletions bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ class Meta:
name = models.CharField(
_('name'),
max_length=32)
icon = models.CharField(
_('icon'),
max_length=16,
default='botinho')

def __str__(self):
return self.name # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='bothub-engine',
version='1.17.0',
version='1.18.0',
description='Bothub Engine',
packages=find_packages(),
install_requires=[
Expand Down

0 comments on commit a1a80d3

Please sign in to comment.