Closed artforlife closed 10 months ago
I'm having the same issue. I'd like to use Google reCAPTCHA and django-simple-captcha as the fallback if Google's API somehow becomes unavailable. Most SO threads I've read say that it's pretty much impossible to use two INSTALLED_APPS with the same name.
Is there any recommendations on how one might install both these packages in the same Django project?
@l00sed fork it and use it, for an example.
As has been discussed in djnago-recaptcha django-simple-captcha
had to avoid naming conflict because it was born later.
Also, IMHO, all "django batteries" should be prefixed with "django" unless they support other frameworks/work without frameworks.
As has been https://github.com/torchbox/django-recaptcha/issues/291#issuecomment-1752154652 django-simple-captcha had to avoid naming conflict because it was born later.
As I mentioned there, this is incorrect. Django-simple-captcha was first released before Django-recaptcha. That said, you're right: it's not feasible to rename either project, the only way to address this in hindsight is to fork either project and change the name of the Django app.
@mbi thank you for your feedback.
cc @Stormheng
I'm not very good with packaging, but is it not feasible to just... have a second directory that imports everything from the first? Then publish a new package?
Because both
django-simple-captcha
anddjango-recaptcha
contain all their files in a directory calledcaptcha
, there is a way to create a conflict. In particular, if someone uses one of these projects as the captcha tool explicitly, whilst also using another package that uses the other project (captcha tool), pip can override thecaptcha
directory with the unwanted package during installation.Precisely this happened to me when I tried to put a Django project into Docker. Locally it works fine. However, inside the Docker container, pip overrides the
captcha
directory with the competing package.https://github.com/torchbox/django-recaptcha/issues/291
requirements.txt
example