Tutorial problems

2010-06-25 Thread Bradley Hintze
Hi all, I just installed Django using MacPorts on snow leopard and django-admin.py cannot be found anywhere on my computer, thus I cant do the tutorial. Also, the recommendation was given to place /opt/local/lib/python2.4/site-packages/django/bin in a $PATH but that given path is non-existant on m

Cant find django

2010-07-05 Thread Bradley Hintze
I have decided to give django a try despite a previous experience which went bad. I am on Mac OSX 10.6. I used the bitnami-djangostack-1.1.1-2-osx-x86-installer and went to follow the tutorial. I ran the python interactive interpreter and tried to import django wit no luck. I tried to run 'django-a

Re: Cant find django

2010-07-05 Thread Bradley Hintze
I am uninstalling BitNami Django. Where can I get a tarball? (which one should I get? How should I unpack it? How do i install? what is pip? how do I use virtualenv?) All I see is third party packages, I'm guessing that's not what I want?? On Mon, Jul 5, 2010 at 10:45 PM, Shawn Milochik wrote: >

Re: Cant find django

2010-07-05 Thread Bradley Hintze
I found http://www.djangoproject.com/download/ that answers most my questions. I'm sure there will be more to come soon. Thanks, Bradley On Mon, Jul 5, 2010 at 11:05 PM, Bradley Hintze wrote: > I am uninstalling BitNami Django. > > Where can I get a tarball? (which one should I g

Tutorial Help

2010-07-06 Thread Bradley Hintze
Hi all, I am following the tutorial part 2 (http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02) and I am stuck. I uncommented the 'django.contrib.admin' as directed and ran 'python manage.py syncdb' and got the following error: Error: No module named pollsdjango.contrib.admin

Re: Tutorial Help

2010-07-06 Thread Bradley Hintze
Thanks James, I feel sheepish ;) On Tue, Jul 6, 2010 at 12:03 PM, James Bennett wrote: > On Tue, Jul 6, 2010 at 10:56 AM, Bradley Hintze > wrote: >> Error: No module named pollsdjango.contrib.admin > > Look at your INSTALLED_APPS setting. You're missing a comma between

Apache config trouble

2010-07-07 Thread Bradley Hintze
Hi all, I'm getting the following error n the apache error log: [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251] mod_wsgi (pid=425): Exception occurred processing WSGI script '/Library/WebServer/testing123/apache/django.wsgi'. [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]

Re: Apache config trouble

2010-07-07 Thread Bradley Hintze
Are you sure the syntax error isn't in the wsgi file itself? > /Library/WebServer/testing123/apache/django.wsgi > > Nuno > > On Wed, Jul 7, 2010 at 3:02 PM, Bradley Hintze > wrote: >> Hi all, >> >> I'm getting the following error n the apache erro

URL Trouble

2010-07-07 Thread Bradley Hintze
Hi all, I am trying to follow http://docs.djangoproject.com/en/1.2/topics/forms/ I put contact.html in myTemplates. But when I try to bring up '../contact' i get a 404 error. Here are the details. Using the URLconf defined in testing123.urls, Django tried these URL patterns, in this order: ^tes

Re: URL Trouble

2010-07-07 Thread Bradley Hintze
Thanks, that was it! On Wed, Jul 7, 2010 at 5:54 PM, Daniel Roseman wrote: > On Jul 7, 10:48 pm, Bradley Hintze > wrote: >> Hi all, >> >> I am trying to followhttp://docs.djangoproject.com/en/1.2/topics/forms/ >> >> I put contact.html in myTemplates. >>

Is Django right for what I am trying to do

2010-07-08 Thread Bradley Hintze
Hi all I did the tutorial and I've spent the last two days in the documentation trying, and failing, to figure out how to tie my model to a view and ultimately a template that is served. The documentation seems to do a lot of things (like write html) automatically which is not what I want (see htt

Re: Is Django right for what I am trying to do

