Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templatetags folder is missing when installed by pip #7

Closed
PhakkyoC opened this issue Jul 1, 2020 · 5 comments
Closed

templatetags folder is missing when installed by pip #7

PhakkyoC opened this issue Jul 1, 2020 · 5 comments

Comments

@PhakkyoC
Copy link

PhakkyoC commented Jul 1, 2020

Hi,

I tried to use this package but i noticed that the folder templatetags is missing because i don't have component_tags.

I use python 3.8.3 and pip 20.1.1 with django 3.0.7

I have to manualy download the missing file to use components.

@EmilStenstrom
Copy link
Owner

@PhakkyoC Could you show the error-message you get? Did you install via pip?

@PhakkyoC
Copy link
Author

PhakkyoC commented Jul 1, 2020

@EmilStenstrom Yes i use pip to instlall it with "pip install django_reusable_components" but i don't have any error while installing.
I noticed the file component_tags.py is missing. So i tried to uninstall/install many times but it's still missing.

The errors i encoutered was because i don't have the file component_tags.py while starting my server or trying to load my templates

@EmilStenstrom
Copy link
Owner

Thanks for reporting, I'll look into it.

setup.py is set to include the whole django_components directory when installing, including all subdirectories, so this is strange.

Would you mind posting your exact error, so I can quickly reproduce it?

@PhakkyoC
Copy link
Author

PhakkyoC commented Jul 2, 2020

I'll try to show you what i did to get errors

install

So i don't have any errors when installing but when i try to add builtins like the exemple :

buildin

and when i use manage.py runserver

buildinErr

So, i tried to remove builtins and use "{% load django_components %}" in my templates, the server run but i still can't use components

template err

@EmilStenstrom
Copy link
Owner

This was indeed a packaging issue. Seems just specifying "django_components" does not include subdirectories, which means I ended up with a package without the templatetags directory, just like you said.

I've now fixed this (using setuptools.find_packages instead of specifying the package name) and released version 0.3 to pypi. Would you mind checking it out and let me know if you find any issues? (I've tried it myself, triggered the issue with <0.3 and not with 0.3).

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants