Skip to content

Commit

Permalink
Merge pull request #8 from anexia/fixes_requires_dist
Browse files Browse the repository at this point in the history
Use custom css to fix external depenceny upload restriction
  • Loading branch information
nezhar authored Nov 30, 2023
2 parents 174f5f6 + 1997c89 commit b6a8b42
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea/*
*.egg-info*
__pycache__
db.sqlite3
db.sqlite3
build/*
tests/static/*
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include LICENSE
include README.md
recursive-include django_future_tasks/static *
3 changes: 3 additions & 0 deletions django_future_tasks/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class Meta:
model = PeriodicFutureTask
exclude = ()

class Media:
css = {"all": ("django_future_tasks/cronfield.css",)}


class FutureTaskInline(admin.TabularInline):
verbose_name = "Corresponding single task"
Expand Down
21 changes: 21 additions & 0 deletions django_future_tasks/static/django_future_tasks/cronfield.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.cc_wrapper .cc_element {
width: 160px;
}

.cc_wrapper .cc_element select {
margin-bottom: 2px;
}

.cc_wrapper .cc_element .button {
width: 76px;
margin: 2px;
}

.cc_wrapper .cc_element .fleft {
width: 75px;
margin: 2px;
}

.cc_wrapper .cc_element .fright {
margin: 2px;
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ django>=3.2,<4
# Cron
croniter>=1.4.1,<1.5
cron-descriptor>=1.4.0, <1.5
git+https://github.com/galipnik/django-cronfield@updates-for-django-3.2
django-cronfield>=0.2.0,<0.3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
install_requires=[
"croniter>=1.4.1,<1.5",
"cron-descriptor>=1.4.0,<1.5",
"django-cronfield @ git+https://github.com/galipnik/[email protected]",
"django-cronfield>=0.2.0,<0.3",
],
license="MIT License",
description="A library to create periodic, cron-like tasks or single tasks with a specified execution/start time and schedule it to run in the future.",
Expand Down
5 changes: 5 additions & 0 deletions tests/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"django_future_tasks",
"cronfield",
"testapp",
]

Expand Down Expand Up @@ -109,3 +110,7 @@
(FUTURE_TASK_TYPE_ERROR, "Task Error"),
(FUTURE_TASK_TYPE_INTERRUPTION, "Task Interruption"),
)

STATIC_URL = "/static/"
ROOT_URLCONF = "core.urls"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
4 changes: 4 additions & 0 deletions tests/core/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.contrib import admin
from django.urls import include, path

urlpatterns = [path("admin/", admin.site.urls)]

0 comments on commit b6a8b42

Please sign in to comment.