passwort reset next url

2015-08-31 Thread hinnack
Hi,

I have implemented my own password reset by overwriting the templates of 
django.contrib.auth
If I go to the login page e.g. /login I usually have a GET parameter "next" 
where I want to be redirected after successful login.
If I have forgotten my password, I would like to jump into the password 
reset process, but be able to use the next parameter after successful 
password reset and provide a link to /login?next=… to guide the user back 
to the login page in the sam manner, as before.

How can I do this?

kind regards

Hinnack

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e00ffaf5-2095-4c08-a9ab-eb3f0af8e332%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: block php requests

2015-01-21 Thread hinnack
Hi,
thanks for your reply.
Blocking all requests in Apache seems to be the best way. Can you give an 
example how to do that?
As / is mapped to the wsgi app ( 
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/ )
and a new files section does not the trick:

 #PHP protection

order allow,deny

deny from all

satisfy all




Am Dienstag, 20. Januar 2015 12:55:40 UTC+1 schrieb hinnack:
>
> Hi,
>
> I get a lot of intrusion checks on my website - especially for PHP 
> (wordpress, joomla, …).
> Today they all raise a 404 errors in python-django - so if you have emails 
> enabled for 404 errors…
>
> What is the best way to block those requests in a standard apache 
> deployment?
> ( https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/ )
>
> regards
>
> Hinnack
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aa96b4c6-63cc-4eff-9fa0-95c7bf71dfd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


block php requests

2015-01-20 Thread hinnack
Hi,

I get a lot of intrusion checks on my website - especially for PHP 
(wordpress, joomla, …).
Today they all raise a 404 errors in python-django - so if you have emails 
enabled for 404 errors…

What is the best way to block those requests in a standard apache 
deployment?
( https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/ )

regards

Hinnack

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6ae3fac4-4de2-4b26-8fce-aafb84c6a01a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


lazy error

2014-06-20 Thread hinnack


class test(models.Model):

version = models.CharField(max_length=255, choices=lazy(getGibthubTags, 
list)())

and a function getGibthubTags returning en amply array or an array of 
sets...


Using:
manage.py runserver

I sometimes get:

raise TypeError("Lazy object returned unexpected type.")
TypeError: Lazy object returned unexpected type.

why?

regards

Hinnack

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7c752f7f-87b5-4145-86e6-697949a89c3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: turn off csrf

2014-05-14 Thread hinnack
Am Mittwoch, 14. Mai 2014 14:39:27 UTC+2 schrieb hinnack:

> Am Dienstag, 13. Mai 2014 19:15:27 UTC+2 schrieb Tom Evans:
>
>> On Tue, May 13, 2014 at 4:36 PM, hinnack <henrik@miadi.net> wrote: 
>> > 
>> > Am Dienstag, 13. Mai 2014 16:48:57 UTC+2 schrieb Tom Evans: 
>> >> 
>> >> On Tue, May 13, 2014 at 2:49 PM, hinnack <henrik@miadi.net> 
>> wrote: 
>> >> > Hi, 
>> >> > 
>> >> > how can I turn off csrf completely - even in the admin interface? 
>> >> > 
>> >> > My base problem is, that with IE11 (and only IE11) I can not save 
>> any 
>> >> > form 
>> >> > in the admin interface. I always get: 
>> >> > 
>> >> > CSRF verification failed. Request aborted 
>> >> 
>> >> That message comes from django.views.csrf.csrf_failure. This view is 
>> >> only called from the csrf middleware.. 
>> >> 
>> >> > 
>> >> > 
>> >> > I have no csrf middleware set. What else must be done? 
>> >> > 
>> >> 
>> >> ... which suggests this is not true - re-check that you have actually 
>> >> removed it, go to a django shell, type these commands: 
>> >> 
>> >>   from django.conf import settings 
>> >>   settings.MIDDLEWARE_CLASSES 
>> >> 
>> >> is CsrfViewMiddleware listed there? If it isn't, have you tried 
>> >> turning it off and then on again? 
>> >> 
>> >> Cheers 
>> >> 
>> >> Tom 
>> > 
>> > 
>> > Thanks Tom, 
>> > 
>> > but I definitely did that - here is the result: 
>> > ('django.middleware.common.CommonMiddleware', 
>> > 'django.contrib.sessions.middleware.SessionMiddleware', 
>> > 'schiwago.middleware.header.ResponseInjectHeader', 
>> > 'schiwago.middleware.auth.BasicAuthMiddleware', 
>> > 'django.contrib.messages.middleware.MessageMiddleware', 
>> > 'django.middleware.transaction.TransactionMiddleware') 
>> > 
>>
>> Well, look: 
>>
>> The message you report comes from the csrf failure view: 
>>
>>
>> https://github.com/django/django/blob/stable/1.6.x/django/views/csrf.py#L34 
>>
>> The csrf failure view is only invoked from one place, the csrf 
>> middleware: 
>>
>>
>> https://github.com/django/django/blob/stable/1.6.x/django/middleware/csrf.py#L94
>>  
>>
>>
>> > What do you mean by turn on/off again? Enable the CsrfViewMiddleware 
>> again? 
>>
>> Sorry, this was a bad joke from a UK TV show, "The IT Crowd", they 
>> first question they ask is "have you tried turning it off and then on 
>> again". 
>>
>> I was referring to the server itself - have you restarted the server 
>> since making the change. Making the change in the settings.py would 
>> have it reflected in a new django shell, but not in an already running 
>> webserver. 
>>
>> Cheers 
>>
>> Tom 
>>
>
> :-)
>
> I think, you can not deactivate csrf in the admin interface anymore…
> It is used somewhere as a decorator as make_middleware_decorator is called 
> for it…
>
> Is this the expected behavior? Or is there a setting I overlooked?
>
> regards,
> Hinnack
>

OK doing:
setattr(request, '_dont_enforce_csrf_checks', True)
in a middleware does the trick.

the question remains: Is this expected? Or should the absence of the crsf 
middleware do set this anyway? or should there be a setting anyway?

regards,
Hinnack 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2271592c-fcd7-4e03-90f9-1691dde3f347%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: turn off csrf

2014-05-14 Thread hinnack
Am Dienstag, 13. Mai 2014 19:15:27 UTC+2 schrieb Tom Evans:

> On Tue, May 13, 2014 at 4:36 PM, hinnack <henrik@miadi.net> 
> wrote: 
> > 
> > Am Dienstag, 13. Mai 2014 16:48:57 UTC+2 schrieb Tom Evans: 
> >> 
> >> On Tue, May 13, 2014 at 2:49 PM, hinnack <henrik@miadi.net> wrote: 
> >> > Hi, 
> >> > 
> >> > how can I turn off csrf completely - even in the admin interface? 
> >> > 
> >> > My base problem is, that with IE11 (and only IE11) I can not save any 
> >> > form 
> >> > in the admin interface. I always get: 
> >> > 
> >> > CSRF verification failed. Request aborted 
> >> 
> >> That message comes from django.views.csrf.csrf_failure. This view is 
> >> only called from the csrf middleware.. 
> >> 
> >> > 
> >> > 
> >> > I have no csrf middleware set. What else must be done? 
> >> > 
> >> 
> >> ... which suggests this is not true - re-check that you have actually 
> >> removed it, go to a django shell, type these commands: 
> >> 
> >>   from django.conf import settings 
> >>   settings.MIDDLEWARE_CLASSES 
> >> 
> >> is CsrfViewMiddleware listed there? If it isn't, have you tried 
> >> turning it off and then on again? 
> >> 
> >> Cheers 
> >> 
> >> Tom 
> > 
> > 
> > Thanks Tom, 
> > 
> > but I definitely did that - here is the result: 
> > ('django.middleware.common.CommonMiddleware', 
> > 'django.contrib.sessions.middleware.SessionMiddleware', 
> > 'schiwago.middleware.header.ResponseInjectHeader', 
> > 'schiwago.middleware.auth.BasicAuthMiddleware', 
> > 'django.contrib.messages.middleware.MessageMiddleware', 
> > 'django.middleware.transaction.TransactionMiddleware') 
> > 
>
> Well, look: 
>
> The message you report comes from the csrf failure view: 
>
> https://github.com/django/django/blob/stable/1.6.x/django/views/csrf.py#L34 
>
> The csrf failure view is only invoked from one place, the csrf middleware: 
>
>
> https://github.com/django/django/blob/stable/1.6.x/django/middleware/csrf.py#L94
>  
>
>
> > What do you mean by turn on/off again? Enable the CsrfViewMiddleware 
> again? 
>
> Sorry, this was a bad joke from a UK TV show, "The IT Crowd", they 
> first question they ask is "have you tried turning it off and then on 
> again". 
>
> I was referring to the server itself - have you restarted the server 
> since making the change. Making the change in the settings.py would 
> have it reflected in a new django shell, but not in an already running 
> webserver. 
>
> Cheers 
>
> Tom 
>

:-)

I think, you can not deactivate csrf in the admin interface anymore…
It is used somewhere as a decorator as make_middleware_decorator is called 
for it…

Is this the expected behavior? Or is there a setting I overlooked?

regards,
Hinnack

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/50910172-895b-44ce-8a01-0fa4235872fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: turn off csrf

2014-05-13 Thread hinnack

Am Dienstag, 13. Mai 2014 16:48:57 UTC+2 schrieb Tom Evans:
>
> On Tue, May 13, 2014 at 2:49 PM, hinnack <henrik@miadi.net> 
> wrote: 
> > Hi, 
> > 
> > how can I turn off csrf completely - even in the admin interface? 
> > 
> > My base problem is, that with IE11 (and only IE11) I can not save any 
> form 
> > in the admin interface. I always get: 
> > 
> > CSRF verification failed. Request aborted 
>
> That message comes from django.views.csrf.csrf_failure. This view is 
> only called from the csrf middleware.. 
>
> > 
> > 
> > I have no csrf middleware set. What else must be done? 
> > 
>
> ... which suggests this is not true - re-check that you have actually 
> removed it, go to a django shell, type these commands: 
>
>   from django.conf import settings 
>   settings.MIDDLEWARE_CLASSES 
>
> is CsrfViewMiddleware listed there? If it isn't, have you tried 
> turning it off and then on again? 
>
> Cheers 
>
> Tom 
>

Thanks Tom,

but I definitely did that - here is the result:
('django.middleware.common.CommonMiddleware', 
'django.contrib.sessions.middleware.SessionMiddleware', 
'schiwago.middleware.header.ResponseInjectHeader', 
'schiwago.middleware.auth.BasicAuthMiddleware', 
'django.contrib.messages.middleware.MessageMiddleware', 
'django.middleware.transaction.TransactionMiddleware')

What do you mean by turn on/off again? Enable the CsrfViewMiddleware again? 
Why could that work? Will that manipulate the client or do any magic on the 
server (something in tables)?

regards
Hinnack 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43d938e4-e54e-45d3-bd6a-bb1a09a3c552%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


turn off csrf

2014-05-13 Thread hinnack
Hi,

how can I turn off csrf completely - even in the admin interface?

My base problem is, that with IE11 (and only IE11) I can not save any form 
in the admin interface. I always get:

CSRF verification failed. Request aborted

I have no csrf middleware set. What else must be done?

(using django 1.6)

regards

Hinnack

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8b6ea52b-1d60-4613-995b-5a1e9912d910%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: RSS combinator

2013-03-07 Thread hinnack
Is'n that something for yahoo pipes?
http://pipes.yahoo.com/pipes/

Of course pipes are not django...

Hinnack

Am Freitag, 8. März 2013 04:24:39 UTC+1 schrieb Lachlan Musicman:
>
> Hola, 
>
> Does anyone know of a django app that would take a number of rss feeds 
> >1 and turn it into a single blog feed/stream? 
>
> Note, I don't want to create an rss feed of local content - I want to 
> create an amalgam of other feeds. 
>
> eg: take 
>
> https://www.djangoproject.com/rss/community/blogs/ 
> https://www.djangoproject.com/rss/community/links/ 
> https://www.djangoproject.com/rss/community/q-and-a/ 
>
> and use it to create a single stream of (unique, for preference) 
> stories... 
>
>
>
> Cheers 
> L. 
>
>
> -- 
> So the future isn't a boot stamping on a human face, forever. It's a 
> person in a beige business outfit advocating beige policies that 
> nobody wants (but nobody can quite articulate a coherent alternative 
> to) with a false mandate obtained by performing rituals of 
> representative democracy that offer as much actual choice as a 
> Stalinist one-party state. And resistance is futile, because if you 
> succeed in overthrowing the beige dictatorship, you will become that 
> which you opposed. 
>
>
> http://www.antipope.org/charlie/blog-static/2013/02/political-failure-modes-and-th.html
>  
>

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




Appscale and Django

2013-02-03 Thread hinnack
Hi all,

is someone on the list using Appscale [1] with Django?
If yes, what is your setup (MySQL, Mongo, E2, Eucalyptus [2], KVM, etc.)
What is your experiance towards stalability, reliability and performance?

[1] http://appscale.cs.ucsb.edu
[2] http://www.eucalyptus.com

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




Re: queryset caching - without caching middleware

2012-07-05 Thread hinnack
hmm, Ok, Queryset Caching happens alle the time...

So here are some more questions on this:
- where is the data stored?
- can I ask a model, if its result is cached or a fresh one?
- can I disable or force a "refresh" of the cache?
- how would i use a query in a property of a class, without running into 
the cache phenomena?

regards

Henrik


Am Donnerstag, 5. Juli 2012 13:43:06 UTC+2 schrieb hinnack:
>
> Hi all, 
>
> what's the magic here? 
>
> I am using django 1.3 with sqlite or postgres by invoking: 
> runserver 10.150.2.15:8080 --noreload 
>
> I have a view (no cache decorator) doing simple querys on the orm and 
> return that as html - nothing fancy 
> The view is executed on each request, but the database is hit only on the 
> first request 
> After that devserver shows only one query each request querying for 
> django_session 
>
> newly data is not fetched... 
>
> any idea? 
>
> my middleware looks like this: 
> MIDDLEWARE_CLASSES = ( 
> 'django.middleware.common.CommonMiddleware', 
> 'django.contrib.sessions.middleware.SessionMiddleware', 
> 'schiwago.middleware.header.ResponseInjectHeader', 
> 'schiwago.middleware.auth.BasicAuthMiddleware', 
> 'django.middleware.transaction.TransactionMiddleware', 
> ) 
>
> INSTALLED_APPS = ( 
> 'django.contrib.auth', 
> 'django.contrib.contenttypes', 
> 'django.contrib.sessions', 
> 'django.contrib.messages', 
> 'django.contrib.staticfiles', 
> 'django.contrib.admin', 
> 'schiwago', 
> 'transdb', 
> 'south', 
> 'mediafactory.ui', 
> 'relatorio', 
> 'djcelery', 
> 'devserver' 
> ) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/RYl7--t81FIJ.
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.



pydra

2011-08-23 Thread hinnack
hi all,

Anyone ever used pydra?
http://code.osuosl.org/projects/pydra/wiki

could not find a thread on the list...

Regards

Henrik

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



cache large files

2010-01-21 Thread Hinnack
Hi,

I am using memcached for caching my sites. The documentation says when
not to use it:
http://code.google.com/p/memcached/wiki/WhyNotMemcached

one point is output larger 1 MB

I have a site producing pdf files only, where size can easily go over
1 MB. As the docs above mention mogilefs as
an alternative, I wonder if this is the right way to do it, as there
is no batterie for djangos caching system.

I know that the cach system has support for filesystem cache - has
someone used this for large files? and maybe even
in conjunction with GlusterFS (http://www.gluster.org/), as that seems
to be more complete then mogilefs?

What about concurrent writes from different hosts to the cache system?

--

Hinnack

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



cache for "large" files like pdf

2010-01-20 Thread hinnack
Hi,

I am using memcached for caching my sites. The documentation says when
not to use it:
http://code.google.com/p/memcached/wiki/WhyNotMemcached

one point is output larger 1 MB

I have a site producing pdf files only, where size can easily go over
1 MB. As the docs above mention mogilefs as
an alternative, I wonder if this is the right way to do it, as there
is no batterie for djangos caching system.

I know that the cach system has support for filesystem cache - has
someone used this for large files? and maybe even
in conjunction with GlusterFS (http://www.gluster.org/), as that seems
to be more complete then mogilefs?

What about concurrent writes from different hosts to the cache system?

--

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




Re: Django Cache

2010-01-14 Thread Hinnack
why dont you use localurl
http://code.google.com/p/django-localeurl/

so you have the language automatically in the URL and you do not need to
change anything...

--

Hinnack

2010/1/14 vitor torres <vitor.tor...@gmail.com>

> Hi. I'm building blog and I want to cache the main page wich is a
> archive_index generic view and I want to be able to choose between
> languages wich means that I must do different cache depending on the
> language. So I tried to use the the decorator @vary_on_headers('Accept-
> language') in my urls.py but I had an error: 'MethodDecoratorAdaptor'
> object has no attribute 'has_header'. Could someone please tell me
> what am I doing wrong or if it feaseable to do that with a generic
> view.
>
> --
> 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<django-users%2bunsubscr...@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-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.



Re: need for caching POST requests

2010-01-13 Thread Hinnack
Yes I can read the code!
As you can read in my first mail, I did not ask anybody to write it for me!
I just asked
if somebody did this before and if others have the same need!

2010/1/13 Tomasz Zieliński <tomasz.zielin...@pyconsultant.eu>

> On 13 Sty, 11:09, Hinnack <henrik.gens...@googlemail.com> wrote:
> > there must be done more then this - e.g. the value of the key the data is
> > stored in cache has to be calculated from POST vars
> > instead of URL alone
>
> Why don't you take a look yourself:
>
>
> http://code.djangoproject.com/browser/django/tags/releases/1.1.1/django/core/cache
>
> http://code.djangoproject.com/browser/django/tags/releases/1.1.1/django/middleware/cache.py
>
> - it's quite readable piece of code
>
> --
> Tomasz Zielinski
> http://pyconsultant.eu
>
> --
> 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<django-users%2bunsubscr...@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-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.



Re: need for caching POST requests

2010-01-13 Thread Hinnack
there must be done more then this - e.g. the value of the key the data is
stored in cache has to be calculated from POST vars
instead of URL alone


2010/1/13 Tomasz Zieliński <tomasz.zielin...@pyconsultant.eu>

>
>
> On 13 Sty, 07:54, hinnack <henrik.gens...@googlemail.com> wrote:
> > Hi,
> >
> > I need to cache POST requests, too, on certain requests.
> > The requests are not changing data, but imagine an XMLRPC
> > service (that is based on POST requests only per spec anyway) uses
> > functions, that always return the same like 2 + 2 SHOULD always
> > return 4 :-) The site I have could use the caching-middleware, if it
> > would support POST, as no request changes data.
> >
> > Now the whole caching mechanism of django only supports GET
> > (as far as I know).
> > Has someone tried on caching POST requests?
> > Is someone else interested in caching POST requests? (is this more
> > something for django core or should I write a decorator)
> >
>
> I would say that this is no different than caching GET requests.
> If you take a look at django cache middlewares (django/middleware/
> cache.py),
> then you quickly notice that there are lines like:
>
>if not request.method in ('GET', 'HEAD') or request.GET:
>request._cache_update_cache = False
>return None # Don't bother checking the cache.
>
> So you should quickly be able to just adapt that to you need by
> including
> POST request under some conditions.
>
> --
> Tomasz Zielinski
> http://pyconsultant.eu
>
> --
> 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<django-users%2bunsubscr...@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-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.



need for caching POST requests

2010-01-12 Thread hinnack
Hi,

I need to cache POST requests, too, on certain requests.
The requests are not changing data, but imagine an XMLRPC
service (that is based on POST requests only per spec anyway) uses
functions, that always return the same like 2 + 2 SHOULD always
return 4 :-) The site I have could use the caching-middleware, if it
would support POST, as no request changes data.

Now the whole caching mechanism of django only supports GET
(as far as I know).
Has someone tried on caching POST requests?
Is someone else interested in caching POST requests? (is this more
something for django core or should I write a decorator)

--

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




Re: Python based web reporting tool?

2010-01-08 Thread Hinnack
I am using reportman http://reportman.sf.net
it has a WYSIWYG Editor and a console tool or server with viewer and can
export to HTML, PDF, ...

2010/1/7 Nick Lo 

> > I have a question for those of you doing web work with python. Is
> > anyone familiar with a python based reporting tool?  I am about to
> > start on a pretty big web app and will need the ability to do some end
> > user reporting (invoices, revenue reports, etc). It can be an existing
> > django app or anything python based so I can hook into it. Thanks!
>
> http://geraldo.sourceforge.net/
>
> --
> 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.
>
>
>
>
-- 

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.



Re: Django Gantt Chart

2010-01-04 Thread Hinnack
what about:
http://matplotlib.sourceforge.net/

--
Hinnack

2010/1/4 Daniel Hilton <daniel.hil...@gmail.com>

> 2010/1/4 Alessandro Ronchi <alessandro.ron...@soasi.com>:
> > I need to make a simple chart with a list of projects and a grafic
> > display of the end date with a link to the project page.
> > It's simpler than a gantt chart.
> >
> > Is there any library / snippet I can use to simplify my work?
> >
>
> Hmmm, as I'm about to do something similar I've also researched this.
>
> If you're just looking at displaying a list of objects(projects) then
> you can use a generic view and then handle the display in the
> template, which means the following links may be of help:
>
> http://www.jlion.com/docs/gantt.aspx
> http://www.jsgantt.com/
>
> Niether of which are particularly pretty but the basics are there
> ready to be reskinned.
>
> http://www.ext-scheduler.com/examples.html
>
> Is however, pretty awesome, if commercially licensed.
>
> This question on stackoverflow is pretty extensive as well:
> http://stackoverflow.com/questions/1005587/gantt-chart-online
>
> If I don't find one I like, I'm thinking about writing a template tag
> and some jQuery to make a nice dependency graph.
> HTH,
> Dan
>
>
>
>
> > --
> > Alessandro Ronchi
> >
> > http://www.soasi.com
> > SOASI - Sviluppo Software e Sistemi Open Source
> >
> > http://hobbygiochi.com
> > Hobby & Giochi, l'e-commerce del divertimento
> >
> > --
> >
> > 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<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> >
> >
> >
>
>
>
> --
> Dan Hilton
> 
> www.twitter.com/danhilton
> www.DanHilton.co.uk
> 
>
> --
>
> 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<django-users%2bunsubscr...@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-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.




Re: Matplotlib with Django

2009-12-26 Thread Hinnack
if you want to offer lots of properties one can change, POST via ajax is the
better way - as you said
long URLs can get very ugly - although you could shorten them like youtube
or others do it.
GET is far better at this point of time, as only GET requests are cachable
(as far as I know) by djangos
middleware.

if I understand you right: you want to mix html with image-data? That is
impossible. But you can
add parameters to the header of the http response of the image and put in
there all settings needed to render the image...
So you need 2 urls - although you could add a second variable to the url
e.g. output:
url(r'^graph_example/(?P\d+)/(?P\w+)/$')

and then a view:

def myview(request, id, output):
   if output == 'image':
 # output image data
   else:
  # output html data



2009/12/26 heaviside x 

> Hello,
>
> To start, this is not another how do I get matplotlib to work in
> Django thread.  This is how do I get matplotlib to work better with
> django.  Before I go on, let me outline what I'm doing.
>
> I'm currently working on a scientific data manager/viewer which uses
> matplotlib as the primary graphing workhorse.  My intention is to be
> able to easily handle all sorts of crazy scientific plots (Smith
> Charts, Polar Plots with negative values, and other crazy mappings).
> In the past, matplotlib has been able to easily and elegantly handle
> these charts, so I'm sticking with it for now.  I also want to be able
> to take these generated plots and quickly dump them into documents or
> reports so a save functionality (or drag and drop via the browser) is
> key.
>
> Currently, my application is based off the standard matplotlib
> example.  I have a webpage that contains a static graph.png image and
> I point that url to another view that renders my matplotlib png and
> returns it.
>
> url(r'^graph_example/(?P\d+)/$')
> url(r'^graph_example/(?P\d+)/graph.png')
>
> How should I implement editable scales, titles, and labels?  For
> instance, the graph comes up but I want a different scaling for a
> report.  I could add all this information as url variables to the
> view, but that would be extremely ugly.  Is the simple solution a
> query string?  However, this also yields very ugly URLs.
>
> Instead of just returning an image in the HttpResposne as the django/
> matplotlib example shows, is there a way to return the image with the
> rest of the base page's response?  Removing the need for hard coding a
> "graph.png" url into my template.
>
> Any help would be greatly appreciated.
>
> --
>
> 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.
>
>
>

--

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.




Re: Best way to keep populating database after creation?

2009-12-22 Thread Hinnack
you could use a migration tool like this:
http://south.aeracode.org/

and do some data migration...

--

Hinnack

2009/12/22 Kevin L <kluik...@gmail.com>

> Hi, could anyone offer some tips as to the best way to keep populating
> my Django database after it's finalized (schema-/model-wise)? The app
> is most read-only and periodically, I finish up a new data set that
> needs to be included. How do I add this additional data set into the
> database without wrecking it? Right now, it seems like a combination
> of manage.py's sqlcustom and a python script to auto-create a .sql
> file for me is my best bet. Thanks in advance.
>
> Btw, data entry in the admin is not an option.
>
> --
>
> 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<django-users%2bunsubscr...@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-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.




Re: extend queryset field lookups for time

2009-12-18 Thread hinnack
has nobody an idea for this?
Hour and Minute itself seems to be easy - should just be added to
where.py
WhereNode class => make_atom() - but how to extend the functionality
to greater / lower?


-- Hinnack

On Nov 27, 2:53 pm, Hinnack <henrik.gens...@googlemail.com> wrote:
> Hi,
>
> how would I extend the field lookup to get somethnng like this:
>
> SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20
> what is for MYSQL:
> SELECT ... WHERE HOUR(pub_date) > 20
> to get all entries where the timepart of pub_date is grater then 8pm
>
> and how would I change the existing of YEAR, MONTH, DAY for > and <...
>
> regards
>
> -- Hinnack

--

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.




Fwd: Ticket #2417 Support for binary type fields

2009-12-18 Thread Hinnack
noone interested in this?

--

Hinnack

-- Forwarded message --
From: Hinnack <henrik.gens...@googlemail.com>
Date: 2009/12/13
Subject: Ticket #2417 Support for binary type fields
To: Django users <django-users@googlegroups.com>


Hi,

is there a timeframe, when this will make it into TRUNC or a version?

regards

--
Hinnack

--

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.




Re: Django editor for Debian

2009-12-16 Thread Hinnack
you can also try aptana, a eclipse clone where you can use pydev, too

--
Hinnack

2009/12/16 Nicu Marcu <marcu.nico...@gmail.com>

> Thanks, I will try with eclipse and pydev
>
> 2009/12/16 Jani Tiainen <rede...@gmail.com>
>
> On Tue, 2009-12-15 at 23:58 -0800, NMarcu wrote:
>> > Hello all,
>> >
>> >Can you tell me a good Django editor for Debian? Something more
>> > pretty then default text editor. Something to can edit templates also.
>> > Thanks.
>>
>> vim, emacs, netbeans, pydev, idle, boa...  Just few to mention, all
>> depends on your preferences.
>>
>> Personally I'm quite happy with eclipse + pydev.
>>
>> --
>>
>> Jani Tiainen
>>
>>
>> --
>>
>> 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<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>>
>
>
> --
> All the best,
>
> Nicolae MARCU
>
>  --
> 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<django-users%2bunsubscr...@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-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.




Ticket #2417 Support for binary type fields

2009-12-13 Thread Hinnack
Hi,

is there a timeframe, when this will make it into TRUNC or a version?

regards

--
Hinnack

--

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.




Re: german umlaute on search querys

2009-11-29 Thread Hinnack
Hi Karen,

thanks for investigating...
I solved the problem.
There were 2 reasons:
- php code non passing correct encoded POST
- urllib.unquote_plus not working as expected

and not for last that the raw_post_data is not decoded and a POST var is...
(my blindness)

Thanks again for your help.

-- Hinnack

2009/11/26 Karen Tracey <kmtra...@gmail.com>

> On Thu, Nov 26, 2009 at 7:03 AM, Hinnack <henrik.gens...@googlemail.com>wrote:
>
>> Hi Karen,
>>
>> thanks again for your reply.
>> I use Aptana with pydev extension.
>> Debugging the app shows the following for search:
>> dict: {u'caption': u'f\\xfcr', u'showold': False}
>>
>>
> That's confusing to me, because other than having an extra \ (which could
> be an artifact of how it's being displayed), that looks like a
> correctly-built unicode object für.
>
> and for qs:
>> str: für
>> although it seems to be  instead of ASCII 252 - but this could be,
>> because I am sitting on a MAC
>> while debugging.
>>
>
> Using python manage.py shell might shed more light, I fear the tool here is
> assuming an incorrect bytestring encoding and getting in the way.
>
> I cannot recreate anything like what you are seeing.  I have a model Thing
> stored in a MySQL DB (using a utf-8 encoded table) with CharField name.
> There are two instances of this Thing in the DB that contain für in the
> name.  From a python manage.py shell, using Django 1.1.1:
>
> >>> from ttt.models import Thing
> >>> import django
> >>> django.get_version()
> '1.1.1'
> >>> ufur = u'f\u00fcr'
> >>> print ufur
> für
> >>> ufur
> u'f\xfcr'
> >>> ufur.encode('utf-8')
> 'f\xc3\xbcr'
> >>> ufur.encode('iso-8859-1')
> 'f\xfcr'
>
> small-u with umlaut is U+00FC, encoded in utf-8 that takes 2 bytes C3BC,
> encoded in iso-8859-1 it is the 1 byte FC.
>
> Filtering with icontains, using either the Unicode object or the utf-8
> encode bytestring version, works properly:
>
> >>> Thing.objects.filter(name__icontains=ufur)
> [,  bytestring>]
> >>> Thing.objects.filter(name__icontains=ufur.encode('utf-8'))
> [,  bytestring>]
>
> Attempting to filter with an iso-8859-1 encoded bytestring raises an error:
>
> >>> Thing.objects.filter(name__icontains=ufur.encode('iso-8859-1'))
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/usr/lib/python2.5/site-packages/django/db/models/manager.py", line
> 129, in filter
> return self.get_query_set().filter(*args, **kwargs)
>   File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
> 498, in filter
> return self._filter_or_exclude(False, *args, **kwargs)
>   File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line
> 516, in _filter_or_exclude
> clone.query.add_q(Q(*args, **kwargs))
>   File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py",
> line 1675, in add_q
> can_reuse=used_aliases)
>   File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py",
> line 1614, in add_filter
> connector)
>   File "/usr/lib/python2.5/site-packages/django/db/models/sql/where.py",
> line 56, in add
> obj, params = obj.process(lookup_type, value)
>   File "/usr/lib/python2.5/site-packages/django/db/models/sql/where.py",
> line 269, in process
> params = self.field.get_db_prep_lookup(lookup_type, value)
>   File
> "/usr/lib/python2.5/site-packages/django/db/models/fields/__init__.py", line
> 214, in get_db_prep_lookup
> return ["%%%s%%" % connection.ops.prep_for_like_query(value)]
>   File "/usr/lib/python2.5/site-packages/django/db/backends/__init__.py",
> line 364, in prep_for_like_query
> return smart_unicode(x).replace("\\", "").replace("%",
> "\%").replace("_", "\_")
>   File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line
> 44, in smart_unicode
> return force_unicode(s, encoding, strings_only, errors)
>   File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", line
> 92, in force_unicode
> raise DjangoUnicodeDecodeError(s, *e.args)
> DjangoUnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-2:
> unexpected end of data. You passed in 'f\xfcr' ()
>
> This is because Django assumes the bytestring is utf-8 encoded, and runs
> into trouble attempting to convert to unicode specifying utf-8 as the
> string's encoding, since it is not valid utf-8 data.
>
> The only way I have been able to r

extend queryset field lookups for time

2009-11-27 Thread Hinnack
Hi,

how would I extend the field lookup to get somethnng like this:

SELECT ... WHERE EXTRACT('hour' FROM pub_date) > 20
what is for MYSQL:
SELECT ... WHERE HOUR(pub_date) > 20
to get all entries where the timepart of pub_date is grater then 8pm


and how would I change the existing of YEAR, MONTH, DAY for > and <...

regards

-- Hinnack

--

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.




Re: german umlaute on search querys

2009-11-26 Thread Hinnack
Hi Karen,

thanks again for your reply.
I use Aptana with pydev extension.
Debugging the app shows the following for search:
dict: {u'caption': u'f\\xfcr', u'showold': False}

and for qs:
str: für
although it seems to be  instead of ASCII 252 - but this could be,
because I am sitting on a MAC
while debugging.
(the search problem itself stays the same on MAC and LINUX debian)

regards
-- Hinnack

2009/11/26 Karen Tracey <kmtra...@gmail.com>

> On Wed, Nov 25, 2009 at 1:54 AM, Hinnack <henrik.gens...@googlemail.com>wrote:
>
>> Hi Karen,
>>
>> thanks for your reply
>>
>> it means so far I must do a:
>> qs = search[query].encode('iso-8859-1')
>>
>> before I add the qs to a Q object of a queryset. Only in this case I get
>> results.
>>
>> the full codepart looks like:
>>
>> decoder = simplejson.JSONDecoder()
>> search = decoder.decode(request.POST['search'])
>> qs = search['caption'].encode('iso-8859-1')
>>
>> searchstr = urllib.unquote_plus(qs).strip('=!~')
>>
>> basic.filter( Q(evid__caption__icontains=searchstr) )
>>
>>
>> I do have no DATABASE_OPTIONS set. Maybe that's it?
>>
>
> No, there's nothing you need to set specially to get this to work.
>
> It would be interesting to see the repr of search['caption'] before and
> after you do the encode('iso-8859-1').
>
> I suspect search['caption'] is originally a Unicode object that was
> (incorrectly) constructed from a utf-8 bytestring assuming iso-8859-1
> encoding.  That would explain the results you are getting, since encoding
> such an incorrectly constructed object to iso-8859-1 will restore it to a
> utf-8 bytestring. Django, when handed a bytestring, assumes it is utf-8
> encoded and speaks utf-8 to the database, so all works.  If on the other
> hand you pass such an incorrectly built unicode object as a unicode object,
> Django will encode it using utf-8, which results in two levels utf-8
> encoding having been done, and the result won't match actual utf-8 data in
> the database.
>
> But it's also just possible that the problem is the data values in the
> database, maybe.  Confirmation of where the problem is would come from
> knowing the repr of search['caption'] before and after the encode to
> iso-8859-1.  Then we'd be sure whether to look more closely at the way in
> which search['caption'] is getting built or the database itself.
>
> Karen
>
> --
> 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<django-users%2bunsubscr...@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-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.




