Re: Invalid pk \"1\" - object does not exist.

2019-02-26 Thread anthony . tedde . 85
Hello, What if you use kind of the following as json data: nb: The following model is a simplified version with only two fields (name and manager which is a FK to itself such as in yours). [ { "model": "YourApp.YourModelName", "pk": 1, "fields": { "name": "toto", "manag

Re: 'URLPattern' Object is not a mapping

2019-02-26 Thread anthony . tedde . 85
Hi, Django's version is in the screenshot (2.1.4) Le mardi 26 février 2019 13:38:24 UTC+1, ANIL UMARANE a écrit : > > which version django you have used > > > On Tue, Feb 26, 2019 at 5:51 PM Tina Upadhyay > wrote: > >> Getting this error and the urls.py of my model is as shown below: >> >> >> fr

Re: 'URLPattern' Object is not a mapping

2019-02-26 Thread anthony . tedde . 85
Hello, Don't you have another urls.py file inside the directory that have the same name as your project. Probably something like that: + yourproject + yourproject - __init__.py - settings.py - -* urls.py* - If yes, what does it co

Re: Tag block and endblock

2019-02-26 Thread anthony . tedde . 85
Hi Nexx Simply put, and as explained by Motaz, *block *is a django special purpose function called *template tag *which help to organize hierarchically your templates. Short better than long, see the following documentation: https://docs.djangoproject.com/en/2.2/ref/templates/builtins/#block '

Re: Django how to print pstree in a webpage?

2019-02-26 Thread anthony . tedde . 85
Hi, I suppose that it depends on the form and type of your pstree variable (tuple, list, dict...) and also if you put it as a context variable. Could you send us the related view ? Thx Le lundi 25 février 2019 13:18:19 UTC+1, Eswar Dileep a écrit : > > I have created a django project and now w