I cannot output the value of the foreign key via jsonresponse serealize

2020-12-06 Thread Walter Randazzo
Hi mates, I want to get json serialized the name of the products instead of the id ones. I tried to add natural_keys method on the parent model with no luck. I can receive the json data good but in this way: [{"model": "ocompra.compradetail", "pk": 1, "fields": {"producto": 238, "precio": "620.0

Cant output the value of the foreign key via jsonresponse serealize

2020-12-06 Thread Walter Randazzo
*Hi Mates,* I want to get json serialized the name of the products insted of the id ones. I tried to add natural_keys method on the parent model with no luck. I can receive the json data good but in this way: [{"model": "ocompra.compradetail", "pk": 1, "fields": {"producto": 238, "precio": "

files static error

2020-12-06 Thread Leonardo Febres
Hola, tengo un error en el enrutamiento y no logro definir por que, la version de django es 3.1.* es como que si la ruta declarada no existiera, agradeceria mucho su ayuda *ARCHIVO SETTINGS.PY* from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR

Re: files static error

2020-12-06 Thread Joel T
My spanish is at a zero, but unless django started accepting lists for the STATIC_ROOT settings, thats where the errror lies could somebody tell the author to remove the square braces from the STATIC_ROOT argument and also to rename the path to something else since django doesn't accept for the

is a custom model even possible

2020-12-06 Thread Joel T
Hi everyone, I'm new here and have zero clues as to how to create a model with methods that can be overridden by each instance . i.e Each instance will provide its own methods that will be called when a certain event is triggered. -- You received this message because you are subscribed to the G