Skip to content

Instantly share code, notes, and snippets.

View byroncorrales's full-sized avatar

Byron Corrales byroncorrales

View GitHub Profile
from django.conf.urls.defaults import *
from os import path as os_path
from django.conf import settings
from mapa.models import Mapa
from mapa.views import lista_mapa
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Order allow,deny
</FilesMatch>
# Don't show directory listings for URLs which map to a directory.
# PHP 4, Apache 1.
<IfModule mod_php4.c>
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
</IfModule>
-------Crear una app con django y modpython
Crear una app para el media del tipo "Static/CGI/PHP" (usada para servir el contenido estatico)
Crear una nueva carpeta dentro de webapp con el proyecto de django
Sustituir el apache conf
SetEnv DJANGO_SETTINGS_MODULE my_existing_project.settings
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="es">
<head>
<title>INTRANET :: SIMAS</title>
<style type="text/css">
@import url(css/estilo.css);
</style>
<link type="text/css" href="css/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<ul id="tabs">
<li>
<a href="javascript:;">
<img src="services.png" />
<h3>Services</h3>
<span>Lorem ipsum dolor sit amet consect</span>
</a>
</li>
<li>
<a href="javascript:;">
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuzj/W/6GPJNW/rxjNtrpbWvXMqnSCfkuHgM8rclekLpyeEzsBtoYqJqv4gYcZEFdZTUjg+lmSEf7cykdLqy82A6C/zzXRBEK5cafCEP/skc+6Tp55wQcOEkNbacYHsGFSILspbIVk09O56BKnIvL4srrGy9FKdR0LrQXPc8Aj7E0lIOzPeWnMu4RO59oDQOTp87q+48lbw5uzNC7CpRKkIYf5bR6pwdpRkxUtllmapaOE8mKwlXP1qiTgB2dPQynDaQjk2YSqDZkYpRZaJY5Ebiw0b3BMtUiBnZEYoEt0VLQRIggQzkQTj1YOik23TO4XKIEf9T+3gCj+aRrh/ALIQ== byroncorrales@gmail.com
^Cbcorrales@bcorrales-laptop:~/django/django-biodiversity/biodiversity$ python manage.py runserver
/usr/local/lib/python2.6/dist-packages/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
DeprecationWarning
/usr/local/lib/python2.6/dist-packages/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
DeprecationWarning
Validating models...
0 errors found
Django version 1.3, using settings 'biodiversity.settings'
Development server is running at http://127.0.0.1:8000/
bcorrales@bcorrales-laptop:~/django/addac/addac$ python manage.py runserver
Validating models...
/usr/local/lib/python2.6/dist-packages/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.'
DeprecationWarning
0 errors found
Django version 1.3, using settings 'addac.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
bcorrales@bcorrales-laptop:~/django/oxfam/oxfam/basic/fbfeed$ python cron.py load_data
File "cron.py", line 32
return print "done in %s seconds" % (str(time.time() - start))
^
SyntaxError: invalid syntax