2010-07-08 Thread Bradley Hintze
tting info from the user should be strait foreword but its not as displayed by the rather lengthy tutorial. But than I'm new to this... On Thu, Jul 8, 2010 at 5:08 PM, Daniel Roseman wrote: > On Jul 8, 6:43 pm, Bradley Hintze wrote: >> Hi all >> >> I did the tutorial and

Re: Is Django right for what I am trying to do

2010-07-08 Thread Bradley Hintze
objects from your model (FileForm) to your template? On Thu, Jul 8, 2010 at 5:51 PM, CLIFFORD ILKAY wrote: > On 07/08/2010 05:23 PM, Bradley Hintze wrote: >> >> I guess I just don't like the model.py, views.py, templates, and >> url.py. In the tutorial you have to edit all

Re: Is Django right for what I am trying to do

2010-07-08 Thread Bradley Hintze
Thanks man!! On Thu, Jul 8, 2010 at 6:11 PM, larsendt wrote: > Check out djangobook.com. It's a much longer tutorial, and really well > written. > > On Jul 8, 4:07 pm, Bradley Hintze wrote: >> Thanks, that helps but I wish Django had more tutorial than one. I >> s

MySQL Newbie question

2010-08-16 Thread Bradley Hintze
Hi all, I'm trying to install MySQL for Python on Snow Leopard and I get : sh: mysql_config: command not found Traceback (most recent call last): File "setup.py", line 15, in metadata, options = get_config() File "/Users/bradleyhintze/Desktop/MySQL-python-1.2.3/setup_posix.py", line 43,

Displaying images

2010-08-19 Thread Bradley Hintze
Hi all, I am trying to display an image but cant get it up. I tried google searches and tried what was suggested with no luck. i am a newbie running the local server. Here is my code: #settings.py ... MEDIA_ROOT = '/Users/bradleyhintze/djcode/my_try/media/' MEDIA_URL = 'media/' ... base.html ...

Re: Displaying images

2010-08-19 Thread Bradley Hintze
y media files? On Thu, Aug 19, 2010 at 11:07 AM, Steve Holden wrote: > On 8/19/2010 11:00 AM, Bradley Hintze wrote: >> Hi all, >> >> I am trying to display an image but cant get it up. I tried google >> searches and tried what was suggested with no luck. i am a newbie >>

Re: Displaying images

2010-08-19 Thread Bradley Hintze
Javier Unfortunately, changing the quotes as you explained did not work. Bradley On Thu, Aug 19, 2010 at 11:15 AM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 10:00 AM, Bradley Hintze > wrote: >> > > you got the quotes wrong: > > > > -- >

Re: Displaying images

2010-08-19 Thread Bradley Hintze
hu, Aug 19, 2010 at 11:31 AM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 10:28 AM, Bradley Hintze > wrote: >> Javier >> >> Unfortunately, changing the quotes as you explained did not work. > > likely the template isn't gettng the MEDIA_URL variable.

Re: Displaying images

2010-08-19 Thread Bradley Hintze
I am sorry. How does this 'Context' object(?) relate to displaying an image? Your last though me for a loop. On Thu, Aug 19, 2010 at 12:11 PM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 10:49 AM, Bradley Hintze > wrote: >> >> ... >> >> so i

Re: Displaying images

2010-08-19 Thread Bradley Hintze
So do I create 'my_data_dictionary'? and whats in there? On Thu, Aug 19, 2010 at 12:54 PM, Steve Holden wrote: > On 8/19/2010 12:29 PM, Bradley Hintze wrote: >> I am sorry. How does this 'Context' object(?) relate to displaying an >> image? Your last though

Re: Displaying images

2010-08-19 Thread Bradley Hintze
% endblock %} {% block footer %} Thanks for visiting my site. {% endblock %} On Thu, Aug 19, 2010 at 1:11 PM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 12:03 PM, Bradley Hintze > wrote: >> So do I create 'my_data_dictionary'? and whats in there? >

Re: Displaying images

2010-08-19 Thread Bradley Hintze
Greg, that didn't do it :( Thanks though :) On Thu, Aug 19, 2010 at 1:43 PM, Greg Pelly wrote: > try this: > def math_form(request): >   return render_to_response('form.html', > {}, context_instance=RequestContext(request)) > > greg > On Thu, Aug 19, 2010

