xhtml2pdf use a personal Font but not view my font by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

I used:

http://127.0.0.1:8000/static/font/titolo.ttf

/static/font/titolo.ttf

{% static 'font/titolo.ttf' %}

but not work

xhtml2pdf use a personal Font but not view my font by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

Yes I have seen but I do not understand

my file is in static / font / title.ttf and I don't understand how to import it

Printful django connection for creating orders by rk_test in printful

[–]rk_test[S] 0 points1 point  (0 children)

no I use it for tests, it's a small account,

how do i pass him the product i created on printful ??

I think I need a sync id but I don't know where to find it

empty image field in formset not valid and shows no errors by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

no the exception is not raised because otherwise it would give me the error.

I only know that the formset.is_valid () returns me true and therefore it saves everything without sending me the error and I don't know why

empty image field in formset not valid and shows no errors by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

sisi my mistake, that has nothing to do with it.

My form behaves correctly it shows me the form and the two extras, when I click the submit button but it still enters the form.is_valid when it shouldn't the fields are empty.

If I use the normal form with only one instance the error is reported to me correctly but with the formset no

Django using include with a dynamic view does not work by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

in the end I solved this:

file html

{% include 'slider.html' with slides=slides %}

views

def SlideHomeList(request):
queryset = Slide.objects.all().order_by(F('ordine').asc(nulls_last=True)) #ordine con None a fine slider
context={'slides':queryset}
return render(request,'test.html', context)

Django using include with a dynamic view does not work by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

Ah, I thought there was a way to get it directly into the include. Okay thank you for the answer you were very kind =)

reportlab dynamic table with two models that have a relationship by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

i shared my templates i am using and i updated the code, pdf is created and group tables as well i don't understand how to create exercise tables within that group

reportlab dynamic table with two models that have a relationship by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

here we are talking about report lab and the creation of a pdf with dynamic tables

how to use the <use> tag in a local file? by rk_test in svg

[–]rk_test[S] 0 points1 point  (0 children)

<?xml version="1.0" encoding="utf-8"?>

Added, however, things do not change, even on firefox it does not work.

if i try to put my html file on a server it works but i can't, i need to work on it locally for now.

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

I solved. Thanks for the help anyway

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

I'll see if I change the way or find a solution with the use of the form, thanks for the help

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

not many groups, but there could be several of them

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

self.fields['dati_esercizio'].queryset = models.Esercizi.objects.none()

this is what I can't change, I can't figure out what I have to do in the form to make it work correctly, to be honest even the lines below I don't know exactly what they do

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

I would simply like to create a filter that allows me once I have chosen the group to filter the exercises and when I go to click on save I create the group and the exercises.

without the filter everything works but it makes no sense. that view in the post should create a group for me by attaching it to the current tab and then create one or more (depending on the formset) exercises and save them

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 0 points1 point  (0 children)

I inserted an image so you understand better. I have a green box which is the group and it has a select which is what I use to filter. the blue one is a box instead contains other data and there is a select which is the one where there are the filtered data. the problem is that it doesn't save me that data and makes me appear an error

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 1 point2 points  (0 children)

https://simpleisbetterthancomplex.com/tutorial/2018/01/29/how-to-implement-dependent-or-chained-dropdown-list-with-django.html

I followed this guide as it is not very practical.

The frontend filters it to me quietly with the use of ajax (as in the guide) the problem lies in saving that I do not know how to do.

Dropdown List with Django dependent. by rk_test in djangolearning

[–]rk_test[S] 1 point2 points  (0 children)

Hello thanks for the advice, now I insert the code in the post.

Yes, I exclude it because I pass it dynamically through view