I'm going to go out and make a random guess that when you say "use a view 
inside another view" with respect to the code you posted, you want all 
calls to index() or list() to render the base view. In that case just use 
return. i.e.

def index(request):
  return base(request)

Yours,
Abraham V.




On Wednesday, June 15, 2016 at 11:24:18 PM UTC+5:30, hossein wrote:
>
> def base(request):
>     j=Job.objects.all()
>     a=Ab.objects.all()
>     return render(request,'base.html',{'j':j, 'a':a})
>
> def index(request):
>     base(request)
>     x=X.objects.all()
>     return render(request, 'index.html',{'x':x})
>
> def list(request):
>     base(request)
>     z=Z.objects.all()
>     return render(request, 'list.html',{'z':z})
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8330c99d-59ba-45da-b500-b2c40ed95daa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to