Please wait page

2010-08-23 Thread Bradley Hintze
Hi all, My webpage has a process that takes about 10-15 seconds. Is there a way I can have an intermediate 'Please wait' page, preferably with blinking shapes (dots) so that the user knows that the process is still working. As an example try finding a flight at orbitz.com, there is an intermediat

permissions and ownership

2010-08-26 Thread Bradley Hintze
Hi all, I am a newbie when it comes to Appach and mod_wsgi. I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango and think I did everthing correctly. However, I am having permission issues. I have been exposed to but am no entirely comfortable with permissions and ownership. Here

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
26 09:35 MolProbity_Compare_test Any ideas out there??? On Thu, Aug 26, 2010 at 10:06 AM, Bradley Hintze wrote: > Hi all, > > I am a newbie when it comes to Appach and mod_wsgi. I followed > http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango and think > I did everthing cor

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
/django.wsgi'. [Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] IOError: [Errno 13] Permission denied I hope someone can help me given this. Bradley On Thu, Aug 26, 2010 at 11:45 AM, Bradley Hintze wrote: > Here are some more details. > > httpd.conf > > Alias /med

Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
I got it :) On Thu, Aug 26, 2010 at 12:35 PM, Bradley Hintze wrote: > Not getting much of a respose BUT I did make progress. I had a major > typo but now i get Internal Server Error > > error_log > > Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] > (13)Permission

Template not found

2010-08-26 Thread Bradley Hintze
I just moved my site onto apache and can get the 'home' site up which directs you to upload two files. When you submit the form you get a 500 Internal Server Error. The error log indicates that it can't find a 500 template, which I do have in my templates folder, which indicates to me that it may n

Re: Template not found

2010-08-26 Thread Bradley Hintze
[error] [client 152.16.223.251] File "/Library/Python/2.6/site-packages/django/template/loader.py", line 138, in find_template [Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] raise TemplateDoesNotExist(name) [Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] Te

Re: Template not found

2010-08-26 Thread Bradley Hintze
A found the template error, a typo. But now I have an impor error: [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] mod_wsgi (pid=1440): Exception occurred processing WSGI script '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'., referer: http://summit.research.du

Re: Template not found

2010-08-26 Thread Bradley Hintze
Got it! On Thu, Aug 26, 2010 at 2:56 PM, Bradley Hintze wrote: > A found the template error, a typo. But now I have an impor error: > > [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] mod_wsgi > (pid=1440): Exception occurred processing WSGI script > '/Users/

Re: Template not found

2010-08-27 Thread Bradley Hintze
ought that I could change the file no problem, specifically I assumed ownership wouldn't change. Is this a probleem that someone can help me with? On Fri, Aug 27, 2010 at 11:21 AM, Bradley Hintze wrote: > LOL and grr, > > I wish I had posted my solution. I'm getting the s

Re: Template not found

2010-08-27 Thread Bradley Hintze
d all the requisite absolute paths. Any ideas? I'll let you know what I find if I find anything at all. Bradley On Fri, Aug 27, 2010 at 4:58 AM, Steve Holden wrote: > On 8/27/2010 3:41 AM, Reinout van Rees wrote: >> On 08/26/2010 09:11 PM, Bradley Hintze wrote: >>> Got it!

variable name spaces

2010-08-27 Thread Bradley Hintze
Ok, I hope I can explain my problem coherently :). In development I ran my web app fine. I have now put it in production (configured and running on apache). In my views.py file I passed global variables between different functions (views) beautifully during development (manage.py runserver). Howev

static files

2010-08-30 Thread Bradley Hintze
Hi all, I have my site on a production server (apache) and am trying to get static files to be served but cannot get it to work (serving on the same server). Following the django documentation did not work, I edited the httpd.conf as described in the documentation but when I tried to restart the s

Re: static files

2010-08-30 Thread Bradley Hintze
I think you just found my problem...lol. I'll let you know if I still have problems On Mon, Aug 30, 2010 at 2:59 PM, Daniel Roseman wrote: > On Aug 30, 7:26 pm, Bradley Hintze > wrote: >> Hi all, >> >> I have my site on a production server (apache) and am trying

