mod_python/django problems

2007-08-03 Thread Aljosa Mohorovic
on few blogs/web sites it is stated that > 30 django sites on one server running apache/mod_python have some issues, like untraceable errors and wrong site displaying for some domain. any comments on this? i have many small php sites that will eventually became django sites, how should i deploy?

Re: mod_python/django problems

2007-08-03 Thread Aljosa Mohorovic
On Aug 3, 1:47 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 03-Aug-07, at 4:46 PM, Aljosa Mohorovic wrote: > is this an official bug? I havent heard of it - although i have a > server with about 10 sites and have found one site once or twice i'm asking because i

Re: mod_python/django problems

2007-08-03 Thread Aljosa Mohorovic
On Aug 3, 3:06 pm, David Reynolds <[EMAIL PROTECTED]> wrote: > We have around 30 and have noticed the problems you've mentioned.. anybody on list knows if there is any progress on this issue, will it be resolved? i know lighttpd is good but i still want to know if this issue with apache will be

newforms errors translation

2007-08-04 Thread Aljosa Mohorovic
i'm trying to find a way to translate newforms errors but i can't find it in docs. does anybody know if this is documented somewhere? it's simple to display form errors just by displaying messages on english but i don't know a good way to do it on some other language. any tips on how to

Re: newforms errors translation

2007-08-05 Thread Aljosa Mohorovic
On Aug 5, 2:35 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 8/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: > > > i'm trying to find a way to translate newforms errors but i can't find > > it in docs. > > does anybody know if this is doc

Re: newforms errors translation

2007-08-05 Thread Aljosa Mohorovic
i just replaced "hr" with "de" and error messages are in german. where can i find if there is any support for my language and how can i submit small things like translation of error messages? http://www.djangoproject.com/documentation/i18n/ has no nice and simple example on how to start

auth system - check if user already exists

2007-08-05 Thread Aljosa Mohorovic
i'm currently looking at django.contrib.auth and wondering what is the correct way to check if user already exists? before i call User.objects.create_user() i want to know that user with submitted username and email doesn't exist. my current situation is that i call

Re: auth system - check if user already exists

2007-08-06 Thread Aljosa Mohorovic
i'm checking username and email because i want to avoid situations where some user registers with same email using different username. Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: auth system - check if user already exists

