Closed ArkieCoder closed 1 year ago
If you'd just like to use the patch above and you're working within Docker, you can add these lines to your Dockerfile
to apply the patch to what is installed via pip3
. This example assumes you have django-selectable
in your requirements.txt
, and that the above patch is stored in the file ./patches/selectable-urls-py.gitpatch
relative to your Dockerfile
.
RUN pip3 install -r requirements.txt
RUN pip3 show django-selectable | \
grep "^Location: " | sed -e "s/^Location: //g" > /tmp/dsloc.txt
COPY ./patches/selectable-urls-py.gitpatch /tmp
RUN cp /tmp/selectable-urls-py.gitpatch `cat /tmp/dsloc.txt`
RUN cd `cat /tmp/dsloc.txt` && git apply selectable-urls-py.gitpatch
If you're not running via Docker, in your build process right after you install requirements using pip3
, you can use something like this shell script:
#!/usr/bin/env bash
virtualenv /home/ubuntu/app/venv
source /home/ubuntu/app/venv/bin/activate
DSLOC=`pip3 show django-selectable | \
grep "^Location: " | sed -e "s/^Location: //g"`
cd $DSLOC && git apply /home/ubuntu/app/patches/selectable-urls-py.gitpatch
It should be noted that the patch above is a result of a git diff
and that's why I'm using git apply
to apply it, because patch
requires some additional processing of git
diffs in order to function properly.
Are there plans to merge this #222? Is it that it's still pending for review, or simply there's no maintainer anymore? I'll be willing to help in any way to push this forward.
Just wondering if there are any actively maintained alternatives to Django-Selectable that support Django 4.*?
released v1.4
When using
django-selectable
with Django 4.0, the following error occurs on startup:This is due to the fact that
django.conf.urls.url
was finally removed from Django in 4.0 after being deprecated for some time in Django 3.x. More info here: https://forum.djangoproject.com/t/django-4-0-url-import-error/11065/5I have found that this simple patch fixes this issue, and would like to submit it to the group for inclusion: