This is my views.py

 def map_display(request):
        if request.method == 'POST':
               form = DispForm(request.POST)
               if form.is_valid():
                       this_user = request.user
                       user1= this_user.pk
                       LName = form.cleaned_data['LayerName']
                       a = OsmLayers()
                       a = OsmLayers.objects.get(Layername=LName)
                       uperm = PermiLayer()
 
perml=uperm.objects.get(user_id__exact=pk,table=a.pk)
                       if perml.permi == "100":

                                       lcount = OsmLayers()
                                       lcount=
OsmLayers.objects.get(pk=tab_id)
                                       form1 =
ReadOnlyForm(initial={"geomcollection":
lcount.geompoly})

                                       return
render_to_response('Osmdisplay.html',
{'form':form1})
                           if perml.permi == "110":
                               lcount = OsmLayers()
                                       lcount=
OsmLayers.objects.get(pk=a.pk)
                                       form1 =
WriteOnlyForm(initial={"geomcollection":
lcount.geompoly})
                               return
render_to_response('Osmmaps.html', {'form':form})


I am linking to it from a template which generates search data like
this




   {% block content %}


   {% for d in data %}
   <ul>
   {% url osmdisp arg=d  as the_url %}
   <li><a href="{{ the_url  }}">{{d.Layername}}</li>
   </ul>
   {% endfor %}
   {% endblock %}

But its not linking . How exactly should I do it , such that I can
access the view from this template and also send the form value to
it .

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to