Re: german umlaute on search querys

2009-11-24 Thread Hinnack
Hi Karen,

thanks for your reply

it means so far I must do a:
qs = search[query].encode('iso-8859-1')

before I add the qs to a Q object of a queryset. Only in this case I get
results.

the full codepart looks like:

decoder = simplejson.JSONDecoder()
search = decoder.decode(request.POST['search'])
qs = search['caption'].encode('iso-8859-1')

searchstr = urllib.unquote_plus(qs).strip('=!~')

basic.filter( Q(evid__caption__icontains=searchstr) )


I do have no DATABASE_OPTIONS set. Maybe that's it?


-- Hinnack


2009/11/25 Karen Tracey <kmtra...@gmail.com>

> On Tue, Nov 24, 2009 at 5:57 AM, Hinnack <henrik.gens...@googlemail.com>wrote:
>
>> Hi,
>>
>> I have django 1.1 and a mysql database created in utf-8.
>> My tables are also utf8 as the collation is, too.
>>
>> Showing data in a view works pretty well with german umlaute, but doing
>> a search with filter and icontains always returns an empty queryset...
>>
>> if I convert the search back to iso-8859 I get results...
>>
>> what am I doing wrong?
>>
>>
>>
> What does "convert the search back to iso-8859" mean?
>
> Karen
>
> --
> 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<django-users%2bunsubscr...@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-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.




