Well, I thought it didn't escape the input string. I was wrong. I
tried `escape_js` again and now it works just fine. It probably did
before, but I don't remember why I thought it didn't.
Regards,
Sander
On 28 jan, 04:28, Malcolm Tredinnick wrote:
> On Tue, 2009-01-27 at
k. Then I tried the
`escape` filter, that worked.
Cheers, Sander.
On 27 jan, 05:05, Malcolm Tredinnick wrote:
> On Mon, 2009-01-26 at 14:40 -0800, SanPy wrote:
> > For my website, I need to write this in one of my generated html's
> > (dynamically, of course):
>
> >
&
For my website, I need to write this in one of my generated html's
(dynamically, of course):
var prices=[[0, '\u20ac 0'],[100, '\u20ac 100'],[150, '\u20ac 150'],
[200, '\u20ac 200'],[250, '\u20ac 250'],[300, '\u20ac 300']];
BTW, \u20ac represents the € symbol.
Whatever I try, I can't write '\
Is it possible to allow a non-staff member access to a custom
AdminSite? When I try to login as a non-staff user, I get the error
message: "Please enter a correct username and password. Note that both
fields are case-sensitive."
Regards, Sander.
--~--~-~--~~~---~--~---
cess', 'message': _("Upload
succeeded.")}
return JsonResponse(json)
json = jsonify(form)
return JsonResponse(json)
On 21 jun, 10:32, SanPy <[EMAIL PROTECTED]> wrote:
> Here are some code samples. Functionality may change in the future:
>
&
cess', 'message': _("Upload
succeeded.")}
return JsonResponse(json)
json = jsonify(form)
return JsonResponse(json)
On 21 jun, 10:32, SanPy <[EMAIL PROTECTED]> wrote:
> Here are some code samples. Functionality may change in the future:
>
&
cess', 'message': _("Upload
succeeded.")}
return JsonResponse(json)
json = jsonify(form)
return JsonResponse(json)
On 21 jun, 10:32, SanPy <[EMAIL PROTECTED]> wrote:
> Here are some code samples. Functionality may change in the future:
>
&
st.POST,
request.FILES)
if form.is_valid():
form.save()
json = {'status': 'success', 'message': _("Upload
succeeded.")}
return JsonResponse(json)
form = PhotoUploadForm()
json = jsonify(form)
return JsonResponse(jso
Dirk,
File and image uploading for newforms, AFAIK, is not implemented in
0.96. There is a ticket for this (#3297). If you look in the django-
developers newsgroup and search for #3297, you will find more
information. It is possible to have it working with the latest trunk
from SVN and a patch fr
One addition:
On 31 mei, 21:35, SanPy <[EMAIL PROTECTED]> wrote:
> Try this:
> # in your view
> raw_image_data = form.cleaned_data['photo']['content']
> thumbnail_content = resize_image(raw_image_data)
> filename = form.cleaned_data['photo'][
Try this:
# in your view
raw_image_data = form.cleaned_data['photo']['content']
thumbnail_content = resize_image(raw_image_data)
filename = form.cleaned_data['photo']['filename']
upload_to_s3(filename, thumbnail_content)
def resize_image(buf, size=(100, 100)):
f = cStringIO.StringIO(buf)
I have some unit tests that are not directly app / model related. I
want to put those tests in a separate directory in my svn trunk (e.g.
myprojects/project1/trunk/project, myprojects/project1/trunk/tests).
How can I make these tests run through the django test runner (i.e.
when executing 'python
Count me in!
Ik ben wel geinteresseerd in een nederlandtalige Django Gebruikers
Groep.
Groet, Sander.
baasbartels schreef:
> To non-dutch speaking: this is not spam, it's just a message in dutch,
> for dutch django users about the possibility of forming a dutch Django
> user group. Having loca
Joseph Kocherhans wrote:
> > Does anyone know of a way to login a user without having to
> > authenticate first? Or authenticating with an encrypted password?
>
> The problem is probably that the user.backend attribute does not
> exist. As a hack, you could just set it.
>
> user.backend = 'dja
Chris Moffitt wrote:
> >
> I've was tripped up by this too. Can you try something like this:
>
> user = authenticate(username=data[*'user_name'*],
> password=data[*'password'*])
> login(request, user)
>
> This seems to work for me. If you want to see the full code, it's here -
> htt
I've been trying to implement the user registration process from
http://www.b-list.org/weblog/2006/09/02/django-tips-user-registration .
It's basically a registration process where the user has to be
activated by clicking on a link in an email. Everything went fine and
it worked. Then I wanted to
16 matches
Mail list logo