Comments (5)
@spapas this is a hobby project for everyone here! If you have the bandwidth to wrap our Base_dir usage with Path() we will happily merge it.
from django-components.
Hmm... maybe we should handle the case that it's a string too. I think wrapping BASE_DIR in Path is safe no matter if it's a Path or not from the start? Mind adding that as a PR?
from django-components.
I can confirm that wrapping a Path again is safe.
>>> foo = pathlib.Path('foo')
>>> bar = pathlib.Path(foo)
>>> foo == bar
True
I'll try to create a PR this week for the code. I'll also write a test. If someone else wants to do it instead I don't mind.
However I think the readme should have a section about the BASE_DIR setting but I don't really know how to explain it.
from django-components.
I am also having the same problem. Please notice that for django_components==0.34.1 it works, it breaks only for django_components==0.35.
This is because of this line 0.34.1...0.35#diff-c6c9a460aa194de49542b7c8e241152e7727fd8d1ea49f77c3437b0373427d24R17 .
My BASE_DIR is this BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
and I can't change it to be a Path
because it's used in too many places!
Please provide a patch, thank you
from django-components.
@EmilStenstrom unfortunately not right now, I'm to pressured by other stuff... I've resolved the issue by staying on 0.34.1 for now.
from django-components.
Related Issues (20)
- Bug: Context vars missing in slots when `isolated` settings
- "django_components.component" does not explicitly export attribute "register" HOT 10
- Async middleware HOT 5
- Tests refactor: Move from template files to inline templates HOT 2
- Define public API HOT 1
- template_loader blocks on STATICFILES_DIRS if there are tuples HOT 1
- Allow to render component dependencies without middleware HOT 24
- Feature parity with Juro's fork HOT 1
- Topic on new behaviour for dispatching slots using 'include' tags HOT 2
- Better support for AlpineJS HOT 5
- Scoped slots - Passing data to slots and accessing them in fills HOT 20
- Revert back to "django" as the default setting for "context_behavior"
- Refactor accessing of default slot from `as var` to kwarg HOT 3
- '
- Bug: Cannot override `block` tag inside `component` tag inside a template imported via `extends` in "django" mode HOT 2
- Support for dynamically loading component's JS/CSS dependencies HOT 2
- Typo Preventing html_attrs defaults from working HOT 2
- Inline tests/templates to make tests easier to follow
- Allow to render a component, passing args and kwargs, from Python HOT 3
- Support for Paths as objects is missing HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-components.