django apps

2011-06-02 Thread podio
Hi, where can i found django apps for learning, i'm trying to make the
management of a club, list of partners and collect monthly fees, I
have something make but I need lots of corrections

List only  RelationshipInline if the afiliado model have tipo_estitu =
True.
Export the list in every admin model to pdf and excel
and the fees app


models.py

#encodings UTF-8
from django.db import models

provincias = ((u'BA',u'Buenos Aires'),
 (u'CA',u'Catamarca'),
 (u'CH',u'Chaco'),
 (u'CU',u'Chubut'),
 (u'CO',u'Cordoba'),
 (u'CT',u'Corrientes'),
 (u'ER',u'Entre Rios'),
 (u'FO',u'Formosa'),
 (u'JU',u'Jujuy'),
 (u'LP',u'La Pampa'),
 (u'LR',u'La Rioja'),
 (u'ME',u'Mendoza'),
 (u'MI',u'Misiones'),
 (u'NE',u'Neuquen'),
 (u'RN',u'Rio Negro'),
 (u'SA',u'Salta'),
 (u'SJ',u'San Juan'),
 (u'SL',u'San Luis'),
 (u'SC',u'Santa Cruz'),
 (u'SF',u'Santa Fe'),
 (u'SE',u'Santiago del Estero'),
 (u'TF',u'Tierra del Fuego'),
 (u'TU',u'Tucuman'))

class obra_social(models.Model):
def __unicode__(self):
return self.descripcion
descripcion = models.CharField(max_length=200)
class Meta:
verbose_name_plural = "obras sociales"
verbose_name = "obra social"

class caracter(models.Model):
def __unicode__(self):
return self.descripcion
descripcion = models.CharField(max_length=200)
class Meta:
verbose_name_plural = "caracteres"

class tipo(models.Model):
def __unicode__(self):
return self.descripcion
descripcion = models.CharField(max_length=200)
cuota = models.DecimalField(max_digits=10, decimal_places=2)
estitu = models.BooleanField("Es titular")
class Meta:
verbose_name_plural = "tipos"

class afiliado(models.Model):
def __unicode__(self):
return self.nombre
nombre = models.CharField("Nombre",max_length=200)
FechaNac  = models.DateField("Fecha Nacimiento")
DOCN = models.CharField("Documento",max_length=20,blank =True)
Nacionalidad = models.CharField(max_length=50,default="Argentino")
obra_social = models.ForeignKey(obra_social)
caracter = models.ForeignKey(caracter)
tipo = models.ForeignKey(tipo)
Matricula = models.CharField(max_length=20)
FechaIng = models.DateField("Fecha Ingreso")
Direccion = models.CharField(max_length=100,blank =True)
CP = models.CharField(max_length=20,blank =True)
Ciudad = models.CharField(max_length=50)
Provincia = models.CharField(max_length=50, choices = provincias)
Tel1 = models.CharField(max_length=25,blank =True)
Tel2 = models.CharField(max_length=25,blank =True)
Email = models.EmailField(max_length=100,blank =True)
Observaciones = models.TextField(blank =True)
class Meta:
verbose_name_plural = "afiliados"

def calcular_edad(self):
import datetime
nac = str(self.FechaNac)
y,m,d = nac.split("-")
date = datetime.date(int(y),int(m),int(d))
delta = datetime.date.today() - date
try:
edad =  datetime.date.fromordinal(delta.days).year - 1
except:
edad = None
return edad

class Relationship(models.Model):
class Meta:
verbose_name = "Familiar"
verbose_name_plural = "Familiar"
parent = models.ForeignKey(afiliado, related_name='parents')
child = models.ForeignKey(afiliado, related_name='children')

-
admin.py

from afiliados.models import
afiliado,obra_social,caracter,tipo,Relationship
from django.contrib import admin

class RelationshipInline(admin.TabularInline):
model = Relationship
extra = 1
fk_name = 'parent'
raw_id_fields = ['child']

class AfiliadoAdmin(admin.ModelAdmin):
fieldsets = [
(None   ,{'fields':
['nombre','FechaNac','DOCN','Nacionalidad']}),
('Datos Generales'  ,{'fields':
['obra_social','caracter','tipo','Matricula','FechaIng']}),
('Datos de contacto',{'fields': ['Direccion',
("CP","Ciudad"),"Provincia","Tel1","Tel2","Email"]}),
(None   ,{'fields': ['Observaciones']}),
]
list_display = ('nombre',"tipo")
list_filter =
['Ciudad','caracter','tipo','obra_social','FechaNac']
search_fields = ['nombre','DOCN']
inlines = [RelationshipInline]