Re: static files

2010-08-30 Thread Bradley Hintze
edia/' ... Any ideas? Or do you need mor info? if so, what? On Mon, Aug 30, 2010 at 3:09 PM, Bradley Hintze wrote: > I think you just found my problem...lol. I'll let you know if I still > have problems > > On Mon, Aug 30, 2010 at 2:59 PM, Daniel Roseman wrote: >> O

Re: static files

2010-08-30 Thread Bradley Hintze
I added: AliasMatch /([^/]*\.gif) /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/$1 and it worked. YAY! On Mon, Aug 30, 2010 at 3:26 PM, Bradley Hintze wrote: > OK, > > I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > and still sant se

Please wait page trouble

2010-08-30 Thread Bradley Hintze
I am attempting to do a lengthe calculation that will require the user to wait a bit. I want a 'Please wait page to come up while the lengthy calculation is performed. I thought this might work: views.py def please_wait(request): return HttpResponse('Please Wait..') def run_DHM(request):

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
oza La Fuente wrote: > On Mon, Aug 30, 2010 at 7:18 PM, Bradley Hintze > wrote: >> I am attempting to do a lengthe calculation that will require the user >> to wait a bit. I want a 'Please wait page to come up while the lengthy >> calculation is performed. I thought th

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
like are brand new to me. Thanks, Bradley On Tue, Aug 31, 2010 at 10:38 AM, Bradley Hintze wrote: > I'll look into this. I have no idea what you mean by 'ajax' or 'json'. > Thus your code doe'snt really make sense given my lack of knowlege. I > will do some g

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
first step?). You > can indeed call a view.my function from your please wait template, but you > want to do it in the background, i.e., with an AJAX request in order to keep > the Please Wait message displayed while your server processes the request. > > On Tue, Aug 31, 2010 at 2:46 PM

seeing HTML code, not the interpreted html

2010-09-01 Thread Bradley Hintze
Hi all, I am playing with iframes for the first time and am gelling some undesired results. The 'stuff' in my frame shows as HTML code instead of the expected html 'interpretation.' I hope that made sense) I am looking to fix this. Here is what I did: I generated a string with all my html in it an

Re: seeing HTML code, not the interpreted html

2010-09-01 Thread Bradley Hintze
I just made the HTML in the template using a for loop. DOH!! On Wed, Sep 1, 2010 at 10:38 AM, Bradley Hintze wrote: > Hi all, > > I am playing with iframes for the first time and am gelling some > undesired results. The 'stuff' in my frame shows as HTML code instead

Template syntax

2010-09-02 Thread Bradley Hintze
Hi, Django says that this is a TemplateSyntaxError. if param1_trunc[i][1] The i refers to an index of a for loop as shown: {% for i in pdb1_nums_len_dev6 %} {% ifequal param1_trunc[i] '-' %} {% else %} {% if param1_trunc[i][1] %} {% else %}

Re: Template syntax

2010-09-03 Thread Bradley Hintze
gt; >  {% ifequal param1_trunc.i "-" %} > > On Thu, Sep 2, 2010 at 5:11 PM, Bradley Hintze > wrote: >> Hi, >> >> Django says that this is a TemplateSyntaxError. >> >> if param1_trunc[i][1] >> >> The i refers to an index of a for loop as

Re: Template syntax

2010-09-03 Thread Bradley Hintze
So is there a way to access/index lists within the template? On Fri, Sep 3, 2010 at 12:14 PM, Javier Guerra Giraldez wrote: > On Fri, Sep 3, 2010 at 11:10 AM, Bradley Hintze > wrote: >> -In my template I put {{ param1.0 }}, expecting to see the first list >> in the list o

Re: Please wait page trouble

2010-09-07 Thread Bradley Hintze
good method if > you want to return structured data. In the above example of a redirect you > could just return anything I suppose, i.e., just an 'OK'. > > On Tue, Aug 31, 2010 at 5:11 PM, Bradley Hintze > wrote: >> >> Ok, I'll try to elaborate. again java

