Re: cherokee + uwsgi + django configuration

2010-01-03 Thread yml
Hello, I have done several post on my blogs about how to setup django projects using cherokee and uWSGI : http://yml-blog.blogspot.com/search/label/uWSGI The first 2 are the most interesting for you : * http://yml-blog.blogspot.com/2009/11/how-to-set-up-cherokee-and-uwsgi.html * http://yml

Re: Internationalization in django and search engine indexing

2009-06-22 Thread yml
This is the motivation for me to write this piece of middleware : http://yml-blog.blogspot.com/search/label/Internationalisation --yml On Jun 22, 5:52 pm, Olivier wrote: > Hello everyone, > > I'm currently using django localization on my site to manage both > english and

Re: i18n: How to the language on per-user basis

2008-07-18 Thread yml
Hello, Sometimes ago I try to solve a similar problem, it seems to me that the solution to your problem is to write a middleware. You will find an example there : http://yml-blog.blogspot.com/search/label/Django ---8< from django.utils.cache imp

Re: how to sort in django template

2008-06-18 Thread yml
Hello, I would see 2 approach to solve the problem you are describing : * Server side - Order the list of employees in your view before passing it to the template * Client side - use a JS to order a Javascript variable I hope this will help you. --yml On 18 juin, 09:53, laspal <[EM

Re: Django Admin Model View Page

2008-06-04 Thread yml
ally creates an admin interface by introspecting your models, Databrowse dynamically creates a rich, browsable Web site by introspecting your models. """ I hope that will help you. --yml On 4 juin, 11:52, Ali Sogukpinar <[EMAIL PROTECTED]> wrote: > Hi, > > I have an web

Re: newforms

2008-06-02 Thread yml
return HttpResponseRedirect('/url/on_success/') else: form = ContactForm() return render_to_response('contact.html', {'form': form}) """ Of course you will need to fill the blank with your own business logic. I hope that will help you.

Re: Django and i18n

2008-05-31 Thread yml
hello, I have been using this recipe for some times : http://yml-blog.blogspot.com/search/label/Internationalisation It seems to exactly answer your requirements. I hope that helps. --yml On May 30, 6:09 pm, Taevin <[EMAIL PROTECTED]> wrote: > I've been working with translation in

Re: generic delete_object issue on Firefox (redirect bug)

2008-04-29 Thread yml
st_delete_redirect": "/survey/editable/", "template_object_name":"survey", "login_required": True, 'extra_context': {'title': _('Delete survey')} }) --->8---

generic delete_object issue on Firefox (redirect bug)

2008-04-28 Thread yml
True, 'extra_context': {'title': _('Delete survey')} }, name='survey-delete'), --->8--- It would be nice if someone could help me with a workaround or a solution. Should I report issues i

Re: Can I make it so that I get an error if a template accesses something that does not exist?

2008-04-18 Thread yml
hello, Here it is what you are looking for : """ If you use a variable that doesn’t exist, the template system will insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is set to '' (the empty string) by default """ It is extracted from the d

Re: Can I print out the context from within a template?

2008-04-18 Thread yml
Hello, Here it is an extract form the documentation : """ If you use a variable that doesn’t exist, the template system will insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is set to '' (the empty string) by default """ It looks like it do

Re: More Advanced Forms Help

