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
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
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
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
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
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.
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
st_delete_redirect": "/survey/editable/",
"template_object_name":"survey",
"login_required": True,
'extra_context': {'title': _('Delete survey')}
})
--->8---
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
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
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
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
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
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
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
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
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
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
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
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
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:
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 :
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
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
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
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
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
>
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,
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
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
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
"
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]>
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
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
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'
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
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
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
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
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.
=
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
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
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
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
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
--~--~-~-
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
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
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
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
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
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
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")
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
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
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
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
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
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
'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
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
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
--~--~-~--~~---
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
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
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
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
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
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
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
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
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
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
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):
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
73 matches
Mail list logo