2007-08-06 Thread Aljosa Mohorovic
On Aug 6, 4:55 pm, LaundroMat <[EMAIL PROTECTED]> wrote: > Are you sure you want to avoid that? I remember somebody here linking > to an article where this wasn't advised, because it's (apparently) > quite common for members of the same household to register with the > same e-mail address (but

ManyToManyField status when post_save signal is emitted

2008-10-09 Thread Aljosa Mohorovic
post_save signal is emitted? Aljosa Mohorovic --~--~-~--~~~---~--~~ 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,

Re: ManyToManyField status when post_save signal is emitted

2008-10-10 Thread Aljosa Mohorovic
/83614/ and post comment if you think there is a better way. thanks Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Handling Subdomain Requests

2008-10-27 Thread Aljosa Mohorovic
y interested in option to handle all request from single django project/webfaction app. obviously i want to use less memory since every frontend will have 100-500 hits per month so there is no real need to have ~10x50mb if i can use 50-70mb. can you provide any suggestions for this situation? th

Join me on Bebo

2008-11-26 Thread Aljosa Mohorovic
73b135 .. This email was sent to you at the direct request of Aljosa Mohorovic <[EMAIL PROTECTED]>. You have not been added to a mailing list. If you would prefer not to receive invitations from ANY Bebo members please click here - http://www.be

Re: Join me on Bebo

2008-11-27 Thread Aljosa Mohorovic
sorry for this, i clicked the wrong link. On Nov 26, 11:18 pm, "Aljosa Mohorovic" <[EMAIL PROTECTED]> wrote: > You will like it. > > Click to find out why > > You also have the following outstanding friend requests: > > Bakheet Harire <[EMAIL PROT

django-admin makemessages - excluding folders

2008-12-01 Thread Aljosa Mohorovic
situation: $ django-admin makemessages -l hr --exclude_regex="^\.\/(django| photologue)" i'm sure that there is a better way (since this introduces problems when i update django), any tips? Aljosa Mohorovic svn diff: Index: core/management/commands/makem

raise Http404("my message")

2008-07-03 Thread Aljosa Mohorovic
if i call raise Http404("my message") and i set custom view to handle 404 errors how do i get "my message" in that view? Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

django.contrib.comments and "dynamic vars"

2008-07-07 Thread Aljosa Mohorovic
when using django.contrib.comments how can i use dynamic vars? in current page context i have object_type="news.News" and object_id="2" so i would like to do something like {% get_comment_count for object_type object_id as comment_count %} couldn't find any info on

modelforms: getting field object in clean_ method

2008-08-18 Thread Aljosa Mohorovic
: mainmodel_instance = MainModel(mymodel=mymodel_instance) form = MainModelForm(request.POST, instance=mainmodel_instance) what can i do to get mymodel instance in clen_ methods? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: modelforms: getting field object in clean_ method

2008-08-18 Thread Aljosa Mohorovic
i currently use self.instance but i'm not sure if i can do that since i didn't find an example using it in docs. also, i'm looking for clean method example where i can raise validation errors for 2 or more fields based on single validation. something like: if custom_validation() == False: #

Re: modelforms: getting field object in clean_ method

2008-08-18 Thread Aljosa Mohorovic
On Aug 18, 5:13 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > "2 or more fields" is a signal that the clean() method on the form is > the right place to do this. At that point, all the fields will have > individually passed their validation (i.e. they will be of the right > type) and any

using 1.0 instead trunk

2008-09-04 Thread Aljosa Mohorovic
trunk - http://code.djangoproject.com/svn/django/trunk/django/ 1.0 tag - http://code.djangoproject.com/svn/django/tags/releases/1.0/ since i'm using subversion for my sites in svn:externals i have django trunk and now i'm switching to 1.0 tag. so what i'm actually asking is if i'm using 1.0 tag

UnicodeDecodeError when using replace on model field

2008-09-04 Thread Aljosa Mohorovic
i can't figure out what's the problem (i also used re with same results). how should i replace a pattern with non-ascii char? working as expected: In [27]: s Out[27]: 'asd' In [28]: s = s.replace("s", "š") In [29]: s Out[29]: 'a\xc5\xa1d' not working on model fields: In [30]: p =

Re: UnicodeDecodeError when using replace on model field

2008-09-04 Thread Aljosa Mohorovic
On Sep 4, 4:00 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > In the working case your initial string is a bytestring, in the non-working > case the initial string is unicode.  The error comes from trying to replace > into a unicode string a bytestring containing non-ascii chars: > > >>> s =

euro djangocon talks

2009-04-20 Thread Aljosa Mohorovic
anybody has any information about possible euro djangocon talks? or any idea when will talks schedule be available? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

forcing language for admin app

2009-06-29 Thread Aljosa Mohorovic
how can i force admin app to use a single language (from LANGUAGE_CODE) and ignore LANGUAGES from settings or current language selected on site? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

admin running in dev mode (manage.py runserver) ignores MEDIA_URL

2009-08-14 Thread Aljosa Mohorovic
s expected. anybody knows how to force django admin when running in dev mode (manage.py runserver) to use images from MEDIA_URL and not images in django/contrib/admin/media? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are

how to make admin app use templates from app templates folder?

2009-09-01 Thread Aljosa Mohorovic
' in TEMPLATE_LOADERS and it is the only entry in list. also, this works as expected for my apps, is there something different with admin app? is there some document that describes what can i expect when using admin app via manage.py runserver? any tips appreciated. Aljosa Mohorovic p.s. i'm running

Re: how to make admin app use templates from app templates folder?

2009-09-02 Thread Aljosa Mohorovic
On Sep 1, 7:03 pm, Bill Freeman wrote: > Add the filesystem template loader, put it before app directories loader, > and put the (absolute) path to your templates directory (e.g.; > /home/moho/myapp/templates) in TEMPLATES_DIR. thanks, this actually works for me. Aljosa

are you using mptt, treebeard or something else?

2009-09-03 Thread Aljosa Mohorovic
i'm looking at django-mptt and django-treebeard but i'm not sure which one to use although both will solve my problem. currently i'm thinking to use treebeard because mptt requires me to use trunk for django v1.1. any comments/tips/recommendations are appreciated. Aljosa Mohorovic

Re: are you using mptt, treebeard or something else?

2009-09-04 Thread Aljosa Mohorovic
On Sep 3, 5:51 pm, Sandra Django wrote: > Sorry, a cuestion because I don't understand. mptt requires v1.1, but not > SVN version? only mptt svn trunk works with django 1.1 but i would like an official release rather then trunk. Aljosa

dynamically add m2m field to model

2009-09-15 Thread Aljosa Mohorovic
s_m2m" % model_name setattr(MyModel, new_field, models.ManyToManyField(model)) opts = MyModel._meta setattr(opts, new_field, new_field) Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu

djangocon videos

2009-10-14 Thread Aljosa Mohorovic
anybody knows when djangocon september/portland videos will be available? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

djangocon videos

2009-11-10 Thread Aljosa Mohorovic
will conference videos be available or did something terrible happened? Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: djangocon videos

2009-11-11 Thread Aljosa Mohorovic
but it's sad that, otherwise excellent conference, is missing an opportunity to reach users that weren't able to attend the conference. Aljosa Mohorovic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

using threadlocals to get current user outside views

2008-04-03 Thread Aljosa Mohorovic
i'm using admin app and found myself in situation where i need to store current user when saving item so i've overwritten save method on model and with threadlocals middleware fetched current user. threadlocals middleware url: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser is

awareness of current view in template/site navigation

2008-04-21 Thread Aljosa Mohorovic
i often find myself thinking "there must be a better way" when creating site navigation that has different images for normal/active/ hover link. so if my current location is "/news/archive", what i usually do is: - define current_view="news_archive" as variable for template - in template,

django searching/checking for user

2008-04-23 Thread Aljosa Mohorovic
i was wondering if there is django related solution for searching/ checking if user (django.contrib.auth + profile) exists or to retrieve similar results? so if i have: search_for = request.POST['search_for'] do i split search_for and basically do sql LIKE search through table fields or is

Re: django searching/checking for user

2008-04-23 Thread Aljosa Mohorovic
On Apr 23, 8:32 pm, Michael <[EMAIL PROTECTED]> wrote: > If you have auth and sessions working right in Django you can access a > logged in user from the request (request.user) and user in auth if you have > AUTH_PROFILE_MODULE [1] in your settings you can get the profile from the thanks for

IOError: Client read error (Timeout?)

2008-05-20 Thread Aljosa Mohorovic
IOError: Client read error (Timeout?) sometimes i get this error, any tips on how to handle this kind of errors? any comment related to this is welcomed. Aljosa --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: IOError: Client read error (Timeout?)

2008-05-20 Thread Aljosa Mohorovic
On May 20, 12:26 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Generally you can ignore it, it usually indicates that the user > pressed reload on a page or navigated off it before the browser could > send through the whole request. > > BTW, it is good idea to mention what hosting mechanism

theory on using single project or multiple projects per site

2008-06-04 Thread Aljosa Mohorovic
if i have a site under example.com domain with structure: www.example.com - public site - django project "portal" admin.example.com - administration site - django project "admin" shop.example.com - satchmo integration attempt - django project "shop" ... services, rss, and anything else you can

django 1.0 plans?

2007-12-03 Thread Aljosa Mohorovic
if i understood correctly django book is finished, api is almost stable and 1.0 release could happen soon? please comment --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

django version for production?

2008-02-05 Thread Aljosa Mohorovic
please post your opinions on using 0.96 or trunk version in production environment. which would you choose and why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: apache/mod_python config theory

2008-02-25 Thread Aljosa Mohorovic
this post is oriented towards high load sites, my question is not can i configure it this way but what performance issues can i expect. i'm actually asking will this kind of configuration work under high load and what would you recommend. --~--~-~--~~~---~--~~ You

apache/mod_python config theory

2008-02-25 Thread Aljosa Mohorovic
django is not in system/pythonpath but is in '/var/sites/test' path which i define in PythonPath when i configure site/django project. is it possible not to have django in system wide path but to define in apache conf via PythonPath where to find django? apache conf below is example of a way

Re: access model/instance from custom field/widget

2011-10-04 Thread Aljosa Mohorovic
the is the only way i was able to access data in field/widget, any comments? class MyForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(MyForm, self).__init__(*args, **kwargs) self.fields['my_field'].instance_data = {'instance': self.instance}

django-mptt compared w/ django-treebeard

2012-02-01 Thread Aljosa Mohorovic
when using django-mptt or django-treebeard did anybody have bad experience? i've used treebeard before w/o problems but it looks like mptt is maintained and has newer releases and treebeard last release was in 2010. can anybody comment on possible future development/maintenance for these

Re: how do forms select language to render?

2010-09-06 Thread Aljosa Mohorovic
anybody here knows how forms select language for label localization? Aljosa -- 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

form/formset for all model items in admin app?

2010-06-13 Thread Aljosa Mohorovic
if i have MyModel with 2 fields (field_1 CharField, field_2 IntegerField) is it possible to tell admin app to display all items in a single edit form? instead of having to edit each item i would like to do it in a single form/view. maybe some combination with formsets? Aljosa Mohorovic -- You

sessions across subdomains - required settings?

2010-06-17 Thread Aljosa Mohorovic
in all settings or it doesn't matter? just to be clear, all 3 wsgi apps are basically the same project and they access the same database. Aljosa Mohorovic -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Admin Javascript

2010-02-16 Thread Aljosa Mohorovic
://code.google.com/p/django-tinymce/ If you did, could you share your reasons why you're not using it? Aljosa Mohorovic -- 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...@googlegro

allowing other chars in User.username

2010-02-22 Thread Aljosa Mohorovic
what are security concerns if username is allowed to contain chars like ".,;-() " and non-ascii alphabet letters? will orm still properly escape string before querying the database? Aljosa -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: allowing other chars in User.username

2010-02-22 Thread Aljosa Mohorovic
On Feb 22, 1:58 pm, Dougal Matthews wrote: > I'm not sure what your reason if for using such characters? enabling non-english names to be used (with chars like čćžđš), separating first and last name with other chars (like "first.last_name" or "first-last_name" or "first

reverse in settings.py, is it possible?

2010-03-03 Thread Aljosa Mohorovic
i would like to set LOGIN_URL = reverse('custom_url_name') so i'm wondering if something like that is possible? i've tried with reverse but it fails. any ideas? Aljosa Mohorovic -- You received this message because you are subscribed to the Google Groups "Django users" grou

howto modify formfield_overrides on startup?

2010-03-07 Thread Aljosa Mohorovic
'] = CustomWidget --- although this is working, it's not working as i expected. CustomWidget is applied to all modeladmin.formfield_overrides and not just for . also, i'm using admin.site._registry which is private, is there some other way to do this? Aljosa Mohorovic -- You received this message

v1.2 roadmap - translation string freeze?

2010-03-07 Thread Aljosa Mohorovic
according to http://code.djangoproject.com/wiki/Version1.2Roadmap RC1 marks translation string freeze, any updates on roadmap? Aljosa -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

is there i18n formats.py test page?

2010-03-21 Thread Aljosa Mohorovic
is there some way to view results of i18n formats.py after modification for some language? maybe a single page with everything in formats.py or a management command? Aljosa Mohorovic -- You received this message because you are subscribed to the Google Groups "Django users" grou

model referencing itself

2007-01-04 Thread Aljosa Mohorovic
i'm trying to create a model which referencing itself and for this code i get this error: "name 'Chapter' is not defined" how do i do this or something similar? code: from django.db import models class Chapter(models.Model): name = models.CharField(maxlength=200) content =

appname in admin

2007-01-05 Thread Aljosa Mohorovic
i can't find info on how to change appname in admin interface. example: if i have "my_cool_app" app in project and it has admin interface enabled it will display something like "My_cool_app" in administration, can i make it display "My cool app description"? Aljosa

newforms status

2007-03-13 Thread Aljosa Mohorovic
what's the status of newforms? are they relatively stable (api) and is there a plan for writing Chapter 7: Form processing of djangobook ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

migration from php and java

2006-10-03 Thread Aljosa Mohorovic
and MessageDigest in java. this is my guess for password field format, please correct: password_field = "sha1$(output of php/java sha1 function)" any notes on this subject or anything related would be appreciated. thanks Aljosa Mohorovic --~--~-~--~~~---~--