admin.site.register(afiliado,AfiliadoAdmin)
admin.site.register(obra_social)
admin.site.register(caracter)
admin.site.register(tipo)



I'm only have 4 day using django... and have a deadline.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 

column cannot be null

2011-06-01 Thread podio
I'm getting an error leaving a field blank but I have blank = True in
the model

IntegrityError at /admin/afiliados/afiliado/add/
(1048, "Column 'titular_id' cannot be null")
Request Method: POST
Request URL:http://localhost/mysite/admin/afiliados/afiliado/add/
Django Version: 1.3
Exception Type: IntegrityError
Exception Value:
(1048, "Column 'titular_id' cannot be null")



class afiliado(models.Model):
other fields...
titular = models.OneToOneField("self",blank = True)


Thanks!

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



Re: admin site search field

2011-05-31 Thread podio
I found one solutions:
 field = models.OneToOneField("self")
Im now searching how have a search form instead of a combo box.



On 31 mayo, 10:10, podio <ven...@podiodeportes.com.ar> wrote:
> yes, that was that I copy and didn't select de ', so when I pasted I
> saw only the missing bracket.
>
> On 31 mayo, 04:07, delegb...@dudupay.com wrote:
>
>
>
>
>
>
>
> > First, you did enclose doc properly. You wrote 'doc instead of 'doc'.
> > Sort that first. I'm however not suggesting that is the solution.
> > Regards.
> > Sent from my BlackBerry wireless device from MTN
>
> > -Original Message-
> > From: podio <ven...@podiodeportes.com.ar>
>
> > Sender: django-users@googlegroups.com
> > Date: Mon, 30 May 2011 16:24:10
> > To: Django users<django-users@googlegroups.com>
> > Reply-To: django-users@googlegroups.com
> > Subject: admin site search field
>
> > Hi, I'm new and I'm trying to make an app that have a field, pointing
> > to a record of the same object class. How can a make django has a
> > search form and show the record of the class on a popup window 
> > likehttp://demoweb.cibernatural.com/admin/gestion/presupuesto/add/(user
> > and password demo:demo) but pointing to the same class
>
> > class afiliado(models.Model):
> >     def __unicode__(self):
> >         return self.nombre
> >     nombre = models.CharField("Nombre",max_length=200)
> >     fecha_nac  = models.DateField("Fecha Nacimiento")
> >     doc = models.CharField("Documento",max_length=20,blank =True)
> >     obra_social = models.ForeignKey(obra_sociale)
> >     caracter = models.ForeignKey(caractere)
> >     tipo = models.ForeignKey(tipo)
> >     titular = models.CharField(max_length=200) > this
> > field
>
> > class AfiliadoAdmin(admin.ModelAdmin):
> >     fieldsets = [
> >         (None               ,{'fields':
> > ['nombre','fecha_nac','DOCN','Nacionalidad']}),
> >         ('Datos Generales'  ,{'fields':
> > ['obra_social','caracter','tipo',"titular",'Matricula','fecha_ing']}),
> >         ('Datos de contacto',{'fields':
> > ['Direccion',"CP","Ciudad","Provincia","Tel1","Tel2","Email"]}),
> >     ]
> >     list_display = ('nombre',"tipo")
> >     list_filter = ['Ciudad']
> >     search_fields = ['nombre','doc]
>
> > Thansk!
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

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



Re: admin site search field

2011-05-31 Thread podio
yes, that was that I copy and didn't select de ', so when I pasted I
saw only the missing bracket.


On 31 mayo, 04:07, delegb...@dudupay.com wrote:
> First, you did enclose doc properly. You wrote 'doc instead of 'doc'.
> Sort that first. I'm however not suggesting that is the solution.
> Regards.
> Sent from my BlackBerry wireless device from MTN
>
>
>
>
>
>
>
> -Original Message-
> From: podio <ven...@podiodeportes.com.ar>
>
> Sender: django-users@googlegroups.com
> Date: Mon, 30 May 2011 16:24:10
> To: Django users<django-users@googlegroups.com>
> Reply-To: django-users@googlegroups.com
> Subject: admin site search field
>
> Hi, I'm new and I'm trying to make an app that have a field, pointing
> to a record of the same object class. How can a make django has a
> search form and show the record of the class on a popup window 
> likehttp://demoweb.cibernatural.com/admin/gestion/presupuesto/add/(user
> and password demo:demo) but pointing to the same class
>
> class afiliado(models.Model):
>     def __unicode__(self):
>         return self.nombre
>     nombre = models.CharField("Nombre",max_length=200)
>     fecha_nac  = models.DateField("Fecha Nacimiento")
>     doc = models.CharField("Documento",max_length=20,blank =True)
>     obra_social = models.ForeignKey(obra_sociale)
>     caracter = models.ForeignKey(caractere)
>     tipo = models.ForeignKey(tipo)
>     titular = models.CharField(max_length=200) > this
> field
>
> class AfiliadoAdmin(admin.ModelAdmin):
>     fieldsets = [
>         (None               ,{'fields':
> ['nombre','fecha_nac','DOCN','Nacionalidad']}),
>         ('Datos Generales'  ,{'fields':
> ['obra_social','caracter','tipo',"titular",'Matricula','fecha_ing']}),
>         ('Datos de contacto',{'fields':
> ['Direccion',"CP","Ciudad","Provincia","Tel1","Tel2","Email"]}),
>     ]
>     list_display = ('nombre',"tipo")
>     list_filter = ['Ciudad']
>     search_fields = ['nombre','doc]
>
> Thansk!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/django-users?hl=en.

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



admin site search field

2011-05-30 Thread podio
Hi, I'm new and I'm trying to make an app that have a field, pointing
to a record of the same object class. How can a make django has a
search form and show the record of the class on a popup window like
http://demoweb.cibernatural.com/admin/gestion/presupuesto/add/ (user
and password demo:demo) but pointing to the same class


