Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread ramadhan ngallen
For security purpose these settings should be on debug=True
On production you should change those urls to have dedicated server for static 
files like   Nginx
On 30 Jun 2021, 07:28 +0300, patel dhruvish , 
wrote:
> Do you add static code in setting.py and urls.py? Code is here
>
> Setting.py:-
> Project  urls.py:-
> Then load static file with format like:-
> STATICFILES_DIRS = [
>BASE_DIR / "static",
>'/var/www/static/',
> ]
>
> Project  urls.py:-
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
># ... the rest of your URLconf goes here ...
> ]
> + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
> Or
> + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>
> Then load static file with format like:-
> {% load static %}
> 
>
>
> > On Wed, Jun 30, 2021, 09:47 UJJWAL AGRAWAL  wrote:
> > > Dear all I am facing one problem.
> > > When I am writing {%load static%} rather than getting executed it is 
> > > getting displayed as simple text on the HTML output screen
> > >
> > > Please provide me the solution.
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Django users" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an 
> > > email to django-users+unsubscr...@googlegroups.com.
> > > To view this discussion on the web visit 
> > > https://groups.google.com/d/msgid/django-users/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%40mail.gmail.com.
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CANMvxF0juEz51Pua5PRAR8uNjKPsSGVkZUnDYjTTtve7hfObag%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8f76334b-44f4-43fd-935c-d9379126ca7e%40Spark.


Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread patel dhruvish
You want to add {%load static%} at the top of the code

On Wed, Jun 30, 2021, 09:58 patel dhruvish 
wrote:

> Do you add static code in setting.py and urls.py? Code is here
>
> Setting.py:-
> Project  urls.py:-
> Then load static file with format like:-
>
> STATICFILES_DIRS = [
> BASE_DIR / "static",
> '/var/www/static/',
> ]
>
>
> Project  urls.py:-
>
> from django.conf import settingsfrom django.conf.urls.static import static
>
> urlpatterns = [
> # ... the rest of your URLconf goes here ...
> ]
>
> + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
>
> Or
>
>  + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
>
>
> Then load static file with format like:-
>
> {% load static %}
> 
>
>
>
> On Wed, Jun 30, 2021, 09:47 UJJWAL AGRAWAL  wrote:
>
>> Dear all I am facing one problem.
>> When I am writing {%load static%} rather than getting executed it is
>> getting displayed as simple text on the HTML output screen
>>
>> Please provide me the solution.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%40mail.gmail.com
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANMvxF2ddJb5aHrK%3D88RRm40mxThRrCfUYjJyPBqkDWCCTWGwg%40mail.gmail.com.


RE: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread yeddu.j.prasad
Hope you have this in the  section of your template.

 



  {% load static %}

  {% block head %}

{{luserdetails.luserrolename}} | Aspirations 

  {% endblock %}



 

From: django-users@googlegroups.com  On Behalf 
Of UJJWAL AGRAWAL
Sent: 30 June 2021 09:47
To: django-users@googlegroups.com
Subject: when i am writing {%load static%} rather than getting exectuted it is 
getting displayed as simple text on htmloutput screen

 

Dear all I am facing one problem.

When I am writing {%load static%} rather than getting executed it is getting 
displayed as simple text on the HTML output screen

 

Please provide me the solution.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com 
 .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%40mail.gmail.com
 

 .

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/003001d76d6f%246ab60470%2440220d50%24%40gmail.com.


Re: code question

2021-06-29 Thread frank dilorenzo
I thought I had been everywhere on the web but guess not.  This really
helped me a lot and I have it working now. Thanks a lot!

frank-


On Tue, Jun 29, 2021 at 7:57 PM Lalit Suthar 
wrote:

> https://youtu.be/SNXn76SI1Ks
> try this
>
> On Wed, Jun 30, 2021, 1:27 AM frank dilorenzo 
> wrote:
>
>> Here is a function view:
>>
>> def base(request):
>>
>> shipments = Shipment.objects.all().order_by("-slabel")[:5]
>>
>> suppliers = Supplier.objects.all()
>>
>>
>> context = {
>>
>> "shipments": shipments,
>>
>> "suppliers": suppliers,
>>
>> }
>>
>> return render(request, "base/dashboard.html", context)
>>
>>
>> I tried to figure this out myself but apparently I can't.  I want to
>> convert this to a class based view if possible but I couldn't figure out
>> how to send the context data to the .html file.  Not sure it that is even
>> possible.  I am new to django for sure.
>>
>>
>> Frank
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/95d0558e-5f34-4e81-b20c-c95aee4af739n%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGp2JVFDGwDMMb%2BKJ-SCamJToR2N94B4ENBhL2f5MQyQRhO-iw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJbiy1B1BOnYS4PSkWu8589htbh0v%3D706WE_WjJ%3DPSgKv0bXiw%40mail.gmail.com.


Re: when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread patel dhruvish
Do you add static code in setting.py and urls.py? Code is here

Setting.py:-
Project  urls.py:-
Then load static file with format like:-

STATICFILES_DIRS = [
BASE_DIR / "static",
'/var/www/static/',
]


Project  urls.py:-

from django.conf import settingsfrom django.conf.urls.static import static

urlpatterns = [
# ... the rest of your URLconf goes here ...
]

+ static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

Or

 + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


Then load static file with format like:-

{% load static %}




On Wed, Jun 30, 2021, 09:47 UJJWAL AGRAWAL  wrote:

> Dear all I am facing one problem.
> When I am writing {%load static%} rather than getting executed it is
> getting displayed as simple text on the HTML output screen
>
> Please provide me the solution.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANMvxF0juEz51Pua5PRAR8uNjKPsSGVkZUnDYjTTtve7hfObag%40mail.gmail.com.


when i am writing {%load static%} rather than getting exectuted it is getting displayed as simple text on htmloutput screen

2021-06-29 Thread UJJWAL AGRAWAL
Dear all I am facing one problem.
When I am writing {%load static%} rather than getting executed it is
getting displayed as simple text on the HTML output screen

Please provide me the solution.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALQ%3D5fyZPWiBGnY6VJB1_C6Rb1Ls4dfsGfTef%2BBSqi1BXKHtfw%40mail.gmail.com.


Re: code question

2021-06-29 Thread Lalit Suthar
https://youtu.be/SNXn76SI1Ks
try this

On Wed, Jun 30, 2021, 1:27 AM frank dilorenzo  wrote:

> Here is a function view:
>
> def base(request):
>
> shipments = Shipment.objects.all().order_by("-slabel")[:5]
>
> suppliers = Supplier.objects.all()
>
>
> context = {
>
> "shipments": shipments,
>
> "suppliers": suppliers,
>
> }
>
> return render(request, "base/dashboard.html", context)
>
>
> I tried to figure this out myself but apparently I can't.  I want to
> convert this to a class based view if possible but I couldn't figure out
> how to send the context data to the .html file.  Not sure it that is even
> possible.  I am new to django for sure.
>
>
> Frank
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/95d0558e-5f34-4e81-b20c-c95aee4af739n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGp2JVFDGwDMMb%2BKJ-SCamJToR2N94B4ENBhL2f5MQyQRhO-iw%40mail.gmail.com.


Free Django beginner lessons

2021-06-29 Thread Symaxx
Hi guys I wanna teach Django to any interested beginners, If you are 
interested please email me on bukhosizimc...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b3a90833-ffc3-437f-b63e-7d3c50f79379n%40googlegroups.com.


code question

2021-06-29 Thread frank dilorenzo
Here is a function view:

def base(request):

shipments = Shipment.objects.all().order_by("-slabel")[:5]

suppliers = Supplier.objects.all()


context = {

"shipments": shipments,

"suppliers": suppliers,

}

return render(request, "base/dashboard.html", context)


I tried to figure this out myself but apparently I can't.  I want to 
convert this to a class based view if possible but I couldn't figure out 
how to send the context data to the .html file.  Not sure it that is even 
possible.  I am new to django for sure.


Frank

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/95d0558e-5f34-4e81-b20c-c95aee4af739n%40googlegroups.com.


