- Timestamp:
- Aug 12, 2008, 6:44:38 PM (17 years ago)
- Location:
- conf
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
conf/exodus/urls.py
r6178 r6179 2 2 3 3 from django.conf.urls.defaults import * 4 from django_exodus.exodus_01.models import *4 from conf.exodus.models import * 5 5 6 6 node_dict = { … … 11 11 12 12 # views 13 (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'exodus _01/index.html'}) ,13 (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'exodus/index.html'}) , 14 14 (r'^nodelist/$', 'django.views.generic.list_detail.object_list', node_dict), 15 15 (r'^(?P<object_id>\d+)/node/$', 'django.views.generic.list_detail.object_detail', node_dict), 16 16 17 17 # config urls 18 (r'^(?P<object_id>\d+)/dhcp.conf/$', ' django_exodus.exodus_01.views.conf_dhcp_conf'),19 (r'^(?P<object_id>\d+)/named.conf/$', ' django_exodus.exodus_01.views.conf_named_conf'),20 (r'^(?P<object_id>\d+)/rc.node.local/$', ' django_exodus.exodus_01.views.conf_rc_node_local'),21 (r'^(?P<object_id>\d+)/resolv.conf/$', ' django_exodus.exodus_01.views.conf_resolv_conf'),18 (r'^(?P<object_id>\d+)/dhcp.conf/$', 'conf.exodus.views.conf_dhcp_conf'), 19 (r'^(?P<object_id>\d+)/named.conf/$', 'conf.exodus.views.conf_named_conf'), 20 (r'^(?P<object_id>\d+)/rc.node.local/$', 'conf.exodus.views.conf_rc_node_local'), 21 (r'^(?P<object_id>\d+)/resolv.conf/$', 'conf.exodus.views.conf_resolv_conf'), 22 22 23 23 24 24 # add urls 25 (r'^addlocation/$', 'django_exodus.exodus_01.views.addlocation'), 26 (r'^addnode/$', 'django_exodus.exodus_01.views.addnode'), 27 (r'^addnic/$', 'django_exodus.exodus_01.views.addnic'), 28 (r'^addinterlink/$', 'django_exodus.exodus_01.views.addinterlink'), 29 (r'^addomni/$', 'django_exodus.exodus_01.views.addomni') 25 (r'^addlocation/$', 'conf.exodus.views.addlocation'), 26 (r'^addnode/$', 'conf.exodus.views.addnode'), 27 (r'^addnic/$', 'conf.exodus.views.addnic'), 28 (r'^addinterlink/$', 'conf.exodus.views.addinterlink'), 29 (r'^addomni/$', 'conf.exodus.views.addomni'), 30 31 (r'^static/(.*)$', 'django.views.static.serve', {'document_root': 32 '/Users/rick/svn/wleiden/code/exodus/static'}), 30 33 ) -
conf/exodus/views.py
r6178 r6179 8 8 from socket import gethostname 9 9 10 from django_exodus.exodus_01.models import NIC, Node, Location, Link, LinkPool11 from django_exodus.exodus_01.wllogic import freemasterip, newssidname10 from conf.exodus.models import NIC, Node, Location, Link, LinkPool 11 from conf.exodus.wllogic import freemasterip, newssidname 12 12 13 13 def addlocation(request): … … 29 29 new_place = manipulator.save(new_data) 30 30 31 return HttpResponseRedirect("/exodus _01/")31 return HttpResponseRedirect("/exodus/") 32 32 33 33 else: … … 35 35 36 36 form = forms.FormWrapper(manipulator, new_data, errors) 37 return render_to_response('exodus _01/addlocation.html', {'form': form, 'new_data': new_data})37 return render_to_response('exodus/addlocation.html', {'form': form, 'new_data': new_data}) 38 38 39 39 def addnode(request): … … 52 52 new_place = manipulator.save(new_data) 53 53 54 return HttpResponseRedirect("/exodus _01/")54 return HttpResponseRedirect("/exodus/") 55 55 56 56 else: … … 58 58 59 59 form = forms.FormWrapper(manipulator, new_data, errors) 60 return render_to_response('exodus _01/addnode.html', {'form': form })60 return render_to_response('exodus/addnode.html', {'form': form }) 61 61 62 62 def addnic(request): … … 90 90 new_place = manipulator.save(new_data) 91 91 92 return HttpResponseRedirect("/exodus _01/")92 return HttpResponseRedirect("/exodus/") 93 93 94 94 else: … … 96 96 97 97 form = forms.FormWrapper(manipulator, new_data, errors) 98 return render_to_response('exodus _01/addnic.html', {'form': form })98 return render_to_response('exodus/addnic.html', {'form': form }) 99 99 100 100 def addinterlink(request): … … 126 126 link1_manipulator.do_html2python(new_data) 127 127 128 return HttpResponseRedirect("/exodus _01/")128 return HttpResponseRedirect("/exodus/") 129 129 130 130 else: … … 133 133 form1 = forms.FormWrapper(link1_manipulator, new_data, errors) 134 134 form2 = forms.FormWrapper(link2_manipulator, new_data, errors) 135 return render_to_response('exodus _01/addinterlink.html',{'form1':form1, 'form2':form2})135 return render_to_response('exodus/addinterlink.html',{'form1':form1, 'form2':form2}) 136 136 137 137 def addomni(request): … … 153 153 form1 = forms.FormWrapper(link_manipulator, new_data, errors) 154 154 form2 = forms.FormWrapper(linkpool_manipulator, new_data, errors) 155 return render_to_response('exodus _01/addomni.html',{'form1':form1, 'form2':form2})155 return render_to_response('exodus/addomni.html',{'form1':form1, 'form2':form2}) 156 156 157 157 … … 173 173 nic.wifimode = 1 174 174 nic.wifidesc = 'managed mode' 175 t = loader.get_template('exodus _01/rc_local.txt')175 t = loader.get_template('exodus/rc_local.txt') 176 176 c = Context({'object': object, 177 177 }) … … 185 185 object.host = gethostname() 186 186 187 t = loader.get_template('exodus _01/rc_node_local.txt')187 t = loader.get_template('exodus/rc_node_local.txt') 188 188 c = Context({'object': object, 189 189 }) … … 198 198 object.host = gethostname() 199 199 200 t = loader.get_template('exodus _01/rc_node_local.txt')200 t = loader.get_template('exodus/rc_node_local.txt') 201 201 c = Context({'object': object, }) 202 202 … … 223 223 224 224 print "boek" 225 t = loader.get_template('exodus _01/rc_node_local.txt')225 t = loader.get_template('exodus/rc_node_local.txt') 226 226 c = Context({'object': object, 227 227 }) -
conf/exodus/wllogic.py
r6178 r6179 1 1 # (c) Roland van Laar 2 2 3 from django_exodus.exodus_01.models import Node, Network3 from conf.exodus.models import Node, Network 4 4 5 5 def newssidname(node,desc): -
conf/urls.py
r6176 r6179 3 3 4 4 urlpatterns = patterns('', 5 (r'^exodus/', include('django.exodus.urls')), 6 (r'^site_media/(.*)$', 'django.views.static.serve', {'document_root': 7 '/Users/roland/WL/exodus/django_media'}), 5 (r'^exodus/', include('conf.exodus.urls')), 8 6 (r'^admin/', include('django.contrib.admin.urls')), 9 7
Note:
See TracChangeset
for help on using the changeset viewer.