> Do you mean they are inserted into the source as "oacute;" and so
> the user sees, literally, ""?
>
Yes. The string has the html code for the accent as you show above.
> This could be a bug. Any strings provided by Django itself (and this
> includes translated strings, although we don't make
I'm trying to pass a translated string to a select box using a Forms
Select widget and it always presents the output string with all the
accent HTML entity codes.
In my models file, I have a range of subjects:
Models.py
from django.utils import translation
from django.utils.translation import
> > # Admin:
> > ('^hiveadmin/(.*)', admin.site.root),
>
> That's no longer the right way to hook the admin into your URL conf.
> See here:
>
> http://docs.djangoproject.com/en/dev//ref/contrib/admin/#hooking-admi...
>
> -RD
Hi Rajesh,
I've been through the documentation you suggested
I'm having some problems with the New Forms Admin that are giving me
the error message " You don't have permission to edit anything." when
I log into the Admin. I also lose the admin-media so that the page
displays on a plain white background.
I'm using the latest django release from the trunk
Thanks Arien. It's a subtle difference but clearly I'd read and not
understood. Duh! Looks obvious now.
Much appreciated.Tim
>
> You want to use "count" instead of "with" in the blocktrans tag:
>
> >>> from django.template import Context, Template
> >>> t = Template("""
> ... {% load i18n
Can anyone explain the strange behaviour I'm seeing in this
translation tag. I've translated the whole site and used the {% plural
%} tag notation as defined in the documentation, however, I'm getting
this error and I can't determine quite what I've done wrong. I'm sure
it's me, not a bug, but
Thanks Karen, that was just the ticket.
On Jan 29, 10:52 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Thu, Jan 29, 2009 at 5:49 PM, Tipan <t...@ortengo.co.uk> wrote:
> > I'll go ahead as planned on the Django update and see if this delivers
> > any improve
>
> Without specifics, it's a little difficult to say for certain, but one
> of the reasons for the switch to newforms and newforms-admin was to
> eliminate some very expensive querying behavior in the manipulators
> behind forms. This wasn't a matter of one big query that was expensive
> - but
We're running several Django sites on 3 dedicated servers with (1 app,
1 media and 1 data). The sites generally run pretty quickly for users.
We are using db caching (we'll be moving to mem_cached in due course)
on most views other than those showing specific user data. The site
has about 90,000
>
> That's strange, are you succesfully using another component of Django
> i18n infrastructure in the same application?. De you have USE_I18N set to
> True in the settings file you are using?
>
Yes. The use_i18n is set to true and I've successfully translated most
of my pages, created the .po
Hi Ramiro,
I'm using the latest development version of Django. Apache web server.
MySqL/Mod_python, all served from same apache on my laptop.
I get a 404 error when I put http:///jsi18n/ into the browser
URL.
Rgds, Tim
--~--~-~--~~~---~--~~
You received this
I'm having a problem accessing Javascript Translation catalog whilst
converting my site to multi-language. As suggested in the docs, I have
added the following to my applications top level urls file.
js_info_dict = {
'packages': ( 'myapp.myproject',),
}
(r'^jsi18n/$',
Hi Malcolm,
I've been back through as you suggested and can trace the problem to
revision 7477 which is merging of the Queryset refactor branch into
the trunk. Version 7476 works fine with our application.
I'll have a play with my view code to see if I can see exactly what is
causing the
Whilst setting up a new machine for development I took down the latest
development version of Django (7825). I am now experiencing a Pickle
error when running my existing application which has been working fine
on our production servers for a few months. The error occurs when
using the Cache.set
On Sep 5, 9:28 pm, wolfds <[EMAIL PROTECTED]> wrote:
> Can we see the model definition for Reward?
Just got back to this and realised I was being a dummy. Whilst I had
changed all the def's to unicode, I'd still left some str() functions
on the return. Changed these to smart_unicode() and the
I've recently updated our Django source to the latest version which
meant implementing the Unicode handling. In the main all went well,
although I'm getting a few decode errors such as:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
28: ordinal not in range(128)
I have
I have a series of on-line questionnaires, each has a separate Form
class defined because the question types and data types for the
responses are always different.
I'd like to be able to set the form that is used in the view based on
an ID parameter passed to the view. However, whatever I try, I
I'm sure this is easily answered, but so far the solution has evaded
me.
I have a table in my model definition eg:
class Transaction(models.Model):
user=models.ForeignKey(UserProfile,edit_inline=models.TABULAR,num_extra_on_change=0)
On Jun 14, 10:50 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> See django/db/models/loading.py, in the register_models() function.
>
> I'm not 100% certain that will be the right fix, but from reading the
> ticket and the model dispatching code, it looked like the right idea.
> Not a
I've recently made some modifications to my views/urls and settings
files to improve portability of the application. This took out some
explicit references to the application files.
For example, the line:
from test.promotions.models import * was reduced to:
from promotions.models import *
Now
> These just override the previous values in each case. They don't append
> to them or anything like that.
>
> PythonPath "['/usr/test/promotions/', '/usr/test/'] + sys.path"
>
> or something similar is more likely what you want.
>
> Regards,
> Malcolm
Thanks Malcolm. That did the
> It sounds like you just need to tweak your Python path so that things
> inside the prod/ or test/ directory (in the appropriate case) are on the
> Python path. Something like
>
> PythonPath "['/usr/prod/'] + sys.path"
>
> is probably correct. Then "import promotions" will work if
>
Thanks James, that worked a treat.
I did have a go at the CSS method before, but clearly couldn't do it
at the lowest level. Moving up to the form tag did the trick.
Simple really.
Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I've a form containing a field with radio buttons that accept a Yes/No
response from the user, the field definition is:
disp_resp = forms.ChoiceField(choices=[(True,'Yes'),
(False,'No')],widget=forms.RadioSelect(), initial=False)
When rendered to the template, it produces a bullet point
I've encountered a problem whereby my searches in the database are not
distinguishing between upper and lower case.
Having read in other posts about MySQL being case insensitive by
default, I have tried using the __exact method to force exact
matching, however, this still finds the alternative
Having implemented this solution, I'm now getting problems with
comparison differences between the hash that I pass in the form as a
hidden field and the hash of the data taken from the Form view.
If I look at the data before and after, it appears that the data from
the form object is using
Simon, thanks for this post, it is beautifuly succint and
comprehensive and is exactly what I was after. It has also enabled me
to clean up my code, if I pickle all the date, I don't need to create
a dynamic field form object, 2 fields are all that are required (as
SmileyChris pointed out). A
On Apr 13, 6:15 pm, "Ian Clelland" <[EMAIL PROTECTED]> wrote:
> On 4/13/07,Tipan<[EMAIL PROTECTED]> wrote:
>
> it would seem to me that the "/" in "/>", which closes out the tag,
> could be interpreted by the browser as part of the value
Thanks Guys,
I've read through all the links and I can see plenty of scope with
Ajax/JSON.
I note that most of the solutions use a Javascript toolkit such as
Prototype/Dojo/Yahoo/JQuery. Two questions come to mind:
1. Does using the toolkit save a lot of work - what are the main
advantages?
2.
Thanks xav, I thought that the answer might involve both caching and
Ajax but I wasn't sure how. I'm not familiar with either so I'll need
to go through the documentation. Do you know where I can find some
good examples of using these?
Tim
--~--~-~--~~~---~--~~
I've encountered a strange occurence whereby I am seeing a trailing
slash added to an item of form data.
I am passing a parameter from a template to an inclusion tag {%
show_tag %}. This value is then returned from the inclusion
tag defintion in a dictionary (return {'form':form, 'value':id})
I've created a view that is made up of several elements such as main
content, sidebar information navigation bar. The main content is
derived from specific data dependent on the parameter passed to the
view. .../page/3 etc.
The view is rendered as a series of template extensions from a master
canen,
Thanks, that's just what I was looking for.
Rereading the documentation also enabled me to pick up some other
useful stuff.
Much appreciated.
Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I need to capture the url from the previous view to use after
processing the new view - I expect there's a simple way of doing this,
but I'm not sure of the best approach. I'm thinking about writing to a
session cookie or stack when arriving at a view and then recall it
when I get to the new
I want to incorporate a user login form on virtually all of my sites
main pages. I felt that the best way to do this was to use an
inclusion template tag to display the form on each of the relevant
pages.
I have a base.html template which is extended using several sub
templates. The template tag
>
> >> number_of_meds = kwargs.pop('number_of_meds', 4)
>
> This is how I optionally passed the number of
> fields I wanted to display in the form. If there's
> no 'number_of_meds' in kwargs, a minimum of 4 fields
> are displayed. The trick is to use kwargs.pop() before
> super is called, or
> I've posted a code snippet that I think addresses your
> issue:http://www.djangosnippets.org/snippets/82/
>
Jeff, this was very helpful and I've moved on a bit, I can make your
form do exactly what it's supposed to. Howver I'm still struggling to
pass my information to the Form class.
I note
I wonder if anyone can give me some pointers. I've been working with
new forms with reasonable results, but I've come across a problem when
creating a form with dynamic fields and rendering to an HTML template.
I want to create a form using data from a queryset which extracts data
for a specific
Thanks for the posts - I've checked out the ticket, the patch from
which I assume is required to action the calls:
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
in Clint's script.
In your script, if I assume I pass my HTML to the function as the
Thanks for this post it really helped and I've got it working nicely
now.
Like Honza, I wondered why you copied the post data- but I'm not sure
I understood your explanation. Does it give you more flexibility to
work with a copy?
Rgds, Tim
I've been able to create Plain text emails to send to users with an
authentication link which work well, however I'd like to improve the
look of these by outputting in HTML with a logo. If I use the
send_mail function it simply incorporates the HTML in the plain text.
Can anyone point me in the
I've been able to create Plain text emails to send to users with an
authentication link which work well, however I'd like to improve the
look of these by outputting in HTML with a logo. If I use the
send_mail function it simply incorporates the HTML in the plain text.
Can anyone point me in the
I'm new to Django and a relatively inexperienced programmer. I've
started working with the new forms and have been able to take user
input, validate it and write it to the table. Really slick and with
minimal code. Great.
I now want to take an existing user record and create an edit account
Hi Christian,
I think you are right, I was using a PHP IDE as my editor and when I
reverted to Notepad, it showed a different layout. I modified it and it
worked fine. Really frustrating and such a waste of time.
Is there a popular IDE that makes editing quick and easy?
Tim
I have a problem that is causing me some grief and I can't seem to
found a reason for it. I'm relatively new to Django and Python so it is
likely to be something simple.
I have a function that displays a form and some data from a table. If
the form data is correct, it generates some new lines of
Thanks all - that makes a lot more sense now. It was definately a case
of me looking for too simple a solution in the first place.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
On Dec 13, 1:58 pm, "Waylan Limberg" <[EMAIL PROTECTED]> wrote:
> On 12/13/06, Tipan <[EMAIL PROTECTED]> wrote:
>
> http://192.168.1.9:3000/gobites.jpg;>
>
> Generally speaking I believe the conventional way to do this when both
> servers are on one ma
I need some advice on configuring a separate media server for our jpeg
images.
We are running Django on Apache 2.2 with mod_python 3.2.10 (python2.5)
on a Windows 2003 server.
As recommended in the docs, I am setting up a separate web server to
serve the media. I've installed Lighttpd 1.4.13
Thanks for the advice. Adding the line:
PythonPath "['d:/program files/xampp/htdocs'] + sys.path"
to my httpd.conf overcame the issue with loading myproject module.
Simple when you know how.
Thanks again, Tim
--~--~-~--~~~---~--~~
You received this
I've seen various posts with similar problems, but not managed to find
consistent advice on trouble shooting this issue.
I've got an installation of xampp Apache 2.2 and mod_python 3.2.10 and
Python 2.5. Running on Windows 2003 server.
I have mod_python working fine in apache - I can view the
I'm a newbie to the Django/Python environment and have been working
through the tutorials on the project site using the lite server - works
fine. I now want to run the same projects on an Apache server using
mod_python on a Windows PC.
I've followed the installation instructions and have
51 matches
Mail list logo