german umlaute on search querys

2009-11-24 Thread Hinnack
Hi,

I have django 1.1 and a mysql database created in utf-8.
My tables are also utf8 as the collation is, too.

Showing data in a view works pretty well with german umlaute, but doing
a search with filter and icontains always returns an empty queryset...

if I convert the search back to iso-8859 I get results...

what am I doing wrong?

-- Hinnack

--

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.




Re: same session on more than 1 website

2009-09-25 Thread Hinnack
please add to the documentation:every site has to have the same SECRET_KEY,
too when you want to get session vars from a different host, as
the cookie-data is encoded by this key.

-- Hinnack

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



same session on more than 1 website

2009-09-25 Thread hinnack

hi,

I do have only set SESSION_COOKIE_DOMAIN = '.dev.miadi.net' in both
sites
and now I am expecting to be able to set a value under
host1.dev.miadi.net and to read it under host2.dev.miadi.net - but
this does not work.

the browser does send the cookie he got from host1 to host2, but the
site sets a new one. Because of this
the site can not find the value.

I am sitting on TRUNK.
session-data is store in DB.

reading and setting session vars inside each site works well

what am I doing wrong?

-- Hinnack

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



IN query problem with 2 for loops on a template

2009-09-22 Thread hinnack

I have 2 querysets:

events = event_dates.objects.select_related('evid', 'evid__type',
'evid__category').all()
inner_qs = event_dates.objects.all().values('pk').query
loc = locations.objects.filter(locid__in=inner_qs).all()
render_to_response('backup.xml', {'events': events, 'locations': loc,
'conn': connection}, mimetype='text/xml')

if I only loop events or loc on my template I only have 2 selects (one
"normal" and one witha "where .. in ()"

if I loop events and loc in 2 seperate loops (not nested) I get 1
select for events and as much selects for loc as rows in the result of
the second query - no
IN select is generated instead each row is fetched itself.

how can I prevent this?

-- Hinnack
--~--~-~--~~~---~--~~
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: create non-form widgets like a ajax driven table

2009-09-07 Thread Hinnack
that sems to be build on templates...
but if I do not want to uses templates?
is there already something like forms?

-- hinnack

2009/9/7 Ben Davis <bendavi...@gmail.com>

> In django terms,  a table is not a widget.  Widgets are basically different
> input methods for form fields.   Django's admin app has a built-in list view
> (I think it's called changelist) which you can customize or override.  It
> basically just takes some effort to dig into the admin contrib app to see
> how it's done.  There may or may not be options on the ModelAdmin that say
> whether or not its editable,  but check the docs to be sure.
>
>
> On Mon, Sep 7, 2009 at 11:29 AM, hinnack <henrik.gens...@googlemail.com>wrote:
>
>>
>> Hi,
>>
>> is there a standard way, how to create non form widgets - e.g. a table
>> - just showing
>> data, no edit possible - therefore no form?
>> I know I can create an object, put in a method toHTML or render that
>> returns the
>> safe HTML/JS code...
>>
>> But how should it be done?
>>
>> -- Hinanck
>>
>>
>
> >
>

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



create non-form widgets like a ajax driven table

2009-09-07 Thread hinnack

Hi,

is there a standard way, how to create non form widgets - e.g. a table
- just showing
data, no edit possible - therefore no form?
I know I can create an object, put in a method toHTML or render that
returns the
safe HTML/JS code...

But how should it be done?

-- Hinanck
--~--~-~--~~~---~--~~
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: xgettext under osx

2009-09-05 Thread Hinnack
gettext should come with apples developer tools - otherwise install them
using fink or port
-- Hinnack

2009/9/2 Ramiro Morales <cra...@gmail.com>

>
> On Wed, Sep 2, 2009 at 12:32 PM, arbi<arbin...@gmail.com> wrote:
> >
> > As for the PATH I thought it was for compilation and not for make
> > message.
> > Should I write this for make message ?
> >
> > PATH=$PATH:/Applications/Poedit.app/Contents/MacOS/
> > python /Library/python/2.5/site-packages/django/bin/make-messages.py
> > ?
> > And then I do django-admin.py makemessages -l fr ?
> > thx (I am a newb)
>
> The blog post talks about the django/bin/make-messages.py
> script has been replaced by the django-admin.py makemessages -l fr
>
> And yes, you need to have the GNU gettext command line tools
> (xgettext, msgmerge, msgfmt) available when running the different
> i18n-related django-admin.py commands (makemessages,
> compilemessages)
>
> --
> Ramiro Morales
> http://rmorales.net
>
> >
>

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



i18n - besides translation

2009-08-22 Thread hinnack

Hi,

while translating a site, I wonder if there is something that keeps
care of all national formats and encodeings like:
- money symbol ( pre or post sign)
- number format
- date format
- etc.

-- Hinnack

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