def get_countries(): file = open(mydir() + "unit/" + "countries.txt") countries = [] for i in file.readlines(): iniciales = i.split(" ")[0] nombre = i.split(" ")[1].replace("\n", "") tuple_country = (iniciales, nombre) countries.append(tuple_country) return countries
from django.conf.urls.defaults import * from django.views.generic.simple import redirect_to from meteorasite.settings import mydir # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^meteorasite/', include('meteorasite.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), (r'^$', redirect_to, {'url':"/demo"}), (r'^demo/',include("meteorasite.unit.urls")), (r'^static/(.*)','django.views.static.serve', {'document_root': mydir() + 'static/', 'show_indexes': True}) )