Re: Please wait page trouble

2010-09-08 Thread Bradley Hintze
min.js"</a>;> > > Then I'd recommend one of the tutorials, e.g.,: > > http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery > > The tutorials should serve as live examples. > > On Tue, Sep 7, 2010 at 10:31 AM, Bradley Hintze > wrote: >> >&

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
o error Caught NoReverseMatch while rendering: Reverse for 'run_DHM' with arguments '()' and keyword arguments '{}' not found. run_DHM takes 'request' as an argument. How do I pass it the argument?? Bradley On Wed, Sep 8, 2010 at 9:34 PM, Brian Neal wro

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
isplay a Please Wait page that fires off an AJAX call to some view that > performs calculations => run_DHM. The results of the calculations are stored > in the session. > 2. run_DHM returns a simple response that will indicate sucess, e.g., "OK" > 3. Redirect to

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
#x27;please_wait.html', ...) > > def run_DHM(request): >     # Do calculations, store results in request.session >     ... >     # If everything ok, return OK (otherwise return some error) >     return HttpResponse('OK') > > def display_DHM(request): >

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
rmat or how much data you're > storing in the session it's hard to say. I was just assuming you'd use > context variable(s) to pass the data to the template. I'm not intimately > familiar with the Session API, but isn't it just a dictionary? > > On Thu, Sep 9,

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
}); an of course configure url.py and view.py as explained previously. Is there an easy way to do this? In other words, what are the If_come_from_pageA and If_come_from_pageB conditions? Can I access the context dictionary that I passed to please_wait.html? On Thu, Sep 9, 2010 at 11:23 AM, Bradle

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
lculation_url }} context > variable as the argument to the {% url %} tag. > > Your run_DHM view could now return the url to redirect to instead of just > 'OK'. You'll have to return the full URL, e.g., '/display_DHM/', from your > run_DHM view. This is pro

Re: Please wait page trouble

2010-09-10 Thread Bradley Hintze
I got to work! I needed a good nights sleep to see it. the url was '/DHM_run/' NOT '/run_DHM/'. Thanks Alec On Thu, Sep 9, 2010 at 4:20 PM, Bradley Hintze wrote: > Ok, cant quite get it. Here is what I have: > > please_wait.html > ... > src="<a rel=

'ifequal' takes two arguments

2010-09-22 Thread Bradley Hintze
I am getting an ''ifequal' takes two arguments' error for this line: {% ifequal {{ param2_trunc_new.3.0 }} {{ param2.4.1 }} %} I believer those are indeed two arguments. What going on here? -- Bradley J. Hintze Graduate Student Duke University School of Medicine 801-712-8799 -- You received t

url not going to view

2010-09-30 Thread Bradley Hintze
Hi, I have made a successful Django app in the past. and decided to start a new one. Except I'm running into a problem. I started a new project to isolate the problem but still am having a problem. Here it is: I have a link to a different page from 'home' called 'here'. When I click the link I ge

Re: url not going to view

2010-09-30 Thread Bradley Hintze
Why $s, if you don't mind me asking? On Thu, Sep 30, 2010 at 10:55 AM, Carlton Gibson wrote: > > On 30 Sep 2010, at 15:42, Bradley Hintze wrote: > >> urlpatterns = patterns('', >>    (r'^', home_view), >>    (r'^here/', here), >&

Re: url not going to view

2010-09-30 Thread Bradley Hintze
LOL, let me rephrase. What is the significance of the '$' (or what does it mean) in the URLs as pointed out in previous messages? On Thu, Sep 30, 2010 at 11:15 AM, Carlton Gibson wrote: > Its the plural of $. > > On 30 Sep 2010, at 16:02, Bradley Hintze wrote: > >>

Re: url not going to view

2010-09-30 Thread Bradley Hintze
an read the Python documentation for the "re"module for more >> insight into all this. >> >> regards >> Steve >> >> On 9/30/2010 11:20 AM, Bradley Hintze wrote: >>> LOL, let me rephrase. >>> >>> What is the significance of th