Re: Newbie question

2007-01-13 Thread Honza Král
just a thought: do you have DEBUG turned off in your settings? if not, django will store all qeuries it made in memory so that it is accessible for debugging purposes... On 1/13/07, Rob J Goedman <[EMAIL PROTECTED]> wrote: Hi, We converted an access system written in VB to a Django app. The pu

Newbie question

2007-01-13 Thread Rob J Goedman
Hi, We converted an access system written in VB to a Django app. The pure db side and GUI work great. Data is also obtained from control panels that have fingerprint readers attached. So I wrote a separate python program to 'scan' these control panels (embedded linux based) and store it i

Re: newbie question about using javascript to handle vars in template..

2006-11-12 Thread Igor Guerrero Fonseca
I think that you need to do some: render_to_response to that *.js file Because Django is not replacing the *.js Django is replacing the *.html file > in my template file, there's a var which i can use {{var1}} to get its > value. and if i put the code > > > document.write({{var1}}); > > > DI

newbie question about using javascript to handle vars in template..

2006-11-12 Thread pength
in my template file, there's a var which i can use {{var1}} to get its value. and if i put the code document.write({{var1}}); DIRECTLY in my template file, it's OK, the var1's value appears in my .html file. but if I use in template file, and then in my.js, write document.write({{var1}});

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Derek Hoy
On 8/25/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > In that situation, I guess you just wouldn't ship the order if the > customer underpays (by tweaking the payment amount), right? Unless it was you :) -- Derek --~--~-~--~~~---~--~~ You received this message

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Jeremy Dunck
On 8/24/06, Derek Hoy <[EMAIL PROTECTED]> wrote: > I'm using Worldpay, and doing: > - view/form to get choices and validate à la Django > - redirect to simple confirm form > - submit to Worldpay with POST data in hidden fields > - get callback, and do validation > - notify administration, save ord

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Derek Hoy
On 8/24/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I thought about trying to post all the data to a form in the view page, > > then automatically submit the form using JavaScript, but it seems like > > such a cludgy solution. >

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread Jeremy Dunck
On 8/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I thought about trying to post all the data to a form in the view page, > then automatically submit the form using JavaScript, but it seems like > such a cludgy solution. It's also insecure because you'd be giving the client the ability

Re: Post to PayPal with urlllib [newbie question]

2006-08-24 Thread [EMAIL PROTECTED]
I thought about trying to post all the data to a form in the view page, then automatically submit the form using JavaScript, but it seems like such a cludgy solution. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Post to PayPal with urlllib [newbie question]

2006-08-23 Thread Derek Hoy
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ... I should be able to > capture and modify the post data, then urlencode the post values using > urllib, but I cannot figure out how to post the form data AND redirect > the page to the paypal URL in one shot. I'm just about to do the

Re: Post to PayPal with urlllib [newbie question]

2006-08-23 Thread Jeremy Dunck
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > So far, so good, but I'm not sure how to proceed. I should be able to > capture and modify the post data, then urlencode the post values using > urllib, but I cannot figure out how to post the form data AND redirect > the page to the paypa

Post to PayPal with urlllib [newbie question]

2006-08-23 Thread [EMAIL PROTECTED]
I've got a product page that submits to the PayPal shopping cart, and I have form controls on that page with values that need to modify the price. (discount codes) In my research, it appears that I need to post the page to a view, check the discount code, and then send the data via post to the Pa

Re: compare integers in template (newbie question)

2006-08-16 Thread Don Arbow
Oops, missed an 'endifequal' at the end of the comparison: {% for x in make_list object.get_rating_stars %} {% ifequal x '*' %} {% else %} {% endifequal %} {% endfor %} Don --~--~-~--~~~---~--~~ You

Re: compare integers in template (newbie question)

2006-08-16 Thread Don Arbow
On Aug 16, 2006, at 7:12 AM, [EMAIL PROTECTED] wrote: > > Waylan, > > This is a really nifty solution, but, again, it puts presentation > logic > into the views.py file, which is supposed to contain business logic. > I'd rather not do that... But nothing is ever so rigid as to require you do i

Re: compare integers in template (newbie question)

2006-08-16 Thread Adam Endicott
[EMAIL PROTECTED] wrote: > I'd really love to be able to do something like this: > {% if videoObject.rating > 0 %}*{% endif %} > {% if videoObject.rating > 1 %}*{% endif %} > {% if videoObject.rating > 2 %}*{% endif %} If this type of code is your goal, you could do something like: {% ifequal vi

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
Thanks, Alan! Widthratio is exactly what I'm looking for to solve this problem! I still wish for a custom "if" tag to solve non-charting problems in templates, and I guess I'll just have to write it and post it to the wiki. But for now, widthratio does exactly what I need, when I need it. Mae

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
I can do that, but it would couple presentation with my Video model, and I'd rather not. After all, I suspect that denying me the proper "if" tag was Django's political statement of "thou shalt not couple presentation with business logic, and we shall enforce it". It'd be a shame to couple tiers

Re: compare integers in template (newbie question)

