On Tue, Feb 18, 2020 at 3:31 AM Ram Rachum wrote:
> Hi guys,
>
> Recently I was working with Django's CSRF protection, customizing it to my
> needs, and discussing with co-workers exactly how it works and how it has
> protection against the BREACH attack being used to retrieve the CSRF key.
>
Hi Matthias,
Thanks for the reply. My proposal is not about making it easier to use the
most relevant base template. It's about making it easier to combine parts
of different base templates to allow for generic type templates (create,
list, etc.) to coexist with section templates (different
Hi Aymeric,
Thanks for the reply. I have to restate a point that argues against the
assumption that the existing solution is "good enough": includes cannot
override blocks, giving them only limited use. Notice in the
products/list.html template I'm overriding the {% block list-item %} block;
This suggestion is better than mine for the use case discussed here :-)
--
Aymeric.
> On 18 Feb 2020, at 21:57, Matthias Kestenholz wrote:
>
> Hi,
>
> You could make the generic-list.html template extend a configurable base
> template, e.g. "{% extends base_template|default:'base.html'
Hi,
You could make the generic-list.html template extend a configurable base
template, e.g. "{% extends base_template|default:'base.html' %}", and add
context["base_template"] = "orders/base.html" in views belonging to the
orders app, and "products/base.html" in the products app.
I often use
Hello Yo-Yo Ma,
Please assume good faith. You've been around for 11 years, so you know the way
you address Matthew isn't how we behave on this mailing-list.
I believe that the most common way to achieve what you want is to include the
"generic list" HTML with the {% include %} tag. This allows
Please help us all understand, then:
How is it possible to inherit the blocks defined in both the
orders/base.html template *AND* the generic-list.html template while
inheriting *only* from the generic-list.html template?
On Tuesday, February 18, 2020 at 3:32:12 PM UTC-5, matthew.pava wrote:
>
I did read your post, and I did come to that conclusion. I may have ultimately
misunderstood, and I’ll certainly take the blame for my own misunderstanding.
The example you provided can be done without multiple template inheritance. So
far, my thoughts on the design concept is that multiple
@matthew.pava please read the entire OP again.
You can't have actually read the post and come to the conclusion that
inheriting from generic-list.html would solve the problem.
These kinds of "I didn't read it but it looks like you could just X"
replies are a big problem in mailing lists; they
+1 charettes too; to add to the factors to consider I suspect the issue of
keeping it performant too (especially for unit tests) could become a
challenge.
On Tuesday, February 18, 2020 at 7:08:51 PM UTC, charettes wrote:
>
> +1 to what Tim said.
>
> Also what about migration leaf migrations
What if the migrations aren't merged before 0004 is created and you get:
[ 0001_initial ] => [ 0002_auto ] => [ 0003_abc ] => [ 0004(a) ]
and
[ 0001_initial ] => [ 0002_auto ] => [ 0003_def ] => [ 0004(b) ]
where 0004(a) != 0004(b) and 0004(a) modifies the model schema in a way
that
+1 to what Tim said.
Also what about migration leaf migrations with models that refer to each
others? What about a model rename in a leaf node that a model in the other
leaf references to for some attribute names (e.g. m2m field intermediary
table name).
I don't want to discourage you from
Have you considered what would happen if a migration has a RunPython or
RunSQL? They may require a certain model state.
On Tuesday, February 18, 2020 at 12:08:03 PM UTC-5, caio wrote:
>
> I’m working on this as a standalone PoC app for now, I may be able to
> share a repository with the code
I’m working on this as a standalone PoC app for now, I may be able to share a
repository with the code soon in order to get some feedback
Here’s in simple words where I’m at:
* I’ve replaced the restriction of only-one-leaf-node-per-app from the
Migration Loader [1] to
Hi guys,
Recently I was working with Django's CSRF protection, customizing it to my
needs, and discussing with co-workers exactly how it works and how it has
protection against the BREACH attack being used to retrieve the CSRF key.
Relevant code
here:
15 matches
Mail list logo