2008-04-07 Thread yml
Hello, Your particular situation look to me very similar to the Poll, Choice sample presented on this blog : http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/ I hope this will help you. --yml On Apr 6, 2:29 am, "Chris Hartjes" <[EMAIL PROT

Re: Fixture? Testing? how do you do it?

2008-04-03 Thread yml
As far as I can remember the file containing the tests should be called : "tests.py" --yml On Apr 2, 9:01 pm, Tony <[EMAIL PROTECTED]> wrote: > Ah, that makes it alot clearer. > > I've had a go at it but I can't seem to get it to run my test.py file. > An

django-survey Extracted from PyCon

2008-04-01 Thread yml
e : """ Select a valid choice. That choice is not one of the available choices. """ I hope that one of the core developers of "django-survey" is reading this list. Please do not hesitate to let me know if there is a more appropriate channel to discuss about

django-survey Extracted from PyCon

2008-04-01 Thread yml
e : """ Select a valid choice. That choice is not one of the available choices. """ I hope that one of the core developers of "django-survey" is reading this list. Please do not hesitate to let me know if there is a more appropriate channel to discuss about

Re: How to return Admin to previous filters after save?

2008-02-14 Thread yml
Not a solution but a workaround. I had exactly the same problem as a user, I solved it by bookmarking the right url. --yml On 14 fév, 03:50, cyberjack <[EMAIL PROTECTED]> wrote: > I have an admin interface managing a few thousand records. Finding a > record requires heavy use

Re: What are the advantages of using Django for building things like blogs and CMS?

2008-02-14 Thread yml
Hello, I would also add this list of resources: - http://www.djangosites.org/with-source/ Chance are good that someone has already solved your problem. --yml On 14 fév, 01:58, Doug B <[EMAIL PROTECTED]> wrote: > > Basically I'm looking for some users to placate my fear that

Re: Replicating admin behavior in front end

2008-01-04 Thread yml
Hello, If I am understanding your requirement correctly you are looking for databrowse. Here it is what the documentation says about it: """ Databrowse is a Django application that lets you browse your data. As the Django admin dynamically creates an admin interface by introspecting your models

Re: i18n/setlang no longer support GET

2007-12-20 Thread yml
Hello, I wrote an my blog about the solution I have chosen perform what is describes. To put it in a nutshell I am using a middleware to direct the user to the language requested in the URL. I am not sure this follow any "Best Practice": http://yml-blog.blogspot.com/2007

Re: get_absolute_url not working as expected

2007-12-16 Thread yml
Hello, This exact situation happens to me sometimes ago and the root cause is that either you have an error in your urls.py or you are using the decorator "user_passes_test". In order to solve the first one you should comments all the lines in urls.py and uncomment line after line. This is the the

Re: URLconf: Invalid syntax when using naming URL patterns

2007-12-13 Thread yml
Hello, I don't know what line is 13 but it seems to me that for the second urlpatterns should be: """ urlpatterns += patterns( """ Let me know if this help. On 13 déc, 15:58, sector119 <[EMAIL PROTECTED]> wrote: > Hi all! > > When I try to use Naming URL patterns I get error: > Exception Type:

Re: Model advice, i18n and content

2007-12-12 Thread yml
Hello Remco, A subset of what you are looking for is provided by this library: * http://code.google.com/p/django-multilingual/ I found it very easy to work with hand I was able to modify flatpage (since this was what I was looking) in a very small amount of time. What it will bring to you :

Re: Strange FastCGI problems

2007-12-06 Thread yml
TP are you using @user_passes_test decorator with urlresolvers (url, reverse ...). I had a problem similar to what you are describing and I finally find out that this problem was infact related to the bug described there: http://code.djangoproject.com/ticket/5925 I hope that help On Dec 6, 3:31

Re: Nested Inlines, dynamic forms, templates and all sorts of problems.

2007-10-09 Thread yml
uot; based solution. And just for the record the newform solution was working fine but was more complex to maintain/debug. Regards, --yml On 9 oct, 18:11, "Felix Ingram" <[EMAIL PROTECTED]> wrote: > Hello all, > > I've been making great strides with my application s

Re: Strange error, trying to deploy Django with mod_wsgi

2007-09-25 Thread yml
Hello Steve, Sometimes ago when I first try to use mod_wsgi I have written a wiki page there: * http://code.djangoproject.com/wiki/django_apache_and_mod_wsgi It is a step by step procedure that I have followed to configure mod_wsgi. It might help you to get your application up and running with

Re: Multilingual site best practices

2007-08-11 Thread yml
Hello, I have read something today about multi lingual database. There is a project hosted there: http://code.google.com/p/django-utils/wiki/TranslationService that seems to do what you are looking for. I have never used it myself. I hope that will help you On Aug 10, 9:52 pm, Francis <[EMAIL P

Re: Can a ManyToManyField only shows certain records in an admin using edit_inline?

2007-08-02 Thread yml
Greg, I am waiting for the answer to this question because I have something similar in my to do list. On Aug 2, 1:52 am, Greg <[EMAIL PROTECTED]> wrote: > Anybody? > > On Aug 1, 2:49 pm, Greg <[EMAIL PROTECTED]> wrote: > > > Ok..does anybody know what's wrong with this attempt at trying to get >

Re: Trouble with installing stockphoto

2007-08-02 Thread yml
Hello, It looks like your "base.html" is in a folder which is not defined in the "TEMPLATE_DIRS". In order to fix your problem you should add this directory to this tuple. I hope that help On Aug 2, 5:38 am, Danno <[EMAIL PROTECTED]> wrote: > So I was able to import everything it looks like ok,

Re: What should I do to make admin display more fields in User model?

2007-07-30 Thread yml
This might help you: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model On Jul 30, 11:56 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 7/30/07, Daniel Kvasnicka jr. <[EMAIL PROTECTED]> wrote: > > > Hey, nobody has ever needed this? Any thoughts? > > You might want to s

Re: complex form => Newforms vs template

2007-07-28 Thread yml
Thank you doug for your feedbacks. I am happy to see that I am not the first one facing this dilemma. I try to go the {{form.fieldname}} way but my issue with this approach was that since my forms was dynamically built it was difficult for me to find a a generic way to write my template to express

complex form => Newforms vs template

2007-07-27 Thread yml
e template? I hope that this post is not too long, and that the answer of these 2 questions is not in the documentation. Thank you for your feedbacks yml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: static css problems on windows box

2007-07-27 Thread yml
Hello, just for the sake pay attention to the difference between "\" and "/". If I remember well ONLY "/" will work. yml On Jul 27, 10:59 am, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > On Jul 27, 6:31 pm, Graham Dumpleton <[EMAIL PROTECTED]>

Re: django-admin.py validate

2007-07-27 Thread yml
Hello, This is the webpage you are looking for: http://www.djangoproject.com/documentation/settings/ you should read the section called : "The django-admin.py utility" and according to the os you are running you should set this variable. I hope that help On Jul 27, 3:11 pm, arf_cri <[EMAIL PRO

Re: Instant Django

2007-07-24 Thread yml
This is half solving the problem. with your fix in the start.bat now when i launch python it start python on the memory stick but for some reasons dajngo-admin.exe call python installed on my computer not the one in your package. However this is working fine "E:\instant_django\django>python Utili

Re: Instant Django

2007-07-24 Thread yml
e to fix this error? Thank you very much for your effort of making django moveable. Regards, yml On Jul 23, 11:30 pm, cjl <[EMAIL PROTECTED]> wrote: > Nathan: Thank you for the suggestion, I'm sure you're right. I'll add > in a start-up message to 'start.bat'

Re: context processor question

2007-07-19 Thread yml
Hello, Here it is the part of the documentation you are looking for: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext This is an extract of the part that you are looking: If you're using Django's render_to_response() shortcut to populate a templa

Improve the dynamic generation of a form with newforms library

2007-07-16 Thread yml
Hello Djangonauts, After spending sometimes to learn using the test/fail/correct cycle I have finally reach a point where I have something that more or less do what I want. However since one of the objectives of the project I am working on was to improve my knowledge on django I would like to rea

Re: Using newforms to create multiple related objects?

2007-07-04 Thread yml
Hello, It would be great if one of the Gurus could spend some time to answer this kind of questions. I am trying to do something similar. But so far I haven't been able to achieve this. I am looking for a way to build dynamically a form representing a mashup of several models and its associated v

need help to define models.py for a survey app?

2007-06-25 Thread yml
Hello Djangonauts, I am creating a new application to support the creation of online poll (survey). The goals for this application is to support both: -a> The creation of the survey performed by the technical writers -b> Store the answers given by the interviewees The first aspect is simil

newform and edit in line

2007-05-19 Thread yml
Hello, I am trying to create a form equivalent to the edit inline that is implemented in the admin interface. I have a models with "Survey", "Poll", "Choice" as describe below and I would like to have a single page to create my Survey with multiple questions (*n) and multiple (*n) choices. =

Re: Shopping cart application for django

2007-05-16 Thread yml
Hello, It seems that you are looking for this: http://satchmo.python-hosting.com/ There is also a google group for that project. I hope that will help you. Regards, On May 16, 1:16 pm, "Nathan Harmston" <[EMAIL PROTECTED]> wrote: > Hi, > > I m currently building an e-commerce site and I was won

Re: Many to Many Ordered List

2006-06-19 Thread yml
Here it is a link that details the solution a bit more: - http://www.djangoproject.com/documentation/models/m2m_intermediary/ Yann --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Many to Many Ordered List

2006-06-19 Thread yml
I would handle this kind of situation by adding an intermediate class AttributeOfTheLink. I don't know if this is a good practice but I think it will do the tricks. Let me know if you find something better. Yann --~--~-~--~~~---~--~~ You received this message b

Re: Form from multiple models

2006-06-19 Thread yml
Hello, You will find below 2 very interesting links of that I am using each time I need to create a form for a Django's model: # Simple 'scaffolding': Spew out simple form fields as a base for modification - http://code.djangoproject.com/wiki/ScaffoldScript # Simple Custom Manipulators: Spews

Re: calendar for blog app?

2006-06-11 Thread yml
Hello, Have you already looked at the date_based archive: - 'django.views.generic.date_based.archive_month' You can find the documentation there: http://www.djangoproject.com/documentation/generic_views/#django-views-generic-date-based-archive-month I hope that will help you --~--~-~-

Re: Custom manipulator - multiple records

2006-05-01 Thread yml
Hi winston, I a couple of weeks ago I was thinking about using this method to solve one of the pb I was facing. I don't see anything there that should not work, also I have never done such thing. Could you please let us know what is exactly your problem? If there is one, :-), could you also post

Re: unexpected keyword argument with generic view

2006-04-20 Thread yml
Luke, Not sure where exactly is the error but by reading the code above there is something strange in the view "edit_blog". the line : b = blogs.get_object(pk=request.user.id) seems a bit strange to me. I do not understand why the primary key of is "request.user.id". Don't you this would be bette

Re: unexpected keyword argument with generic view

2006-04-18 Thread yml
Hi Luke, Could you please the url.py from were you are calling the generic view? That could help us to pin point the pb. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: UNICODE database API How to

2006-04-18 Thread yml
Thank you Ivan, Happy to see that in any case my pb would have been solved today. ;-) --~--~-~--~~~---~--~~ 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@googlegro

Re: UNICODE database API How to

2006-04-18 Thread yml
Here it is the script that is working for me. This was done thanks to this great pages (http://effbot.org/zone/unicode-objects.htm) it took me 3 days to find it on internet. Thank you google and of course thank you to the author :-) # -*- coding: utf8 -*- import os,codecs from django.models.ann

Re: UNICODE database API How to

2006-04-18 Thread yml
Hello Thank you for your help but so far I do not have any success. I am reading form a the lines from a file. Here it is the kind of error I am getting : the current line is :07 ArdFche matches ('07', 'Ard\xe8che\r\n') Traceback (most recent call last): File "E:\instal\django\view_serviceala

Re: UNICODE database API How to

2006-04-17 Thread yml
Ivan hi, I try your recommandation but unfortunatly it is not working I am getting the following error message: In [38]: r=Department(department=matches[1].encode('utf-8'), department_number=matches[0].encode('utf-8'), country="France")

UNICODE database API How to

2006-04-17 Thread yml
Hello Djangonauts, I am tryng to import non ascii data stored in a file to do so I am using a regular expression to parse the lines of the files in order separates the "department number" from the department names. This is working fine my problem comes when I am trying to use the Django's DB API

Re: manipulator.save() and manytomany relationship

2006-03-30 Thread yml
Thank you you are amazing here it the solution = if new_data['localisation']: print "new_data contains : " +str(new_data) loc=new_data.getlist('localisation') print 'loc : '+str(loc) print "new_data['localisation'] co

Re: manipulator.save() and manytomany relationship

2006-03-30 Thread yml
This is an amazing tip. I didn't know that I could print messages in the runserver console. I was missing that a lot. this is eaxcltly were the problem is for some unknown reason the information is correct in new_data but when I am retrieving new_data['localisation'] I got only the last piece of t

Re: manipulator.save() and manytomany relationship

2006-03-30 Thread yml
Your suggestion give the same result: temp.set_localisation(map(int,new_data['localisation'])) Only the last selected localisation is saved. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: manipulator.save() and manytomany relationship

2006-03-30 Thread yml
I have added an additional temp.save. First I create the Profile with the mandatory attributes then I add the optional ones if they exist. This seems to work, I mean I do not get an error message when clicking on submit. My problem is now that even if I multi select localisation I only save the la

Re: manipulator.save() and manytomany relationship

2006-03-29 Thread yml
I don't set any value for the profile_id. This attribute where added by django, I guess in order to have a "primary key". If I comment the line with set_localisation (which is my many to many relation) I do not get this error so I do not see why I should care about this with this additional attrib

Re: manipulator.save() and manytomany relationship

2006-03-29 Thread yml
'sessionid': '5736d4edabff367ea3267c90ed4207fe'}, META:{'ALLUSERSPROFILE': 'C:\\Documents and Settings\\All Users', 'APPDATA': 'C:\\Documents and Settings\\yml\\Application Data', 'APR_ICONV_PATH': 'C:\\Program Files\\Subvers

manipulator.save() and manytomany relationship

2006-03-29 Thread yml
Hello djangonauts, I wrote my first manipulator and there is still some part that I am not understanding. I have the feeling that I am missing something obvious in the save function of my manipulator but I am unable to improve it. I would be glad if someone could explain me how to set_localisati

Re: ANN:Woodlog Testing

2006-03-29 Thread yml
hello limodou, I was think to start developing something similar to add it to a portal I am working on. Of course I would have done it with a less talent than you. :-) Are you going to open source it that I could learn from your source and use it Good job --~--~-~--~~---

Re: customised generic view

2006-03-28 Thread yml
Thank you Michael, This make sense now to me, I was expecting to much from it. --~--~-~--~~~---~--~~ 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.co

Re: customised generic view

2006-03-28 Thread yml
Eureka! Thank you all for your help and support. After 2 days of test and fails. here it is the solution: Here it is the save function which is solving my issue: def save(self, new_data): temp = Profile( user=users.get_object(pk=new_data['user']), pseudo=n

Re: customised generic view

2006-03-27 Thread yml
Limodou, This is what I did and the result is that it hapens in the: manipulator.save() So I am going to the same thing in this function in order to see which satement is causing trouble. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: customised generic view

2006-03-27 Thread yml
Limodou, This is what I did and the result is that it hapens in the: manipulator.save() So I am going to the same thing in this function in order to see which satement is causing trouble. --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: customised generic view

2006-03-27 Thread yml
Hello Limodou, ok I read the soucre of the formfield in order to fix the radio_admin buton I replace the SelectField by a RadioSelectField the form is now properly displayed with radio button. I agree with you that the error message seems to direct us to a pb of template but there the line which

Re: customised generic view

2006-03-27 Thread yml
Hello, As discussed above I spend mos of my evening learning about manipulator. I was pretty happy since it seems much more difficult than it is. This is what I thaught when I did the couple of examples I found on the web. So what I did is generate the custom manipulator using the script that I

Re: limit_choices_to

2006-03-27 Thread yml
Hello tonemcd, Thank you for the link it look interesting. However I am not understanding where I should add those lines: # cciw/middleware/threadlocals.py import threading _thread_locals = threading.local() def get_current_user(): try: return _thread_locals.user except Attribut

Re: customised generic view

2006-03-27 Thread yml
Hello Limodou, Thank you this is what I start to understand. The pb is that so far I have never try that and it looks pretty difficult. This impression might be becous I have never done it. This is time to learn... :-) So I will try to implement my first manipulator this evening. My objective is

Re: customised generic view

2006-03-27 Thread yml
Hi, I understand your point but for some reason in that case I need a one to many relationship. cu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: customised generic view

2006-03-27 Thread yml
Hello Michael, This look very interesting so what I will do is to install magic removal branch this evening and try your recipe. I have a couple of question before doing that, I want to make sure that I have a good understanding of what I should do. Could you confirm that "Person" in your code

limit_choices_to

2006-03-26 Thread yml
Hello, Is there someone kind enought to provide me some guidance on the usage of "limit_choices_to" in a foreign key? my model look like this: class Profile(meta.Model): user =meta.ForeignKey(User) pseudo = meta.CharField(maxlength=30,core=True) [...] def __repr__(self):

customised generic view

2006-03-26 Thread yml
Hello, what I am trying to do since this morning is to allow my logged in user to create Members. As you will see below Member is related to the User class by a foreignkey. so far I create User, Member using generic view. What I would like to do is to remove the user field from the form: "members