2006-08-16 Thread [EMAIL PROTECTED]
Waylan, This is a really nifty solution, but, again, it puts presentation logic into the views.py file, which is supposed to contain business logic. I'd rather not do that... A custom template tag is possibly my solution, and yes, I'm surprised that no one else had done it yet, too. Mae --~--

Re: compare integers in template (newbie question)

2006-08-16 Thread Waylan Limberg
> > How about adding a method to your Video model? > > Video model: > def get_rating_stars(self): > return "***" # Implementation left as an exercise for the reader ;-) > This isn't much of an exercise, although it may not be immediately obvious to the noobi. def get_rating_stars(self):

Re: compare integers in template (newbie question)

2006-08-15 Thread Alan Green
On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Folks, > > I'd really love to be able to do something like this: > {% if videoObject.rating > 0 %}*{% endif %} > {% if videoObject.rating > 1 %}*{% endif %} > {% if videoObject.rating > 2 %}*{% endif %} > > To display an appropriate numb

Re: compare integers in template (newbie question)

2006-08-15 Thread Jonathan Buchanan
> Folks, > > I'd really love to be able to do something like this: > {% if videoObject.rating > 0 %}*{% endif %} > {% if videoObject.rating > 1 %}*{% endif %} > {% if videoObject.rating > 2 %}*{% endif %} > > To display an appropriate number of stars for a video clip in a > template. > > Right

compare integers in template (newbie question)

2006-08-15 Thread [EMAIL PROTECTED]
Folks, I'd really love to be able to do something like this: {% if videoObject.rating > 0 %}*{% endif %} {% if videoObject.rating > 1 %}*{% endif %} {% if videoObject.rating > 2 %}*{% endif %} To display an appropriate number of stars for a video clip in a template. Right now, I'm resorting to

Newbie Question

2006-04-22 Thread Roger
Hi, As a newbie I have been working through the Django Tutorial. I must say it is very well written, even so I have hit a wall... I have activated the admin site, and created a superuser and can log in as the superuser. What I have sofar failed to do is to add the demo site (polls) to the admin

Re: Stupid newbie question about documentation

2006-04-07 Thread Waylan Limberg
On 4/5/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Isn't there a Javadoc equivalent for Python? > Is pydoc what you are looking for? From the command line do: python pydoc.py -p 8080 Then browse to http://localhost:8080/ and you get all the documentation for all modules/classes/etc on your PY

Re: Stupid newbie question about documentation

2006-04-05 Thread [EMAIL PROTECTED]
... and don't forget the excellent Django API browser here: http://djangoapi.quamquam.org/magic-removal/ Derek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: Stupid newbie question about documentation

2006-04-05 Thread James Bennett
On 4/5/06, arthur debert <[EMAIL PROTECTED]> wrote: > 1) fire the shell (cd to your project dir) then: >python manage.py shell >from django.contrib.auth.models import User >dir(User) or dir(User,objetcts.all()[0]) User.__doc__ will also get you this information, in a form which lets y

Re: Stupid newbie question about documentation

2006-04-05 Thread Todd O'Bryan
Thank you, thank you, thank you. On Apr 5, 2006, at 5:10 PM, arthur debert wrote: > I guess what you are looking for is: > u = User.objects.get(username='namehere') > > but you could also: > > 1) fire the shell (cd to your project dir) then: >python manage.py shell >from django.contrib.a

Re: Stupid newbie question about documentation

2006-04-05 Thread arthur debert
Hi Todd. I guess what you are looking for is: u = User.objects.get(username='namehere') but you could also: 1) fire the shell (cd to your project dir) then: python manage.py shell from django.contrib.auth.models import User dir(User) or dir(User,objetcts.all()[0]) 2) on the admin sit

Stupid newbie question about documentation

2006-04-05 Thread Todd O'Bryan
In m-r, I want to write u = User.objects.get(login='namehere') except that login isn't the name of the attribute. Where can I look to find all the attributes of an instance? I know about the dir() function, but it just gives me methods, right? Is there someplace Python-internal to do this, o

A newbie question about log files

2006-03-24 Thread Vladimir
Hi I am hosting my Django webapp on DreamHost. No real problems so far. And let me just say: I really like the work you've done with Django. Simple and cohesive. Anyway, back to my problem. As I said, everything works fine, but I am chasing this bug I only seem to have when I deploy. I do an AJA

Re: newbie question about admin module

2006-03-05 Thread mahakala
Hi, Max Many thanks for the reply. I noticed the auto_grow property and has used it. I will try request.user.username and staff_member_required. Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: newbie question about admin module

2006-03-04 Thread Max Battcher
mahakala wrote: > Hi, everybody > > I just created a simple data entry application in django, and I want to > use contrib admin as the data input interface and the admin user > management, I want the system log which staff user input the every > single line data. I know there is an action history

newbie question about admin module

2006-03-03 Thread mahakala
Hi, everybody I just created a simple data entry application in django, and I want to use contrib admin as the data input interface and the admin user management, I want the system log which staff user input the every single line data. I know there is an action history. But I still want there is

<    1   2   3   4   5