class afiliado(models.Model):
def __unicode__(self):
return self.nombre
nombre = models.CharField("Nombre",max_length=200)
fecha_nac  = models.DateField("Fecha Nacimiento")
doc = models.CharField("Documento",max_length=20,blank =True)
obra_social = models.ForeignKey(obra_sociale)
caracter = models.ForeignKey(caractere)
tipo = models.ForeignKey(tipo)
titular = models.CharField(max_length=200) > this
field


class AfiliadoAdmin(admin.ModelAdmin):
fieldsets = [
(None   ,{'fields':
['nombre','fecha_nac','DOCN','Nacionalidad']}),
('Datos Generales'  ,{'fields':
['obra_social','caracter','tipo',"titular",'Matricula','fecha_ing']}),
('Datos de contacto',{'fields':
['Direccion',"CP","Ciudad","Provincia","Tel1","Tel2","Email"]}),
]
list_display = ('nombre',"tipo")
list_filter = ['Ciudad']
search_fields = ['nombre','doc]


Thansk!

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



django, wsgi, virtualenv, apache2, fls

2011-05-22 Thread podio
I'm trying to configure apache2 + virtualenv + django + wsgi + fls

I already have the virtualenv with python 2.6 and django 1.1.4
working.

note01:/var/log/apache2# source /home/mariano/Python/virtualenvs/lfs/
bin/activate
(lfs)note01:/var/log/apache2# python
Python 2.6.6 (r266:84292, Apr 20 2011, 11:58:30)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(1, 1, 4, 'final', 0)
>>>

path to virtualenv =  /home/mariano/Python/virtualenvs/lfs/
path to the fls site = /home/mariano/Python/WEBS/podio_shop/
path to django 1.3 site = /home/mariano/Python/WEBS/mysite/

when i run the server thouth the virtualenv with python manage.py
runserver it load ok the fls shop at localhost:8000
but when I configure apache2 it doen't.
the site of django 1.3 it works ok, without virtualenv.

the files:

->httpd.conf

WSGIScriptAlias /mysite /home/mariano/Python/WEBS/mysite/apache/
django.wsgi
WSGIScriptAlias /podio_shop /home/mariano/Python/WEBS/podio_shop/
apache/django.wsgi

->virtual host


ServerAdmin ven...@podiodeportes.com.ar
DocumentRoot /var/www/


Order allow,deny
allow from all


Order allow,deny
allow from all




Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all


ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error,
crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128




->/home/mariano/Python/WEBS/mysite/apache/django.wsgi

import os
import sys

path = '/home/mariano/Python/WEBS'
if path not in sys.path:
sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

->/home/mariano/Python/WEBS/mysite/apache/django.wsgi

import os
import sys
sys.stdout = sys.stderr
import site

site.addsitedir('/home/mariano/Python/virtualenvs/lfs/lib/python2.6/
site-packages')
path = '/home/mariano/Python/WEBS'
path2 = '/home/mariano/Python/WEBS/podio_shop'

if path not in sys.path:
sys.path.append(path)
sys.path.append(path2)

os.environ['PYTHON_EGG_CACHE'] = '/home/mariano/Python/WEBS/podio_shop/
apache/egg-cache'
os.environ['DJANGO_SETTINGS_MODULE'] = 'podio_shop.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()



The error:

AttributeError at /
'AdminSite' object has no attribute 'root'
Request Method: GET
Request URL:http://localhost/
Django Version: 1.3
Exception Type: AttributeError
Exception Value:
'AdminSite' object has no attribute 'root'
Exception Location: /home/mariano/Python/WEBS/podio_shop/urls.py in
, line 22


It says django version 1.3 so I think the problem is in the wsgi file
of /home/mariano/Python/WEBS/podio_shop/apache/django.wsgi

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



Re: modwsgi Configuration

2011-05-21 Thread podio
Sorry, sorry I hurry in posting I change the path in the django.wsgi
for /home/mariano and it's working, now I have to see how to install 2
django version :S

SOLVE

On 21 mayo, 23:18, podio <ven...@podiodeportes.com.ar> wrote:
> apache log
>
> [Sat May 21 23:14:54 2011] [error] [client ::1] mod_wsgi (pid=14558):
> Exception occurred processing WSGI script '/home/mariano/mysite/apache/
> django.wsgi'.
> [Sat May 21 23:14:54 2011] [error] [client ::1] Traceback (most recent
> call last):
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in
> __call__
> [Sat May 21 23:14:54 2011] [error] [client ::1]
> self.load_middleware()
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/core/handlers/base.py", line 39, in
> load_middleware
> [Sat May 21 23:14:54 2011] [error] [client ::1]     for
> middleware_path in settings.MIDDLEWARE_CLASSES:
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/utils/functional.py", line 276, in
> __getattr__
> [Sat May 21 23:14:54 2011] [error] [client ::1]     self._setup()
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/conf/__init__.py", line 42, in _setup
> [Sat May 21 23:14:54 2011] [error] [client ::1]     self._wrapped =
> Settings(settings_module)
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/conf/__init__.py", line 89, in __init__
> [Sat May 21 23:14:54 2011] [error] [client ::1]     raise
> ImportError("Could not import settings '%s' (Is it on sys.path?): %s"
> % (self.SETTINGS_MODULE, e))
> [Sat May 21 23:14:54 2011] [error] [client ::1] ImportError: Could not
> import settings 'mysite.settings' (Is it on sys.path?): No module
> named mysite.settings
> [Sat May 21 23:14:54 2011] [error] [client ::1] File does not exist: /
> var/www/favicon.ico
>
> It say that the settings file is not in sys path but in the
> django.wsgi file it's add it.
>
> On 21 mayo, 23:12, podio <ven...@podiodeportes.com.ar> wrote:
>
>
>
>
>
>
>
> > I'm trying to configure django with mod wsgi.
>
> > I put mysite in /home/mariano/mysite create with django 1.3, running
> > the development server works ok.
> > When I try it to configure with apache2 with mod_wsgi I get 500 error:
> > Internal Server Error
> > The server encountered an internal error or misconfiguration and was
> > unable to complete your request.
>
> > --- 
> > 
> > the httpd.conf:
> > --- 
> > 
> > WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi
>
> > --- 
> > 
> > the /home/mariano/mysite/apache/django.wsgi file:
> > --- 
> > 
> > import os
> > import sys
>
> > path = '/home/mariano/mysite'
> > if path not in sys.path:
> >     sys.path.append(path)
>
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
>
> > when i change the httpd.conf with another wsgi in the same folderfile
> > it load ok!
>
> > --- 
> > 
> > /home/mariano/mysite/apache/django2.wsgi
> > --- 
> > 
> > def application(environ, start_response):
> >     status = '200 OK'
> >     output = 'Hello World!'
>
> >     response_headers = [('Content-type', 'text/plain'),
> >                         ('Content-Length', str(len(output)))]
> >     start_response(status, response_headers)
>
> >     return [output]
>
> > Due that I think the problem is in the wsgi file that call the
> > django.core.handlers.wsgi.WSGIHandler()
> > I very new in Django, I'm trying to make this work to then configure
> > django 1.1.4 in the same machine, to use it with lfs shop.
>
> > I have my web in joomla and it's too slow I try lfs and it's great but
> > I can only use it with django server
>
> > Thanks

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



Re: modwsgi Configuration

2011-05-21 Thread podio
apache log

[Sat May 21 23:14:54 2011] [error] [client ::1] mod_wsgi (pid=14558):
Exception occurred processing WSGI script '/home/mariano/mysite/apache/
django.wsgi'.
[Sat May 21 23:14:54 2011] [error] [client ::1] Traceback (most recent
call last):
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in
__call__
[Sat May 21 23:14:54 2011] [error] [client ::1]
self.load_middleware()
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/core/handlers/base.py", line 39, in
load_middleware
[Sat May 21 23:14:54 2011] [error] [client ::1] for
middleware_path in settings.MIDDLEWARE_CLASSES:
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/utils/functional.py", line 276, in
__getattr__
[Sat May 21 23:14:54 2011] [error] [client ::1] self._setup()
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/conf/__init__.py", line 42, in _setup
[Sat May 21 23:14:54 2011] [error] [client ::1] self._wrapped =
Settings(settings_module)
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/conf/__init__.py", line 89, in __init__
[Sat May 21 23:14:54 2011] [error] [client ::1] raise
ImportError("Could not import settings '%s' (Is it on sys.path?): %s"
% (self.SETTINGS_MODULE, e))
[Sat May 21 23:14:54 2011] [error] [client ::1] ImportError: Could not
import settings 'mysite.settings' (Is it on sys.path?): No module
named mysite.settings
[Sat May 21 23:14:54 2011] [error] [client ::1] File does not exist: /
var/www/favicon.ico

It say that the settings file is not in sys path but in the
django.wsgi file it's add it.




On 21 mayo, 23:12, podio <ven...@podiodeportes.com.ar> wrote:
> I'm trying to configure django with mod wsgi.
>
> I put mysite in /home/mariano/mysite create with django 1.3, running
> the development server works ok.
> When I try it to configure with apache2 with mod_wsgi I get 500 error:
> Internal Server Error
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> --- 
> 
> the httpd.conf:
> --- 
> 
> WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi
>
> --- 
> 
> the /home/mariano/mysite/apache/django.wsgi file:
> --- 
> 
> import os
> import sys
>
> path = '/home/mariano/mysite'
> if path not in sys.path:
>     sys.path.append(path)
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> when i change the httpd.conf with another wsgi in the same folderfile
> it load ok!
>
> --- 
> 
> /home/mariano/mysite/apache/django2.wsgi
> --- 
> 
> def application(environ, start_response):
>     status = '200 OK'
>     output = 'Hello World!'
>
>     response_headers = [('Content-type', 'text/plain'),
>                         ('Content-Length', str(len(output)))]
>     start_response(status, response_headers)
>
>     return [output]
>
> Due that I think the problem is in the wsgi file that call the
> django.core.handlers.wsgi.WSGIHandler()
> I very new in Django, I'm trying to make this work to then configure
> django 1.1.4 in the same machine, to use it with lfs shop.
>
> I have my web in joomla and it's too slow I try lfs and it's great but
> I can only use it with django server
>
> Thanks

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



modwsgi Configuration

2011-05-21 Thread podio
I'm trying to configure django with mod wsgi.

I put mysite in /home/mariano/mysite create with django 1.3, running
the development server works ok.
When I try it to configure with apache2 with mod_wsgi I get 500 error:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

---
the httpd.conf:
---
WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi



---
the /home/mariano/mysite/apache/django.wsgi file:
---
import os
import sys

path = '/home/mariano/mysite'
if path not in sys.path:
sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()



when i change the httpd.conf with another wsgi in the same folderfile
it load ok!

---
/home/mariano/mysite/apache/django2.wsgi
---
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)

return [output]


Due that I think the problem is in the wsgi file that call the
django.core.handlers.wsgi.WSGIHandler()
I very new in Django, I'm trying to make this work to then configure
django 1.1.4 in the same machine, to use it with lfs shop.

I have my web in joomla and it's too slow I try lfs and it's great but
I can only use it with django server

Thanks

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



Re: Best django ecommerce aplication?

2011-05-19 Thread podio
Thanks you all I will study them all !

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



Best django ecommerce aplication?

2011-05-18 Thread podio
I was thinking to migrate my page to python, I choose Django and know
need a shop aplication I was thinking in http://satchmoproject.com/.

There some other else better?

Thanks!

Sorry my english  Im a bit rusty

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