Re: Apache Segmentation Fault on succesful authentication

2008-11-12 Thread marco ghidinelli

On Wed, Nov 12, 2008 at 03:22:02AM -0800, huw_at1 wrote:
> 
> An update on this.
> 
> 'which python' returns:
> 
> libpython2.5.so.1.0 => not found
> libpthread.so.0 => /lib64/libpthread.so.0 (0x0039a4a0)
> libdl.so.2 => /lib64/libdl.so.2 (0x0039a460)
> libutil.so.1 => /lib64/libutil.so.1 (0x0039b340)
> libm.so.6 => /lib64/libm.so.6 (0x0039a420)
> libc.so.6 => /lib64/libc.so.6 (0x0039a3e0)
> /lib64/ld-linux-x86-64.so.2 (0x0039a2c0)
> 
> This explains why I cannot compile mod_python without first setting
> the LD_LIBRARY_PATH to '/usr/local/lib'. I don't know if this is the
> reason why the mod_python compilation continuously compiles with the
> python library as static. I upgraded my apache to the latest version
> however I still am getting segmentation faults on user authentication.
> Which potentially suggests that the problem is not apache and is
> something else like this issue.

echo '/usr/local/lib' >> /etc/ld.so.conf

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



nested template problem

2008-12-18 Thread marco ghidinelli

hello.

Does django template engine supports nested dictionary?
i'm trying to display a nested array with no luck.

that's my tries:

--- python manage.py shell ---
from django.template import Template, Context
list_parts = {
'root': {'value': [{'tag': 'a'},{'tag':'b'}]},
'wheel': {'value': [{'tag': 'c'}, ]}
}

t = Template("""
{% for part in list_parts %}

{{part}}
  
  {% for subpart in part %}
{{ subpart }}
  {% endfor %}
  

{% endfor %}
""")

c=Context({'list_parts':list_parts})
print t.render(c)
--

i tried every possible combination of 

{% for subpart in part %}
{% for subpart in part.part %}
{% for subpart in list_parts.part %}

but i'm not able to show the information.

where i am wrong?

/me hopeless.

--~--~-~--~~~---~--~~
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: nested template problem

2008-12-19 Thread marco ghidinelli

On Thu, Dec 18, 2008 at 11:42:19AM -0800, bruno desthuilliers wrote:
> > i'm trying to display a nested array with no luck.
> >
> > that's my tries:
> >
> > --- python manage.py shell ---
> > from django.template import Template, Context
> > list_parts = {
> > 'root': {'value': [{'tag': 'a'},{'tag':'b'}]},
> > 'wheel': {'value': [{'tag': 'c'}, ]}
> >
> > }
> 
> Why do you name it "list_" when it's a dict ?

code obfuscation. :-)

> > t = Template("""
> > {% for part in list_parts %}
> 
> This will iterate over the keys. If you want key:values pairs, you
> have to spell it:
> 
> {% for partname, partvalue in list_parts.items %}

argh!

i realize that i was reading the documentation from this page:
http://www.djangoproject.com/documentation/0.96/templates/

and not from this page:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs

too bad. :-(

thank you very much.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



extend TimeFormat

2010-08-25 Thread marco ghidinelli
hello,

i've a problem extending the TimeFormat class (used by "time" template
filter).

basically, i need a new method: 

def F(self):
if self.date.minute == 0:
return self.G()
return u'%s:%s' % (self.G(), self.i())

very similar to the original one except for a G() instead of a g().

the (too) easy path is to modify the dateformat.py, but i don't want
to modify the django installation for many obvious reasons.

i want to extend the dateformat class, and i tryed to put this

-
from django.utils.dateformat import TimeFormat

class TimeFormat(TimeFormat):
"extends with one method"

def F(self):
if self.date.minute == 0:
return self.G()
return u'%s:%s' % (self.G(), self.i())
---

in many places inside my project tree (settings.py, views.py, __init__.py ) 
but in vain.

where should i put it?


regards, 
marco.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



extend TimeFormat

2011-03-02 Thread marco ghidinelli
hello,

i've a problem extending the TimeFormat class (used by "time" template
filter).

basically, i need a new method: 

def F(self):
if self.date.minute == 0:
return self.G()
return u'%s:%s' % (self.G(), self.i())

very similar to the original one except for a G() instead of a g().

the (too) easy path is to modify the dateformat.py, but i don't want
to modify the django installation for many obvious reasons.

i want to extend the dateformat class, and i tryed to put this

-
from django.utils.dateformat import TimeFormat

class TimeFormat(TimeFormat):
"extends with one method"

def F(self):
if self.date.minute == 0:
return self.G()
return u'%s:%s' % (self.G(), self.i())
---

in many places inside my project tree (settings.py, views.py, __init__.py ) 
but in vain.

where should i put it?


regards, 
marco.

-- 
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.

-- 
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.