Authentication with Multiple User

2021-06-29 Thread Ridwan Adeyemo
Hello,
How do I implement a multiple users registration/signup form. For example 
the user needs to have (username, name password,  and confirm password ) 
while the seller is going to have (Business Name, Business Email, address, 
tax id,  phone number and password,  and confirm password)
Best Regards.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/30ae9b3c-6b0d-42eb-9804-92a2fb29b26bn%40googlegroups.com.


date filtering in with __gte does not add apostrophe

2021-06-29 Thread safhac
when filtering using __gte on models.DateTimeField the printed query 
doesn't wrap the searched date with an apostrophe ' this may lead to 
undesired results in postgres database:

WHERE ("appname_tablename"."creation_date" >= *2021-06-27 
11:08:29.311284+00:00* AND "appname_tablename"."node_id" = 111)

as asked on SO here 


 please inform if this is a bug, the behavior has been reported or fixed

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/66e8c7be-94aa-4163-82da-2cee532de26en%40googlegroups.com.


ImproperlyConfigured:

2021-06-29 Thread Yogesh Pawar
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py",
 
line 25, in 
import psycopg2 as Database
ModuleNotFoundError: No module named 'psycopg2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 64, in wrapper
fn(*args, **kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
 
line 110, in inner_run
autoreload.raise_last_exception()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 87, in raise_last_exception
raise _exception[1]
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 375, in execute
autoreload.check_errors(django.setup)()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 64, in wrapper
fn(*args, **kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/__init__.py",
 
line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/registry.py",
 
line 114, in populate
app_config.import_models()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/config.py",
 
line 301, in import_models
self.models_module = import_module(models_module_name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/models.py",
 
line 3, in 
from django.contrib.auth.base_user import AbstractBaseUser, 
BaseUserManager
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/base_user.py",
 
line 48, in 
class AbstractBaseUser(models.Model):
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
 
line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
 
line 326, in add_to_class
value.contribute_to_class(cls, name)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/options.py",
 
line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length())
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
 
line 15, in __getattr__
return getattr(self._connections[self._alias], item)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
 
line 62, in __getitem__
conn = self.create_connection(alias)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
 
line 204, in create_connection
backend = load_backend(db['ENGINE'])
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
 
line 111, in load_backend
return import_module('%s.base' % backend_name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py",
 
line 29, in 
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: 
No module named 'psycopg2'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3081a265-c922-4f90-885b-3a218046e93bn%40googlegroups.com.


Re: Django

2021-06-29 Thread Kasper Laudrup

On 6/29/21 1:13 PM, Théodore KOSSI wrote:

Can I give arguments to HtpResponseRedirect()?



Yes.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/82ec33fb-c5bc-341b-2856-e4766d6c3861%40stacktrace.dk.


Re: Django

2021-06-29 Thread Théodore KOSSI
Can I give arguments to HtpResponseRedirect()?

Le mar. 29 juin 2021 à 12:11, Théodore KOSSI  a
écrit :

>
> Hello guys, i want to use HttpResponseRedirect() and also give an
> argument. Can i do that?
>
> theodoros17@python-developer
>


-- 
theodoros17@python-developer

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKiMjQEoVbh8XmDvgRqY-SNYrV%2Bx7oFxkyY7mSvHXRMRn3D9FA%40mail.gmail.com.


Django

2021-06-29 Thread Théodore KOSSI
Hello guys, i want to use HttpResponseRedirect() and also give an argument.
Can i do that?

theodoros17@python-developer

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKiMjQHeFHd8ntdYbqOyCpOJ-F6JmoPj%2BKsxd1A9X6G06KYviQ%40mail.gmail.com.


How to parse JSON data in python and Django

2021-06-29 Thread Salima Begum
Hi all,

>From below json data to parse this data to fetch categoryId and
categoryName in four levels of data I used for loop for fetching data and
inserting into database table. Is there any better way to do this in python
and Django?

Please Help me to achieve this. Let me know if you have any suggestions.

```
response = requests.request("GET", url, headers=headers_name, data=payload)
response.json()
json_encoded_e = json.dumps(response.json(), indent=4)
json_decode_e = json.loads(json_encoded_e)
categoryTreeId = json_decode_e["categoryTreeId"]
categoryTreeVersion = json_decode_e["categoryTreeVersion"]
rootCategoryNode = json_decode_e["rootCategoryNode"]
json_encoded_e1 = json.dumps(rootCategoryNode, indent=4)
json_decode_e1 = json.loads(json_encoded_e1)
category_1 = json_decode_e1["childCategoryTreeNodes"]
for i in category_1:
cat_id = i['category']['categoryId']
cat_name = i['category']['categoryName']
category_child = i['childCategoryTreeNodes']
saveForm = Some_data_table(categoryTreeId=categoryTreeId,
categoryTreeVersion=categoryTreeVersion,
categoryId=cat_id,
categoryName=cat_name,
parent_id=cat_id, parent_name=cat_name,
)
saveForm.save()
for child in category_child:
cat_ch_id = child['category']['categoryId']
cat_ch_name = child['category']['categoryName']
saveForm = Some_data_table(categoryTreeId=categoryTreeId,

categoryTreeVersion=categoryTreeVersion,
categoryId=cat_ch_id,
categoryName=cat_ch_name,
parent_id=cat_id,
parent_name=cat_name,
)
saveForm.save()
if 'childCategoryTreeNodes' in child:
cat_subch= child['childCategoryTreeNodes']
for subch in cat_subch:
cat_subch_id = subch['category']['categoryId']
cat_subch_name = subch['category']['categoryName']
saveForm =
Some_data_table(categoryTreeId=categoryTreeId,

categoryTreeVersion=categoryTreeVersion,
categoryId=cat_subch_id,
categoryName=cat_subch_name,
parent_id=cat_ch_id,
parent_name=cat_ch_name,
)
saveForm.save()
if 'childCategoryTreeNodes' in subch:
cat_subch_subch = subch['childCategoryTreeNodes']
for subch_subch in cat_subch_subch:
cat_subch_subch_id =
subch_subch['category']['categoryId']
cat_subch_subch_name =
subch_subch['category']['categoryName']
saveForm =
Some_data_table(categoryTreeId=categoryTreeId,

categoryTreeVersion=categoryTreeVersion,

categoryId=cat_subch_subch_id,

categoryName=cat_subch_subch_name,

parent_id=cat_subch_id, parent_name=cat_subch_name,
)
saveForm.save()

else:
continue
else:
continue

```

```
{'categoryTreeId': '0',
 'categoryTreeVersion': 'some',
 'rootCategoryNode': {'category': {'categoryId': '0', 'categoryName':
'Root'},
 'childCategoryTreeNodes':
 [{'category': {'categoryId': '1', 'categoryName': 'Collectibles'},
'parentCategoryTreeNodeHref': 'https://api.example.com/',
'childCategoryTreeNodes':
[{'category': {'categoryId': '34', 'categoryName': 'Advertising'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=1',
'childCategoryTreeNodes':
[{'category': {'categoryId': '36', 'categoryName': 'Soda'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=34',
'childCategoryTreeNodes':
[{'category': {'categoryId': '852', 'categoryName': 'Fountain'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=36',
'categoryTreeNodeLevel': 4, 'leafCategoryTreeNode': True},
{'category': {'categoryId': '853', 'categoryName': 'Canada Dry'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=36',
'categoryTreeNodeLevel': 4, 'leafCategoryTreeNode': True},
{'category': {'categoryId': '855', 'categoryName': '7 UP'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=36',
'categoryTreeNodeLevel': 4, 'leafCategoryTreeNode': True},
{'category': {'categoryId': '856', 'categoryName': 'Squirt'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=36',
'categoryTreeNodeLevel': 4, 'leafCategoryTreeNode': True},
{'category': {'categoryId': '857', 'categoryName': 'Hires Root Beer'},
'parentCategoryTreeNodeHref': 'https://api.example.com/category_id=36',
'categoryTreeNodeLevel': 4,