Re: url not going to view

2010-09-30 Thread Bradley Hintze
OH, they're regular expressions, right? Ok, I need to try to
understand RE but they still escape any meaning for me somehow.

On Thu, Sep 30, 2010 at 11:33 AM, Carlton Gibson
 wrote:
> Django: The Definitive Guide gives a good tutorial/refresher too:
>
> http://djangobook.com/en/2.0/chapter03/
>
>
> On 30 Sep 2010, at 16:25, Steve Holden wrote:
>
>> Just as "^" means "start of string" so "$" mean "end of string", so "^$"
>> means a string where the end is next to the beginning.
>>
>> You can 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 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:
>>>>
>>>>> 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),
>>>>>>>   # Example:
>>>>>>> )
>>>>>>
>>>>>> your first pattern matches all URLs which have a beginning, which is all 
>>>>>> URLs. You need to add the $s at the end:
>>>>>>
>>>>>> urlpatterns = patterns('',
>>>>>>  (r'^$', home_view),
>>>>>>  (r'^here/$', here),
>>>>>>  # Example:
>>>>>> )
>>>>>>
>>>>>> HTH
>>>>>>
>>>>>> Regards,
>>>>>> Carlton
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Django users" group.
>>>>>> To post to this group, send email to django-us...@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to 
>>>>>> django-users+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at 
>>>>>> http://groups.google.com/group/django-users?hl=en.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Bradley J. Hintze
>>>>> Graduate Student
>>>>> Duke University
>>>>> School of Medicine
>>>>> 801-712-8799
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "Django users" group.
>>>>> To post to this group, send email to django-us...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> django-users+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/django-users?hl=en.
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Django users" group.
>>>> To post to this group, send email to django-us...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> django-users+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/django-users?hl=en.
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> DjangoCon US 2010 September 7-9 http://djangocon.us/
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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:
>
>> 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),
>>>>    # Example:
>>>> )
>>>
>>> your first pattern matches all URLs which have a beginning, which is all 
>>> URLs. You need to add the $s at the end:
>>>
>>> urlpatterns = patterns('',
>>>   (r'^$', home_view),
>>>   (r'^here/$', here),
>>>   # Example:
>>> )
>>>
>>> HTH
>>>
>>> Regards,
>>> Carlton
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Django users" group.
>>> To post to this group, send email to django-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>>
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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),
>>    # Example:
>> )
>
> your first pattern matches all URLs which have a beginning, which is all 
> URLs. You need to add the $s at the end:
>
> urlpatterns = patterns('',
>   (r'^$', home_view),
>   (r'^here/$', here),
>   # Example:
> )
>
> HTH
>
> Regards,
> Carlton
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 get the right URL but get the home.html view rather
than the expected here.html view. Here are the relevant code.

#url.py
from django.conf.urls.defaults import *
from MolProbity_View.views import *
from django.conf import settings

urlpatterns = patterns('',
(r'^', home_view),
(r'^here/', here),
# Example:
)

#views.py
from django.shortcuts import render_to_response, HttpResponseRedirect
from django.http import HttpResponse
from django.template import Context, Template, RequestContext
from django.views.decorators.csrf import csrf_protect
import os

def home_view(request):
c = {'we_r_home':'yes'}
return render_to_response('home.html', c,
context_instance=RequestContext(request))

def here(request):
c = {'we_r_home':'no'}
return render_to_response('here.html', c,
context_instance=RequestContext(request))

#home.html


home


Hello
{{ we_r_home }}
Link



#here


here


Good Bye
{{ we_r_home }}



I think I'm not seeing something obvious. Any ideas?
Thanks
-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



'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 this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
> 
>  $.get({{ calculation_url }}, function(data) {
>    if (data == 'OK') {
>        window.location.href = {{ view_url }};
>    }
>    else {
>       alert(data);
>    }
>    });
> 
> ...
>
> url.py
> url(r'^DHM_run_start/$', please_wait, kwargs={'calculation_url':
> '/run_DHM/', 'view_url':'/DHM_display/'}, name='run_DHM_start'),
> url(r'^analyze_start/$', please_wait, kwargs={'calculation_url':
> '/analyze_compare/', 'view_url':'/results_display/'},
> name='analyze_start'),
>
> view.py
> ...
> def please_wait(request, calculation_url, view_url):
>    c = {'calculation_url': calculation_url, 'view_url': view_url}
>    return render_to_response('please_wait.html', c,
> context_instance=RequestContext(request))
>
> def run_DHM(request):
>    #run calculations
>    return HttpResponse('OK')
>
>
> def analyze_compare(request):
>    #run calculations
>    return HttpResponse('OK')
> ...
>
> I could have run_DHM and analyze_compare return views rather than the
> HTTPResponse "OK" as you indicated but was unsure how to change the
> javascript to make it work. This seems like it should work but I just
> get the "please_wait" page indefinitely. Seems as if its not calling
> {{ calculation_url }}.
>
> Any ideas or elaborations (hold my hand) on JSON would be great.
>
> Thanks,
> Bradley
>
> On Thu, Sep 9, 2010 at 12:44 PM, Alec Shaner  wrote:
>> A lot of ways to do this. Yes you could do it as above, but that can get
>> ugly as you start adding more views. You can indeed access the context
>> dictionary in please_wait.html. It's hard to say without knowing more
>> details about your application. How does the user pass arguments (if any)
>> used in these calculations? If you're looking for a simple way to abstract
>> this process, consider using URL confs:
>>
>> # Create a url specific to the DHM calulcation
>> url(r'^DHM_run_start/$', please_wait, kwargs={'calculation_url': 'run_DHM'},
>> name='run_DHM_start'),
>>
>> and you'd call it like /DHM_run_start/
>>
>> or
>>
>> # Create a URL with a regex pattern to capture a calculation_url
>> url(r'^please_wait/(?P[\d\w]+)/$', please_wait),
>>
>> and you'd call it like /please_wait/run_DHM/
>>
>> The second option is more generic, but you'll need to validate the url
>> argument. The first option means adding more url entries. In either case
>> your please_wait view would be defined like:
>>
>> def please_wait(request, calculation_url):
>>     return render_to_response('please_wait.html', {'calculation_url':
>> calculation_url}, ...)
>>
>> please_wait.html could then substitute the {{ calculation_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 probably where you'd start thinking about a JSON
>> response as you might return a dictionary with an result code ('OK' or
>> 'error') along with a url to redirect the user to.
>>
>> window.location.href = data;
>>
>> Or if you've switched to a JSON response it might be data.display_url after
>> checking that data.result = 'OK'.
>>
>> Hope that all makes sense.
>>
>> On Thu, Sep 9, 2010 at 12:00 PM, Bradley Hintze
>>  wrote:
>>>
>>> OK,
>>>
>>> Got it working. Sorry one more question. I have a couple of places
>>> where I'd like to display the 'Please Wait' page. I'd imagine I'd do
>>> something similar to the following::
>>>
>>> # please_wait.html
>>> ...
>>> >>
>>> src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Ok, cant quite get it. Here is what I have:

please_wait.html
...
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>

  $.get({{ calculation_url }}, function(data) {
if (data == 'OK') {
window.location.href = {{ view_url }};
}
else {
   alert(data);
}
});

...

url.py
url(r'^DHM_run_start/$', please_wait, kwargs={'calculation_url':
'/run_DHM/', 'view_url':'/DHM_display/'}, name='run_DHM_start'),
url(r'^analyze_start/$', please_wait, kwargs={'calculation_url':
'/analyze_compare/', 'view_url':'/results_display/'},
name='analyze_start'),

view.py
...
def please_wait(request, calculation_url, view_url):
c = {'calculation_url': calculation_url, 'view_url': view_url}
return render_to_response('please_wait.html', c,
context_instance=RequestContext(request))

def run_DHM(request):
#run calculations
return HttpResponse('OK')


def analyze_compare(request):
#run calculations
return HttpResponse('OK')
...

I could have run_DHM and analyze_compare return views rather than the
HTTPResponse "OK" as you indicated but was unsure how to change the
javascript to make it work. This seems like it should work but I just
get the "please_wait" page indefinitely. Seems as if its not calling
{{ calculation_url }}.

Any ideas or elaborations (hold my hand) on JSON would be great.

Thanks,
Bradley

On Thu, Sep 9, 2010 at 12:44 PM, Alec Shaner  wrote:
> A lot of ways to do this. Yes you could do it as above, but that can get
> ugly as you start adding more views. You can indeed access the context
> dictionary in please_wait.html. It's hard to say without knowing more
> details about your application. How does the user pass arguments (if any)
> used in these calculations? If you're looking for a simple way to abstract
> this process, consider using URL confs:
>
> # Create a url specific to the DHM calulcation
> url(r'^DHM_run_start/$', please_wait, kwargs={'calculation_url': 'run_DHM'},
> name='run_DHM_start'),
>
> and you'd call it like /DHM_run_start/
>
> or
>
> # Create a URL with a regex pattern to capture a calculation_url
> url(r'^please_wait/(?P[\d\w]+)/$', please_wait),
>
> and you'd call it like /please_wait/run_DHM/
>
> The second option is more generic, but you'll need to validate the url
> argument. The first option means adding more url entries. In either case
> your please_wait view would be defined like:
>
> def please_wait(request, calculation_url):
>     return render_to_response('please_wait.html', {'calculation_url':
> calculation_url}, ...)
>
> please_wait.html could then substitute the {{ calculation_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 probably where you'd start thinking about a JSON
> response as you might return a dictionary with an result code ('OK' or
> 'error') along with a url to redirect the user to.
>
> window.location.href = data;
>
> Or if you've switched to a JSON response it might be data.display_url after
> checking that data.result = 'OK'.
>
> Hope that all makes sense.
>
> On Thu, Sep 9, 2010 at 12:00 PM, Bradley Hintze
>  wrote:
>>
>> OK,
>>
>> Got it working. Sorry one more question. I have a couple of places
>> where I'd like to display the 'Please Wait' page. I'd imagine I'd do
>> something similar to the following::
>>
>> # please_wait.html
>> ...
>> >
>> src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
>> 
>>    if (If_come_from_pageA) {
>>        $.get('{% url run_DHM %}', function(data) {
>>            if (data == 'OK') {
>>                  window.location.href = '{% url display_DHM %}';
>>            } else {
>>                  alert(data);
>>            }
>>    }
>>    else if (If_come_from_pageB) {
>>        $.get('{% url run_analysis %}', function(data) {
>>            if (data == 'OK') {
>>                  window.location.href = '{% url display_analysis %}';
>>            } else {
>>                  a

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
OK,

Got it working. Sorry one more question. I have a couple of places
where I'd like to display the 'Please Wait' page. I'd imagine I'd do
something similar to the following::

# please_wait.html
...
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>

if (If_come_from_pageA) {
$.get('{% url run_DHM %}', function(data) {
if (data == 'OK') {
  window.location.href = '{% url display_DHM %}';
} else {
  alert(data);
}
}
else if (If_come_from_pageB) {
$.get('{% url run_analysis %}', function(data) {
if (data == 'OK') {
  window.location.href = '{% url display_analysis %}';
} else {
  alert(data);
}
}
});


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, Bradley Hintze
 wrote:
> Yeah, I just tried out what I wrote in my last and it worked!
>
> Thanks for all your help!!!
>
> Bradley
>
> On Thu, Sep 9, 2010 at 11:17 AM, Alec Shaner  wrote:
>> That's really a design issue up to you, i.e., how you get data from your
>> view to your template. Since I don't know the format 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, 2010 at 11:05 AM, Bradley Hintze
>>  wrote:
>>>
>>> Thanks Alec,
>>>
>>> That finally makes sense. However, I do have a question here:
>>>
>>> def display_DHM(request):
>>>    # Get results from session
>>>    return render_to_response('ran_DHM.html', ...)
>>>
>>> '# Get results from session' Would I not just do this:
>>>
>>> def display_DHM(request):
>>>    return render_to_response('DHM_ran.html', request.session, ...)
>>>
>>> Or do I have to explicitly get the session data? If so, how?
>>>
>>>
>>> On Thu, Sep 9, 2010 at 10:37 AM, Alec Shaner 
>>> wrote:
>>> > I feel your pain - javascript has always been a pain for me, but
>>> > libraries
>>> > like jQuery make it more bearable!
>>> >
>>> > AJAX calls are made in the background (usually asynchronously), so they
>>> > don't directly change the page you're currently viewing in your browser.
>>> > The
>>> > browser is responsible for dispatching the response returned from your
>>> > AJAX
>>> > call, typically by invoking a callback function you specified when the
>>> > AJAX
>>> > request was initiated. So you don't do a redirect from the server,
>>> > rather
>>> > you can do it using client side javascript in your callback function.
>>> >
>>> > Here is how it basically works:
>>> > 1. Please Wait page makes AJAX request to run_DHM, specifies callback
>>> > function when request completes.
>>> > 2. run_DHM performs calculations, stores results in session, returns an
>>> > "OK"
>>> > response.
>>> > 3. Browser invokes the callback function specified in step 1, which
>>> > should
>>> > change the page to display_DHM view.
>>> > 4. display_DHM retrieves calculation results from session and renders
>>> > HTML
>>> > page.
>>> >
>>> > Your first problem is with the url template tag. You might try this:
>>> >
>>> > {% url MolProbity_Compare_test.views.run_DHM %}
>>> >
>>> > You can also use a named urls, e.g.,
>>> > ...
>>> > url(r'^DHM_run/$', run_DHM, name="run_DHM"),
>>> > ...
>>> > in which case {% url run_DHM %} should also work
>>> >
>>> > Or you can just call the url directly instead of using the url template
>>> > tag,
>>> > e.g., '/run_DHM/'.
>>> >
>>> > The request argument is always passed to your views, you don't have to
>>> > do it
>>> > explicitly. So your run_DHM and display_DHM views will always have that
>&

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Yeah, I just tried out what I wrote in my last and it worked!

Thanks for all your help!!!

Bradley

On Thu, Sep 9, 2010 at 11:17 AM, Alec Shaner  wrote:
> That's really a design issue up to you, i.e., how you get data from your
> view to your template. Since I don't know the format 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, 2010 at 11:05 AM, Bradley Hintze
>  wrote:
>>
>> Thanks Alec,
>>
>> That finally makes sense. However, I do have a question here:
>>
>> def display_DHM(request):
>>    # Get results from session
>>    return render_to_response('ran_DHM.html', ...)
>>
>> '# Get results from session' Would I not just do this:
>>
>> def display_DHM(request):
>>    return render_to_response('DHM_ran.html', request.session, ...)
>>
>> Or do I have to explicitly get the session data? If so, how?
>>
>>
>> On Thu, Sep 9, 2010 at 10:37 AM, Alec Shaner 
>> wrote:
>> > I feel your pain - javascript has always been a pain for me, but
>> > libraries
>> > like jQuery make it more bearable!
>> >
>> > AJAX calls are made in the background (usually asynchronously), so they
>> > don't directly change the page you're currently viewing in your browser.
>> > The
>> > browser is responsible for dispatching the response returned from your
>> > AJAX
>> > call, typically by invoking a callback function you specified when the
>> > AJAX
>> > request was initiated. So you don't do a redirect from the server,
>> > rather
>> > you can do it using client side javascript in your callback function.
>> >
>> > Here is how it basically works:
>> > 1. Please Wait page makes AJAX request to run_DHM, specifies callback
>> > function when request completes.
>> > 2. run_DHM performs calculations, stores results in session, returns an
>> > "OK"
>> > response.
>> > 3. Browser invokes the callback function specified in step 1, which
>> > should
>> > change the page to display_DHM view.
>> > 4. display_DHM retrieves calculation results from session and renders
>> > HTML
>> > page.
>> >
>> > Your first problem is with the url template tag. You might try this:
>> >
>> > {% url MolProbity_Compare_test.views.run_DHM %}
>> >
>> > You can also use a named urls, e.g.,
>> > ...
>> > url(r'^DHM_run/$', run_DHM, name="run_DHM"),
>> > ...
>> > in which case {% url run_DHM %} should also work
>> >
>> > Or you can just call the url directly instead of using the url template
>> > tag,
>> > e.g., '/run_DHM/'.
>> >
>> > The request argument is always passed to your views, you don't have to
>> > do it
>> > explicitly. So your run_DHM and display_DHM views will always have that
>> > available. Just get the session out of the request object in each view
>> > you
>> > need it.
>> >
>> > Basic skeleton:
>> >
>> > # please_wait.html
>> > ...
>> > > >
>> > src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
>> > 
>> >     $.get('{% url run_DHM %}', function(data) {
>> >         if (data == 'OK') {
>> >               window.location.href = '{% url display_DHM %}';
>> >         } else {
>> >               alert(data);
>> >         }
>> >     });
>> > 
>> >
>> > Note I've used the shorthand urls above, you could just use '/run_DHM/'
>> > and
>> > '/display_DHM/' instead of the url template tags. You could also use the
>> > full package path. Also note that the callback function I refer to is
>> > defined inline - the function(data) ... part.
>> >
>> > # views.py
>> > from django.http import HttpResponse
>> >
>> > def please_wait(request):
>> >     return render_to_response('please_wait.html', ...)
>> >
>> > def run_DHM(request):
>> >     # Do calculations, store results in 

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Thanks Alec,

That finally makes sense. However, I do have a question here:

def display_DHM(request):
# Get results from session
return render_to_response('ran_DHM.html', ...)

'# Get results from session' Would I not just do this:

def display_DHM(request):
return render_to_response('DHM_ran.html', request.session, ...)

Or do I have to explicitly get the session data? If so, how?


On Thu, Sep 9, 2010 at 10:37 AM, Alec Shaner  wrote:
> I feel your pain - javascript has always been a pain for me, but libraries
> like jQuery make it more bearable!
>
> AJAX calls are made in the background (usually asynchronously), so they
> don't directly change the page you're currently viewing in your browser. The
> browser is responsible for dispatching the response returned from your AJAX
> call, typically by invoking a callback function you specified when the AJAX
> request was initiated. So you don't do a redirect from the server, rather
> you can do it using client side javascript in your callback function.
>
> Here is how it basically works:
> 1. Please Wait page makes AJAX request to run_DHM, specifies callback
> function when request completes.
> 2. run_DHM performs calculations, stores results in session, returns an "OK"
> response.
> 3. Browser invokes the callback function specified in step 1, which should
> change the page to display_DHM view.
> 4. display_DHM retrieves calculation results from session and renders HTML
> page.
>
> Your first problem is with the url template tag. You might try this:
>
> {% url MolProbity_Compare_test.views.run_DHM %}
>
> You can also use a named urls, e.g.,
> ...
> url(r'^DHM_run/$', run_DHM, name="run_DHM"),
> ...
> in which case {% url run_DHM %} should also work
>
> Or you can just call the url directly instead of using the url template tag,
> e.g., '/run_DHM/'.
>
> The request argument is always passed to your views, you don't have to do it
> explicitly. So your run_DHM and display_DHM views will always have that
> available. Just get the session out of the request object in each view you
> need it.
>
> Basic skeleton:
>
> # please_wait.html
> ...
>  src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
> 
>     $.get('{% url run_DHM %}', function(data) {
>         if (data == 'OK') {
>               window.location.href = '{% url display_DHM %}';
>         } else {
>               alert(data);
>         }
>     });
> 
>
> Note I've used the shorthand urls above, you could just use '/run_DHM/' and
> '/display_DHM/' instead of the url template tags. You could also use the
> full package path. Also note that the callback function I refer to is
> defined inline - the function(data) ... part.
>
> # views.py
> from django.http import HttpResponse
>
> def please_wait(request):
>     return render_to_response('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):
>     # Get results from session
>     return render_to_response('ran_DHM.html', ...)
>
> This is over simplified, but should serve to get started if you want to use
> this redirect approach.
>
> On Thu, Sep 9, 2010 at 9:59 AM, Bradley Hintze 
> wrote:
>>
>> Alec,
>>
>> Thanks for your patience. The jquery tutorials have been frustrating.
>> Anyway, I do not have three 'views' as you suggested. I will try that.
>> But I need to understand a few things before I try that. How to call
>> run_DHM from my please_wait.html page. (I assume AJAX but I've tried
>> and tries what have been suggested with no success, most likely due to
>> my failed attempts at understanding AJAX) I assume after I run the
>> run_DHM view function I will somehow have run_DHM redirect it to the
>> display_DHM. My question is, how do I redirect AND pass the
>> request.session arguments, which is where the data from run_DHM will
>> be stored?
>>
>> As requested, here is my full url.py:
>>
>> from django.conf.urls.defaults import *
>> from MolProbity_Compare_test.views import *
>>
>> # Uncomment the next two lines to enable the admin:
>> # from django.contrib import admin
>> # admin.autodiscover()
>>
>> urlpatterns = patterns('

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Alec,

Thanks for your patience. The jquery tutorials have been frustrating.
Anyway, I do not have three 'views' as you suggested. I will try that.
But I need to understand a few things before I try that. How to call
run_DHM from my please_wait.html page. (I assume AJAX but I've tried
and tries what have been suggested with no success, most likely due to
my failed attempts at understanding AJAX) I assume after I run the
run_DHM view function I will somehow have run_DHM redirect it to the
display_DHM. My question is, how do I redirect AND pass the
request.session arguments, which is where the data from run_DHM will
be stored?

As requested, here is my full url.py:

from django.conf.urls.defaults import *
from MolProbity_Compare_test.views import *

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
(r'^home/$', home_view),#the 'index' or home or top page view
(r'^about/$', about_view),
(r'^log_out_confirm/$', log_out_confirm),
(r'^log_out/$', log_out),
(r'^upload/$', uploaded_PDBs),
(r'^rotamer_diff/$', rotamer_dif_frame),
(r'^side-by-side/$', side_by_side),
(r'^side-by-side-key/$', side_by_side_key),
(r'^side-by-side-frame/$', side_by_side_frame),
(r'^DHM_run/$', run_DHM),
(r'^please_wait/', please_wait),
(r'^analyze/$', analyze_compare),
)


On Thu, Sep 9, 2010 at 9:22 AM, Alec Shaner  wrote:
> Could you post the full url.py file?
>
> And as Brian mentioned your javascript block should be separated. Plus you
> have an extra }); that's going to fail once you resolve this reverse error.
> It's also not clear what you intend to happen when run_DHM returns its
> response? It looks like your intent is to do a redirect and run_DHM will use
> session data to retrieve calculation results.
>
> Just to clarify, I think your plan is to:
>
> 1. Display 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 a view to display the results, which are retrieved from the
> session => display_DHM
>
> I think you need three views here: please_wait, run_DHM, and display_DHM.
>
> On Thu, Sep 9, 2010 at 8:45 AM, Bradley Hintze 
> wrote:
>>
>> #url.py
>> ...
>>    (r'^please_wait/', please_wait),
>>    (r'^DHM_run/$', run_DHM),
>> ...
>>
>> #please_wait.html
>>
>> > src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
>> $.getJSON('{% url run_DHM %}')
>> });
>> 
>>
>> #view.py
>> def please_wait(request):
>>    c = {'we_r_home':'yes'}
>>    return render_to_response('please_wait.html', c)
>>
>> def run_DHM(request):
>> //put calculated data in request.session
>>    return render_to_response('DHM_ran.html', request.session,
>> context_instance=RequestContext(request))
>>
>>
>> This is the django 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  wrote:
>> > On Sep 8, 5:56 pm, Bradley Hintze  wrote:
>> >> This is what I have in my please_wait.html
>> >>
>> >> > >> src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
>> >> $.getJSON('{% url run_DHM %}')});
>> >>
>> >> 
>> >
>> > I don't think that is right, is it? At least I've never seen it done
>> > that way. I think you need two script tags:
>> >
>> > http://ajax.googleapis.com/ajax/</a>
>> > libs/jquery/1.4/jquery.min.js">
>> > 
>> >   // Your javascript goes here...
>> > 
>> >
>> >>
>> >> This is the django error
>> >>
>> >> Caught NoReverseMatch while rendering: Reverse for 'run_DHM' wit

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
#url.py
...
(r'^please_wait/', please_wait),
(r'^DHM_run/$', run_DHM),
...

#please_wait.html

http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
$.getJSON('{% url run_DHM %}')
});


#view.py
def please_wait(request):
c = {'we_r_home':'yes'}
return render_to_response('please_wait.html', c)

def run_DHM(request):
//put calculated data in request.session
return render_to_response('DHM_ran.html', request.session,
context_instance=RequestContext(request))


This is the django 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  wrote:
> On Sep 8, 5:56 pm, Bradley Hintze  wrote:
>> This is what I have in my please_wait.html
>>
>> > src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
>> $.getJSON('{% url run_DHM %}')});
>>
>> 
>
> I don't think that is right, is it? At least I've never seen it done
> that way. I think you need two script tags:
>
> http://ajax.googleapis.com/ajax/</a>
> libs/jquery/1.4/jquery.min.js">
> 
>   // Your javascript goes here...
> 
>
>>
>> This is the django 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??
>>
>
> All views take request as a first argument. But that isn't the
> problem. Please post your urls.py that has your run_DHM view in it.
>
> Regards,
> BN
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Please wait page trouble

2010-09-08 Thread Bradley Hintze
This is what I have in my please_wait.html

http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"</a>;>
$.getJSON('{% url run_DHM %}')
});


This is the django 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??

On Tue, Sep 7, 2010 at 1:36 PM, Alec Shaner  wrote:
> You need to include the jquery library script in your html page if you're
> calling getJSON as in the previous emails (and note that getJSON isn't
> necessarily the function you want - jquery provides many options for doing
> AJAX). Either download it, or use one of the public repositories:
>
> http://docs.jquery.com/Downloading_jQuery#CDN_Hosted_jQuery
>
> In fact, just view the html source code for the link just referenced -
> you'll see how jquery is included:
>
>  src="<a  rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"">http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.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:
>>
>> It seems as if this is the only solution but after a week of trying to
>> implement it in a variety of ways it won't work. is there something I
>> need to download (jquery)? More helpful would be a real HTML page as
>> an example or a live example on the web. I am sorry for the trouble
>> but I'd like to understand this and get it working.
>>
>> On Tue, Aug 31, 2010 at 7:37 PM, Alec Shaner 
>> wrote:
>> > $.getJSON should be embedded in your initial Page Wait response page.
>> > The
>> > first argument isn't a view, rather a URL. So you might want to use the
>> > django url template tag, e.g.,
>> > $.getJSON('{% url whatever.run_DHM %}', ...)
>> > The second argument is a callback function. The browser stores the
>> > callback
>> > and subsequently calls it when the url requested returns a response. It
>> > also
>> > might be confusing because the function is defined inline (anonymous),
>> > which
>> > is a frequent shortcut used in javascript. But anyway, when the callback
>> > function executes he just put console.log(result.data) as way to see
>> > what
>> > gets returned.
>> >  You say you want to send the user to another page with the results, but
>> > you
>> > could return a rendered chunk of html code and replace the Please Wait
>> > message using jquery to mainupulate the DOM (jquery documentation has
>> > tutorials). Or if you want to redirect to a new page you could store the
>> > calculation results in the session and redirect to a view that pulls
>> > from
>> > that same session data (or use memcached). So maybe instead of
>> > console.log(result.data), you could
>> > use window.location="/some/url/to/show/calculations/";
>> > His example returns a HttpResponse just to illustrate the concept of how
>> > to
>> > return JSON data. You don't have to return JSON, but it's a 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 is foreign to me although I've
>> >> spent all day trying to learn some.
>> >>  Here's the code:
>> >>
>> >> def please_wait(request):
>> >>   # ... setup context or something
>> >>   return render_to_response("please_wait.html")
>> >>
>> >> def run_DHM(request)
>> >>   # ... perform calculations and collect the result in a dict
>> >>   data = {"result": something}
>> >>   return HttpResponse(json.dumps(data), mimetype="application/json")
>> >>
>> >>
>> >> # using jquery in your html
>> >> 
>> >> $.getJSON("/run_DHM/", function(data) {
>> >>   // do something with result
>> >>   console.log(data.result);
>> >> });
>> >> 
>> >>

Re: Please wait page trouble

2010-09-07 Thread Bradley Hintze
It seems as if this is the only solution but after a week of trying to
implement it in a variety of ways it won't work. is there something I
need to download (jquery)? More helpful would be a real HTML page as
an example or a live example on the web. I am sorry for the trouble
but I'd like to understand this and get it working.

On Tue, Aug 31, 2010 at 7:37 PM, Alec Shaner  wrote:
> $.getJSON should be embedded in your initial Page Wait response page. The
> first argument isn't a view, rather a URL. So you might want to use the
> django url template tag, e.g.,
> $.getJSON('{% url whatever.run_DHM %}', ...)
> The second argument is a callback function. The browser stores the callback
> and subsequently calls it when the url requested returns a response. It also
> might be confusing because the function is defined inline (anonymous), which
> is a frequent shortcut used in javascript. But anyway, when the callback
> function executes he just put console.log(result.data) as way to see what
> gets returned.
>  You say you want to send the user to another page with the results, but you
> could return a rendered chunk of html code and replace the Please Wait
> message using jquery to mainupulate the DOM (jquery documentation has
> tutorials). Or if you want to redirect to a new page you could store the
> calculation results in the session and redirect to a view that pulls from
> that same session data (or use memcached). So maybe instead of
> console.log(result.data), you could
> use window.location="/some/url/to/show/calculations/";
> His example returns a HttpResponse just to illustrate the concept of how to
> return JSON data. You don't have to return JSON, but it's a 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 is foreign to me although I've
>> spent all day trying to learn some.
>>  Here's the code:
>>
>> def please_wait(request):
>>   # ... setup context or something
>>   return render_to_response("please_wait.html")
>>
>> def run_DHM(request)
>>   # ... perform calculations and collect the result in a dict
>>   data = {"result": something}
>>   return HttpResponse(json.dumps(data), mimetype="application/json")
>>
>>
>> # using jquery in your html
>> 
>> $.getJSON("/run_DHM/", function(data) {
>>   // do something with result
>>   console.log(data.result);
>> });
>> 
>>
>> def run_DHM(request) is straight forward then it falls apart.
>>
>> $.getJSON("/run_DHM/", function(data) {
>>   // do something with result
>>   console.log(data.result);
>> });
>>
>> I presume that '$.getJSON("/run_DHM/", function(data)' somehow runs
>> the run_DHM function? How can it even find the function since it lives
>> in view.py? '// do something with result' I want to send another
>> page to the client with the results but do I do this here? If not,
>> what do I do here? What does 'console.log(data.result);' do? Why does
>> def run_DHM(request) return a HttpResponse? I have a template I want
>> it to return so shouldn't I use render_to_response? Obviously, I am
>> not getting how the javascript works so I have no idea how to set this
>> up. I was hoping there was a pythonic solution :).
>>
>> I hope this explains my utter confusion sufficiently.
>>
>> Bradley
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 of lists.
>> Result: nothing was printed to the page.
>
> that zero becomes a string '0', not a numeric 0.  IOW, it's not
> param[0], it's (among other things) param['0'], clearly not what you
> want.
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template syntax

2010-09-03 Thread Bradley Hintze
The dot does not work. As a test I did the following:

-In my template I put {{ param1 }}, param1 is a list of lists.
Result: param1, the lists of lists were printed to the page.

-In my template I put {{ param1.0 }}, expecting to see the first list
in the list of lists.
Result: nothing was printed to the page.

Am I doing something wrong?


On Thu, Sep 2, 2010 at 5:54 PM, Bill Freeman  wrote:
> Don't use [] subscripting, use dot.  The template engine tries using
> the thing after the dot in various ways, including as a dictionary key
> and as a list index.  So, for example:
>
>  {% 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 shown:
>>
>> {% for i in pdb1_nums_len_dev6 %}
>>        
>>          {% ifequal param1_trunc[i] '-' %}
>>          {% else %}
>>            {% if param1_trunc[i][1] %}
>>            {% else %}
>>            
>>            {% endifequal %}
>>          {% endifequal %}
>>        {% endfor %}
>>
>> param1_trunc is a list of lists. Can I not access a object within an
>> internal list in a template llke regular python (see below)?
>>
>>>>p =[[1,2,3],[3,4,5]]
>>>>print p[0][1]
>> 2
>>
>>
>>
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 %}

{% endifequal %}
  {% endifequal %}
{% endfor %}

param1_trunc is a list of lists. Can I not access a object within an
internal list in a template llke regular python (see below)?

>>p =[[1,2,3],[3,4,5]]
>>print p[0][1]
2




-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
> 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 and saved it under a request.session key. On my template
> I simply put {{ key }} and thus I get my result.
>
> Can I ge django to interpret my strinng as HTML?
>
> Heres the relevant code
>
>
> results.html (template)
> ...
> 
>  Your browser does not support iframes.
> 
> ...
>
> urls.py
> ...
>    (r'^rotamer_diff/$', rotamer_dif_frame),
> ...
>
> views.py
> ...
> def rotamer_dif_frame(request):
>    return render_to_response('rotamer_dif_frame.html',
> request.session, context_instance=RequestContext(request))
> ...
>
> rotamer_dif_frame.htm
>
> {{ rotamer_dif_html }}
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 and saved it under a request.session key. On my template
I simply put {{ key }} and thus I get my result.

Can I ge django to interpret my strinng as HTML?

Heres the relevant code


results.html (template)
...

  Your browser does not support iframes.

...

urls.py
...
(r'^rotamer_diff/$', rotamer_dif_frame),
...

views.py
...
def rotamer_dif_frame(request):
return render_to_response('rotamer_dif_frame.html',
request.session, context_instance=RequestContext(request))
...

rotamer_dif_frame.htm

{{ rotamer_dif_html }}


-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
Ok, I'll try to elaborate. again java is foreign to me although I've
spent all day trying to learn some.
 Here's the code:

def please_wait(request):
   # ... setup context or something
   return render_to_response("please_wait.html")

def run_DHM(request)
   # ... perform calculations and collect the result in a dict
   data = {"result": something}
   return HttpResponse(json.dumps(data), mimetype="application/json")


# using jquery in your html

$.getJSON("/run_DHM/", function(data) {
   // do something with result
   console.log(data.result);
});


def run_DHM(request) is straight forward then it falls apart.

$.getJSON("/run_DHM/", function(data) {
   // do something with result
   console.log(data.result);
});

I presume that '$.getJSON("/run_DHM/", function(data)' somehow runs
the run_DHM function? How can it even find the function since it lives
in view.py? '// do something with result' I want to send another
page to the client with the results but do I do this here? If not,
what do I do here? What does 'console.log(data.result);' do? Why does
def run_DHM(request) return a HttpResponse? I have a template I want
it to return so shouldn't I use render_to_response? Obviously, I am
not getting how the javascript works so I have no idea how to set this
up. I was hoping there was a pythonic solution :).

I hope this explains my utter confusion sufficiently.

Bradley

On Tue, Aug 31, 2010 at 4:12 PM, Alec Shaner  wrote:
> Rolando's suggestion is a pretty straight forward method to achieve what you
> want. You probably need to elaborate where in the process you're having
> trouble (although based on your response maybe it's the 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, Bradley Hintze
>  wrote:
>>
>> I'm getting no where with this, are there any other suggestions on row
>> to render a 'please wait' page while other python works? Can I call a
>> view.my function to run from my 'please wait' template?
>>
>> Please be as elementary as possible as javascript, AJAX, jquery, and
>> the 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 googling to see if I can piece it together. Thanks for
>> > the help!
>> >
>> > On Mon, Aug 30, 2010 at 10:37 PM, Rolando Espinoza 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 this might work:
>> >>>
>> >>> views.py
>> >>>
>> >>> def please_wait(request):
>> >>>    return HttpResponse('Please Wait..')
>> >>>
>> >>> def run_DHM(request):
>> >>>    please_wait(request)
>> >>>    lengthy calculations...
>> >>>
>> >>> This did not show the 'Please Wait' page. Is there a better way to do
>> >>> what I am trying to do?
>> >>>
>> >>
>> >> You are not returning the HttpResponse object from please_wait(). But
>> >> anyway,
>> >> doesn't work that way. At least with django.
>> >>
>> >> What you can do is render a normal html with the message "Please wait",
>> >> then perform an ajax call to start the calculations and finally return
>> >> a json response
>> >> to display the result in the client-side.
>> >>
>> >> Roughly:
>> >>
>> >> def please_wait(request):
>> >>    # ... setup context or something
>> >>    return render_to_response("please_wait.html")
>> >>
>> >> def run_DHM(request)
>> >>    # ... perform calculations and collect the result in a dict
>> >>    data = {"result": something}
>> >>    return HttpResponse(json.dumps(data), mimetype="application/js

Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
I'm getting no where with this, are there any other suggestions on row
to render a 'please wait' page while other python works? Can I call a
view.my function to run from my 'please wait' template?

Please be as elementary as possible as javascript, AJAX, jquery, and
the 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 googling to see if I can piece it together. Thanks for
> the help!
>
> On Mon, Aug 30, 2010 at 10:37 PM, Rolando Espinoza 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 this might work:
>>>
>>> views.py
>>>
>>> def please_wait(request):
>>>    return HttpResponse('Please Wait..')
>>>
>>> def run_DHM(request):
>>>    please_wait(request)
>>>    lengthy calculations...
>>>
>>> This did not show the 'Please Wait' page. Is there a better way to do
>>> what I am trying to do?
>>>
>>
>> You are not returning the HttpResponse object from please_wait(). But anyway,
>> doesn't work that way. At least with django.
>>
>> What you can do is render a normal html with the message "Please wait",
>> then perform an ajax call to start the calculations and finally return
>> a json response
>> to display the result in the client-side.
>>
>> Roughly:
>>
>> def please_wait(request):
>>    # ... setup context or something
>>    return render_to_response("please_wait.html")
>>
>> def run_DHM(request)
>>    # ... perform calculations and collect the result in a dict
>>    data = {"result": something}
>>    return HttpResponse(json.dumps(data), mimetype="application/json")
>>
>>
>> # using jquery in your html
>> 
>> $.getJSON("/run_DHM/", function(data) {
>>    // do something with result
>>    console.log(data.result);
>> });
>> 
>>
>>
>> Rolando Espinoza La fuente
>> www.insophia.com
>>
>>> --
>>> Bradley J. Hintze
>>> Graduate Student
>>> Duke University
>>> School of Medicine
>>> 801-712-8799
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Django users" group.
>>> To post to this group, send email to django-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Please wait page trouble

2010-08-31 Thread Bradley Hintze
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 googling to see if I can piece it together. Thanks for
the help!

On Mon, Aug 30, 2010 at 10:37 PM, Rolando Espinoza 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 this might work:
>>
>> views.py
>>
>> def please_wait(request):
>>    return HttpResponse('Please Wait..')
>>
>> def run_DHM(request):
>>    please_wait(request)
>>    lengthy calculations...
>>
>> This did not show the 'Please Wait' page. Is there a better way to do
>> what I am trying to do?
>>
>
> You are not returning the HttpResponse object from please_wait(). But anyway,
> doesn't work that way. At least with django.
>
> What you can do is render a normal html with the message "Please wait",
> then perform an ajax call to start the calculations and finally return
> a json response
> to display the result in the client-side.
>
> Roughly:
>
> def please_wait(request):
>    # ... setup context or something
>    return render_to_response("please_wait.html")
>
> def run_DHM(request)
>    # ... perform calculations and collect the result in a dict
>    data = {"result": something}
>    return HttpResponse(json.dumps(data), mimetype="application/json")
>
>
> # using jquery in your html
> 
> $.getJSON("/run_DHM/", function(data) {
>    // do something with result
>    console.log(data.result);
> });
> 
>
>
> Rolando Espinoza La fuente
> www.insophia.com
>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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):
please_wait(request)
lengthy calculations...


This did not show the 'Please Wait' page. Is there a better way to do
what I am trying to do?

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 seem to get my image up.
>
> hpptd.conf
>
> #WSGI stuff
> #
> Alias /media/ 
> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/
>
>  /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media>
> Order deny,allow
> Allow from all
> 
>
> WSGIScriptAlias /
> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/django.wsgi
>
>  /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache>
> Order deny,allow
> Allow from all
> 
>
> base.html
> ...
>
> 
>  
> 
>
> settings.py
>
> ...
> MEDIA_ROOT = 
> '/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/'
> MEDIA_URL = 'http://summit.research.duhs.duke.edu/media/'
> ...
>
> 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:
>>> On Aug 30, 7:26 pm, Bradley Hintze 
>>> wrote:
>>>> 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 server the server quit and would not restart. The
>>>> error log did'nt give any info as to why.
>>>>
>>>> I tried this (http://oebfare.com/blog/2007/dec/31/django-and-static-files/)
>>>> which is very similar to the Django documentation but I get the same
>>>> results as described above.
>>>>
>>>> Here are my httpd.contf settings.
>>>>
>>>> #Serving media files for django
>>>> 
>>>>     SetHandler python-program
>>>>     PythonHandler django.core.handlers.modpython
>>>>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>>>>     PythonDebug On
>>>> 
>>>>
>>>> 
>>>>     SetHandler None
>>>> 
>>>>
>>>> Alias /site_media/
>>>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media
>>>> 
>>>>     SetHandler None
>>>> 
>>>>
>>>> WSGIScriptAlias /
>>>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/djang
>>>>  o.wsgi
>>>>
>>>> >>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache>
>>>> Order deny,allow
>>>> Allow from all
>>>> 
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> Bradley J. Hintze
>>>> Graduate Student
>>>> Duke University
>>>> School of Medicine
>>>> 801-712-8799
>>>
>>> Some weird stuff in that configuration file. You have directives for
>>> both mod_python and mod_wsgi. Which one are you using? (mod_wsgi is
>>> *strongly* recommended over mod_python.)
>>> --
>>> DR.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Django users" group.
>>> To post to this group, send email to django-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>>
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: static files

2010-08-30 Thread Bradley Hintze
OK,

I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
and still sant seem to get my image up.

hpptd.conf

#WSGI stuff
#
Alias /media/ 
/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/


Order deny,allow
Allow from all


WSGIScriptAlias /
/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/django.wsgi


Order deny,allow
Allow from all


base.html
...


  


settings.py

...
MEDIA_ROOT = 
'/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/'
MEDIA_URL = 'http://summit.research.duhs.duke.edu/media/'
...

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:
>> On Aug 30, 7:26 pm, Bradley Hintze 
>> wrote:
>>> 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 server the server quit and would not restart. The
>>> error log did'nt give any info as to why.
>>>
>>> I tried this (http://oebfare.com/blog/2007/dec/31/django-and-static-files/)
>>> which is very similar to the Django documentation but I get the same
>>> results as described above.
>>>
>>> Here are my httpd.contf settings.
>>>
>>> #Serving media files for django
>>> 
>>>     SetHandler python-program
>>>     PythonHandler django.core.handlers.modpython
>>>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>>>     PythonDebug On
>>> 
>>>
>>> 
>>>     SetHandler None
>>> 
>>>
>>> Alias /site_media/
>>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media
>>> 
>>>     SetHandler None
>>> 
>>>
>>> WSGIScriptAlias /
>>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/djang 
>>> o.wsgi
>>>
>>> >> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache>
>>> Order deny,allow
>>> Allow from all
>>> 
>>>
>>> Any help would be appreciated.
>>>
>>> Thanks
>>>
>>> --
>>> Bradley J. Hintze
>>> Graduate Student
>>> Duke University
>>> School of Medicine
>>> 801-712-8799
>>
>> Some weird stuff in that configuration file. You have directives for
>> both mod_python and mod_wsgi. Which one are you using? (mod_wsgi is
>> *strongly* recommended over mod_python.)
>> --
>> DR.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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 server the server quit and would not restart. The
>> error log did'nt give any info as to why.
>>
>> I tried this (http://oebfare.com/blog/2007/dec/31/django-and-static-files/)
>> which is very similar to the Django documentation but I get the same
>> results as described above.
>>
>> Here are my httpd.contf settings.
>>
>> #Serving media files for django
>> 
>>     SetHandler python-program
>>     PythonHandler django.core.handlers.modpython
>>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>>     PythonDebug On
>> 
>>
>> 
>>     SetHandler None
>> 
>>
>> Alias /site_media/
>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media
>> 
>>     SetHandler None
>> 
>>
>> WSGIScriptAlias /
>> /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/djang 
>> o.wsgi
>>
>> > /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache>
>> Order deny,allow
>> Allow from all
>> 
>>
>> Any help would be appreciated.
>>
>> Thanks
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>
> Some weird stuff in that configuration file. You have directives for
> both mod_python and mod_wsgi. Which one are you using? (mod_wsgi is
> *strongly* recommended over mod_python.)
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 server the server quit and would not restart. The
error log did'nt give any info as to why.

I tried this (http://oebfare.com/blog/2007/dec/31/django-and-static-files/)
which is very similar to the Django documentation but I get the same
results as described above.

Here are my httpd.contf settings.

#Serving media files for django

SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonDebug On



SetHandler None


Alias /site_media/
/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media

SetHandler None


WSGIScriptAlias /
/Users/bradleyhintze/djcode/production/MolProbity_Compare_test/apache/django.wsgi


Order deny,allow
Allow from all


Any help would be appreciated.

Thanks

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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). However, when I run it on
apache it seems, from the error page (i have debug on), that I cannot
pass global variables between view.py functions (maybe apache 'calls'
a fresh 'instance' of views.py making the old variables 'unavailable'
(please excuse any errors in my attempts to use correct vocabulary).
Does this mak sense? if so, Is there a way around this such that I can
use variables created in on view function in another?

Bradley

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template not found

2010-08-27 Thread Bradley Hintze
LOL and grr,

I wish I had posted my solution. I'm getting the same error,
TemplateDoesNotExist. I look at my settings for my template directory,
look in that directory and there is the template that it says does not
exist! Very frustrating! I did move my directory but (thought) I
changed 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!
>>
>> You're keeping us all in suspense :-)
>>
>> Next time, could you add a one-line summary of the eventual solution?
>> There will be people with similar problems that google your post in
>> 2012.  They'll want more than a "got it" :-)
>>
> Or at least give us some hintze ... sorry, you'll have heard that one a
> million times before.
>
> regards
>  Steve
> --
> DjangoCon US 2010 September 7-9 http://djangocon.us/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template not found

2010-08-27 Thread Bradley Hintze
Figured it out. But still 'gr!'

So whenever I change a file and save it the stupid computer
automatically changes ownership back to me instead of keeping www as
owner. Thus apache couldn't 'see' my ne settings. As admin being the
group with read/write permissions I thought 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 same error,
> TemplateDoesNotExist. I look at my settings for my template directory,
> look in that directory and there is the template that it says does not
> exist! Very frustrating! I did move my directory but (thought) I
> changed 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!
>>>
>>> You're keeping us all in suspense :-)
>>>
>>> Next time, could you add a one-line summary of the eventual solution?
>>> There will be people with similar problems that google your post in
>>> 2012.  They'll want more than a "got it" :-)
>>>
>> Or at least give us some hintze ... sorry, you'll have heard that one a
>> million times before.
>>
>> regards
>>  Steve
>> --
>> DjangoCon US 2010 September 7-9 http://djangocon.us/
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'.,
> referer: http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] Traceback
> (most recent call last):, referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
> "/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py", line
> 230, in __call__, referer: http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
> self.load_middleware(), referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
> "/Library/Python/2.6/site-packages/django/core/handlers/base.py", line
> 33, in load_middleware, referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]     for
> middleware_path in settings.MIDDLEWARE_CLASSES:, referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
> "/Library/Python/2.6/site-packages/django/utils/functional.py", line
> 276, in __getattr__, referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
> self._setup(), referer: http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
> "/Library/Python/2.6/site-packages/django/conf/__init__.py", line 40,
> in _setup, referer: http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
> self._wrapped = Settings(settings_module), referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
> "/Library/Python/2.6/site-packages/django/conf/__init__.py", line 75,
> in __init__, referer: http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]     raise
> ImportError("Could not import settings '%s' (Is it on sys.path? Does
> it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)), referer:
> http://summit.research.duhs.duke.edu/home/
> [Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
> ImportError: Could not import settings
> 'MolProbity_Compare_test.settings' (Is it on sys.path? Does it have
> syntax errors?): No module named settings, referer:
> http://summit.research.duhs.duke.edu/home/
>
> I do have it on the sys.path in django.wsgi, here it is:
>
> import os
> import sys
> sys.path.append('/Users/bradleyhintze/djcode')
> sys.path.append('/Users/bradleyhintze/djcode/MolProbity_Compare_test')
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'MolProbity_Compare_test.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> Any ideas??
> Thanks,
> Bradley
>
> On Thu, Aug 26, 2010 at 2:50 PM, Piotr Kilczuk  wrote:
>> Hi,
>>
>> If you need to debug, set DEBUG to True, obviously...
>>
>> Second thing - what is your TEMPLATE_DIRS and TEMPLATE_LOADERS setting?
>>
>> Regards,
>> Piotr
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] Traceback
(most recent call last):, referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py", line
230, in __call__, referer: http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
self.load_middleware(), referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/core/handlers/base.py", line
33, in load_middleware, referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] for
middleware_path in settings.MIDDLEWARE_CLASSES:, referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/utils/functional.py", line
276, in __getattr__, referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
self._setup(), referer: http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/conf/__init__.py", line 40,
in _setup, referer: http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
self._wrapped = Settings(settings_module), referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/conf/__init__.py", line 75,
in __init__, referer: http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251] raise
ImportError("Could not import settings '%s' (Is it on sys.path? Does
it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)), referer:
http://summit.research.duhs.duke.edu/home/
[Thu Aug 26 14:50:50 2010] [error] [client 152.16.223.251]
ImportError: Could not import settings
'MolProbity_Compare_test.settings' (Is it on sys.path? Does it have
syntax errors?): No module named settings, referer:
http://summit.research.duhs.duke.edu/home/

I do have it on the sys.path in django.wsgi, here it is:

import os
import sys
sys.path.append('/Users/bradleyhintze/djcode')
sys.path.append('/Users/bradleyhintze/djcode/MolProbity_Compare_test')

os.environ['DJANGO_SETTINGS_MODULE'] = 'MolProbity_Compare_test.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Any ideas??
Thanks,
Bradley

On Thu, Aug 26, 2010 at 2:50 PM, Piotr Kilczuk  wrote:
> Hi,
>
> If you need to debug, set DEBUG to True, obviously...
>
> Second thing - what is your TEMPLATE_DIRS and TEMPLATE_LOADERS setting?
>
> Regards,
> Piotr
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template not found

2010-08-26 Thread Bradley Hintze
I forgot to include the error_log message:

[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] mod_wsgi
(pid=938): Exception occurred processing WSGI script
'/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'.
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] Traceback
(most recent call last):
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/core/handlers/wsgi.py", line
241, in __call__
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]
response = self.get_response(request)
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/core/handlers/base.py", line
130, in get_response
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] return
self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/core/handlers/base.py", line
181, in handle_uncaught_exception
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] return
callback(request, **param_dict)
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/views/defaults.py", line 23,
in server_error
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251] t =
loader.get_template(template_name) # You need to create a 500.html
template.
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]   File
"/Library/Python/2.6/site-packages/django/template/loader.py", line
157, in get_template
[Thu Aug 26 17:41:27 2010] [error] [client 152.16.223.251]
template, origin = find_template(template_name)
[Thu Aug 26 17:41:27 2010] [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]
TemplateDoesNotExist: 500.html

On Thu, Aug 26, 2010 at 1:51 PM, Bradley Hintze
 wrote:
> 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 not be finding my other templates. I've
> checked my settings.py aand the template path is set correctly. Could
> there be something else going on?
>
> Thanks
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 not be finding my other templates. I've
checked my settings.py aand the template path is set correctly. Could
there be something else going on?

Thanks

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 denied: mod_wsgi (pid=594, process='',
> application='summit.research.duhs.duke.edu|'): Call to fopen() failed
> for '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'.
> [Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] mod_wsgi
> (pid=594): Exception occurred processing WSGI script
> '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/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 /media/ /Users/bradleyhintze/django/MolProbity_Compare_test/media/
>>
>> 
>> Order deny,allow
>> Allow from all
>> 
>>
>> WSGIScriptAlias /
>> /Users/bradleyhintze/django/MolProbity_Compare_test/apache/django.wsgi
>>
>> 
>> Order deny,allow
>> Allow from all
>> 
>>
>> Error_log
>>
>> [Thu Aug 26 11:27:15 2010] [error] [client 152.16.223.251] client
>> denied by server configuration: /Users/bradleyhintze/django
>> [Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
>> denied by server configuration: /Users/bradleyhintze/django
>> [Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
>> denied by server configuration: /Users/bradleyhintze/django
>>
>> permission set for   /Users/bradleyhintze/django
>>
>> drwxr-x--x    7 _www           admin   238 Aug 26 09:19 djcode
>>
>> permission set for   /Users/bradleyhintze/django/MolProbity_Compae_test
>>
>> drwxrwx--x  22 _www           admin  748 Aug 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 correctly. However, I am having permission issues. I
>>> have been exposed to but am no entirely comfortable with permissions
>>> and ownership. Here is what I get when I go to my site:
>>>
>>> Forbidden
>>>
>>> You don't have permission to access / on this server.
>>>
>>> I assume 'mysite' directory needs to be owned by www? What about the
>>> files and directories within 'mysite'? What about permissions?
>>>
>>> Any help and/direction will be greatly appreciated.
>>>
>>> Thanks,
>>>
>>> Bradley
>>>
>>
>>
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
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 denied: mod_wsgi (pid=594, process='',
application='summit.research.duhs.duke.edu|'): Call to fopen() failed
for '/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/django.wsgi'.
[Thu Aug 26 12:30:25 2010] [error] [client 152.16.223.251] mod_wsgi
(pid=594): Exception occurred processing WSGI script
'/Users/bradleyhintze/djcode/MolProbity_Compare_test/apache/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 /media/ /Users/bradleyhintze/django/MolProbity_Compare_test/media/
>
> 
> Order deny,allow
> Allow from all
> 
>
> WSGIScriptAlias /
> /Users/bradleyhintze/django/MolProbity_Compare_test/apache/django.wsgi
>
> 
> Order deny,allow
> Allow from all
> 
>
> Error_log
>
> [Thu Aug 26 11:27:15 2010] [error] [client 152.16.223.251] client
> denied by server configuration: /Users/bradleyhintze/django
> [Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
> denied by server configuration: /Users/bradleyhintze/django
> [Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
> denied by server configuration: /Users/bradleyhintze/django
>
> permission set for   /Users/bradleyhintze/django
>
> drwxr-x--x    7 _www           admin   238 Aug 26 09:19 djcode
>
> permission set for   /Users/bradleyhintze/django/MolProbity_Compae_test
>
> drwxrwx--x  22 _www           admin  748 Aug 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 correctly. However, I am having permission issues. I
>> have been exposed to but am no entirely comfortable with permissions
>> and ownership. Here is what I get when I go to my site:
>>
>> Forbidden
>>
>> You don't have permission to access / on this server.
>>
>> I assume 'mysite' directory needs to be owned by www? What about the
>> files and directories within 'mysite'? What about permissions?
>>
>> Any help and/direction will be greatly appreciated.
>>
>> Thanks,
>>
>> Bradley
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: permissions and ownership

2010-08-26 Thread Bradley Hintze
Here are some more details.

httpd.conf

Alias /media/ /Users/bradleyhintze/django/MolProbity_Compare_test/media/


Order deny,allow
Allow from all


WSGIScriptAlias /
/Users/bradleyhintze/django/MolProbity_Compare_test/apache/django.wsgi


Order deny,allow
Allow from all


Error_log

[Thu Aug 26 11:27:15 2010] [error] [client 152.16.223.251] client
denied by server configuration: /Users/bradleyhintze/django
[Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
denied by server configuration: /Users/bradleyhintze/django
[Thu Aug 26 11:27:16 2010] [error] [client 152.16.223.251] client
denied by server configuration: /Users/bradleyhintze/django

permission set for   /Users/bradleyhintze/django

drwxr-x--x7 _www   admin   238 Aug 26 09:19 djcode

permission set for   /Users/bradleyhintze/django/MolProbity_Compae_test

drwxrwx--x  22 _www   admin  748 Aug 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 correctly. However, I am having permission issues. I
> have been exposed to but am no entirely comfortable with permissions
> and ownership. Here is what I get when I go to my site:
>
> Forbidden
>
> You don't have permission to access / on this server.
>
> I assume 'mysite' directory needs to be owned by www? What about the
> files and directories within 'mysite'? What about permissions?
>
> Any help and/direction will be greatly appreciated.
>
> Thanks,
>
> Bradley
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 is what I get when I go to my site:

Forbidden

You don't have permission to access / on this server.

I assume 'mysite' directory needs to be owned by www? What about the
files and directories within 'mysite'? What about permissions?

Any help and/direction will be greatly appreciated.

Thanks,

Bradley

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 intermediate page that says something to the effect of
'finding flights.' I'm not sure what term to google for this query. If
you can point me in the right direction I'd appreciate it.

Thanks
Bradley
-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 at 10:35 AM, Bradley Hintze
>  wrote:
>>
>> I am sorry. I am using render to response.
>>
>>  #view.py
>>
>> def math_form(request):
>>    return render_to_response('form.html')
>>
>> #base.html
>>
>> 
>> 
>> 
>>    {% block title %}{% endblock %}
>> 
>> 
>> 
>>    {% block header %}{% endblock %}
>>    Please enter two numbers to add them.
>>    {% block content %}{% 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?
>> >
>> > are you using render_to_response()?  can't comment on your code if you
>> > don't show it
>> >
>> > --
>> > Javier
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/django-users?hl=en.
>> >
>> >
>>
>>
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Greg Pelly
> CEO / CTO, Munchly Inc.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying images

2010-08-19 Thread Bradley Hintze
I am sorry. I am using render to response.

 #view.py

def math_form(request):
return render_to_response('form.html')

#base.html




{% block title %}{% endblock %}



{% block header %}{% endblock %}
Please enter two numbers to add them.
{% block content %}{% 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?
>
> are you using render_to_response()?  can't comment on your code if you
> don't show it
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 me for a loop.
>>
> The context is what provide the variables that become available for use
> inside curly braces in the template. The render_to_response() function
> allows you to provide additional context through its "context_instance"
> argument. By creating a RequestContext form the request and passing it
> to render_to_response() you ensure that MEDIA_URL is available to the
> template.
>
> regards
>  Steve
>
>
>> 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 it looks as if you're right, the template isn't gettng the
>>>> MEDIA_URL variable.
>>>> I thought this was taken care of in setttings.py (see previous
>>>> messages). Does something need to be done in url.py?
>>>
>>>
>>> no, it's done on a context processor:
>>> http://docs.djangoproject.com/en/1.2/ref/templates/api/#playing-with-context-objects
>>>
>>> most template-handling shortcuts and generic view automatically apply
>>> the default set of context processors; but one notable exception is
>>> render_to_response().  if you're using it, it's better to create the
>>> context yourself as shown in the note:
>>>
>>> render_to_response('my_template.html',
>>>                              my_data_dictionary,
>>>                              context_instance=RequestContext(request))
>>>
>>>
>>>
>>> --
>>> Javier
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Django users" group.
>>> To post to this group, sendemail to django-us...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>
>>
>>
>
>
> --
> DjangoCon US 2010 September 7-9 http://djangocon.us/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 it looks as if you're right, the template isn't gettng the
>> MEDIA_URL variable.
>> I thought this was taken care of in setttings.py (see previous
>> messages). Does something need to be done in url.py?
>
>
> no, it's done on a context processor:
> http://docs.djangoproject.com/en/1.2/ref/templates/api/#playing-with-context-objects
>
> most template-handling shortcuts and generic view automatically apply
> the default set of context processors; but one notable exception is
> render_to_response().  if you're using it, it's better to create the
> context yourself as shown in the note:
>
> render_to_response('my_template.html',
>                              my_data_dictionary,
>                              context_instance=RequestContext(request))
>
>
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying images

2010-08-19 Thread Bradley Hintze
Ok, I appreciate your patiencce!

here what the generated HTML loos like

...

...

so it looks as if you're right, the template isn't gettng the
MEDIA_URL variable.
I thought this was taken care of in setttings.py (see previous
messages). Does something need to be done in url.py?

On Thu, 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.  if you show
> the generated HTML it would be easier to help
>
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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:
>
> 
>
> --
> Javier
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Displaying images

2010-08-19 Thread Bradley Hintze
By broken I mean i get the little square 'boren image' symbol (I am
not sure the official name, sorry I can't be more specific). What do
you mean by 'MEDIA_URL isn't being included in the request context.'
do I deed to do something in url.py and/or views.py for my 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
>> running the local server. Here is my code:
>>
>> #settings.py
>> ...
>> MEDIA_ROOT = '/Users/bradleyhintze/djcode/my_try/media/'
>> MEDIA_URL = 'media/'
>> ...
>>
>> base.html
>> ...
>> 
>> ...
>>
>> All the base.html code shows as expected but the image is broken. Any ideas?
>>
> Define "broken" - specifically, what shows up in the generated HTML
> there? It's possible that MEDIA_URL isn't being included in the request
> context.
>
> regards
>  Steve
> --
> DjangoCon US 2010 September 7-9 http://djangocon.us/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
...

...

All the base.html code shows as expected but the image is broken. Any ideas?

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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, in get_config
libs = mysql_config("libs_r")
  File "/Users/bradleyhintze/Desktop/MySQL-python-1.2.3/setup_posix.py",
line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found


There is a lot of supposed help online for this but after a few hors
of googling I have yet to find mysql_config on my machine. Is there
another package that I must install first?

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
>> seem to learn by example. I am trying to make an form for uploading
>> files but no matter how many times I read the documentation I cant
>> seem to get the form to the client, let alone how to store the file.
>> Do you know how to get 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 of these and THEN you get
>> >> something that you can send to the client. It's very confusing! How do
>> >> they tie together? I probably need to do the tutorial again. It seems
>> >> to me getting 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...
>>
>> > It's actually pretty simple and logical. Here is a possibly over-simplified
>> > overview.
>>
>> > models.py is where you model your problem. If you have an entity "Books",
>> > you would have a Book model along with its attributes. From this model,
>> > Django will generate the database objects once you run syncdb.
>>
>> > urls.py is the place where you specify what happens when a particular URL 
>> > is
>> > requested. Django goes down the list of your regular expressions in there
>> > until it finds a match (or doesn't). Once it finds a match, the request is
>> > passed to the view function for that match. If it doesn't find a match,
>> > Django raises a 404 exception.
>>
>> > views.py is where you have the various functions that are invoked from
>> > urls.py handle the requests and pass the results to templates.
>>
>> > The templates are just HTML files with special tags embedded in them. Think
>> > of the tags as "holes" on the page that will eventually get filled by the
>> > data coming from view functions.
>>
>> > The Django framework ties all this together. For the purpose of the 
>> > tutorial
>> > and for writing apps, you really don't need to know the details of how it
>> > does that but of course if you want to, you can.
>> > --
>> > Regards,
>>
>> > Clifford Ilkay
>> > Dinamis
>> > 1419-3266 Yonge St.
>> > Toronto, ON
>> > Canada  M4N 3P6
>>
>> > <http://dinamis.com>
>> > +1 416-410-3326
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Django users" group.
>> > To post to this group, send email to django-us...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > django-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/django-users?hl=en.
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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

2010-07-08 Thread Bradley Hintze
Thanks, that helps but I wish Django had more tutorial than one. I
seem to learn by example. I am trying to make an form for uploading
files but no matter how many times I read the documentation I cant
seem to get the form to the client, let alone how to store the file.
Do you know how to get 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 of these and THEN you get
>> something that you can send to the client. It's very confusing! How do
>> they tie together? I probably need to do the tutorial again. It seems
>> to me getting 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...
>
> It's actually pretty simple and logical. Here is a possibly over-simplified
> overview.
>
> models.py is where you model your problem. If you have an entity "Books",
> you would have a Book model along with its attributes. From this model,
> Django will generate the database objects once you run syncdb.
>
> urls.py is the place where you specify what happens when a particular URL is
> requested. Django goes down the list of your regular expressions in there
> until it finds a match (or doesn't). Once it finds a match, the request is
> passed to the view function for that match. If it doesn't find a match,
> Django raises a 404 exception.
>
> views.py is where you have the various functions that are invoked from
> urls.py handle the requests and pass the results to templates.
>
> The templates are just HTML files with special tags embedded in them. Think
> of the tags as "holes" on the page that will eventually get filled by the
> data coming from view functions.
>
> The Django framework ties all this together. For the purpose of the tutorial
> and for writing apps, you really don't need to know the details of how it
> does that but of course if you want to, you can.
> --
> Regards,
>
> Clifford Ilkay
> Dinamis
> 1419-3266 Yonge St.
> Toronto, ON
> Canada  M4N 3P6
>
> <http://dinamis.com>
> +1 416-410-3326
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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

2010-07-08 Thread Bradley Hintze
I guess I just don't like the model.py, views.py, templates, and
url.py. In the tutorial you have to edit all of these and THEN you get
something that you can send to the client. It's very confusing! How do
they tie together? I probably need to do the tutorial again. It seems
to me getting 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 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 (seehttp://docs.djangoproject.com/en/dev/topics/forms/).  I 
>> am not
>> interested in admin sites, they make things easier but I am interested
>> in learning the code (i.e. the HTML and how it communicates with
>> python) rather than, in my view, just blackbox automation.
>>
>> I hope this makes sense. Please tell me if it doesn't.  I want to
>> simply upload a file and then process the file using code I already
>> have. I would like to write the HTML code myself rather then having
>> django automatically do it. This is because I want to learn how to
>> process forms and not have a black box do everything for me. Are there
>> methods to simply get post data from a form that I write rather the
>> django automatically creating it (an example maybe)? are models
>> necessary for what I'm explaining? Is django right for what I'm
>> explaining?
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>
> Django doesn't write any HTML for you. The admin is an automatically-
> created system, true, but that has nothing to do with the pages you
> serve to your users. And the forms documentation you point to shows
> how to generate a form and display it in the template without
> 'automatically creating it' - is there anything here:
> http://docs.djangoproject.com/en/dev/topics/forms/#customizing-the-form-template
> that doesn't make sense to you? The only thing 'automatic' about that
> example is that you type {{ form.subject }} and Django outputs  id="id_subject">.
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
http://docs.djangoproject.com/en/dev/topics/forms/).  I am not
interested in admin sites, they make things easier but I am interested
in learning the code (i.e. the HTML and how it communicates with
python) rather than, in my view, just blackbox automation.

I hope this makes sense. Please tell me if it doesn't.  I want to
simply upload a file and then process the file using code I already
have. I would like to write the HTML code myself rather then having
django automatically do it. This is because I want to learn how to
process forms and not have a black box do everything for me. Are there
methods to simply get post data from a form that I write rather the
django automatically creating it (an example maybe)? are models
necessary for what I'm explaining? Is django right for what I'm
explaining?

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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.
>>
>> 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:
>> ^testForms/ ^$
>> ^testForms/ ^/contact/$
>> The current URL, testForms/contact, didn't match any of these.
>>
>> It should match the second one right??
>>
>> Here is my url.py
>>
>> from django.conf.urls.defaults import *
>>
>> urlpatterns = patterns('testing123.testForms.views',
>>     (r'^$', 'index'),
>>     (r'^/contact/$', 'contact'),
>> )
>>
>> I hope thats enough info.
>>
>> Any ideaaas?
>> Thanks,
>> Bradley
>>
>
> You don't want the leading slash.
>
>     (r'^contact/$', 'contact'),
>
> --
> DR.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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:
^testForms/ ^$
^testForms/ ^/contact/$
The current URL, testForms/contact, didn't match any of these.


It should match the second one right??


Here is my url.py

from django.conf.urls.defaults import *

urlpatterns = patterns('testing123.testForms.views',
(r'^$', 'index'),
(r'^/contact/$', 'contact'),
)

I hope thats enough info.

Any ideaaas?
Thanks,
Bradley


-- 
Bradley J. Hintze
Graduate Student

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache config trouble

2010-07-07 Thread Bradley Hintze
BINGO.

Thanks! The newbie didn't think of the syntax error being in the file,
thought it was in httpd.conf. Found it, fixed it, all is well. I'm
sure I'll be posting more.

Thanks for the help again,
Bradley

On Wed, Jul 7, 2010 at 10:06 AM, Nuno Maltez  wrote:
> Hi,
>
> 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 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]   File
>> "/Library/WebServer/testing123/apache/django.wsgi", line 9
>> [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]
>> [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]     ^
>> [Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]
>> SyntaxError: invalid syntax
>>
>>
>>
>> Here is what I have in httpd.conf:
>>
>> #WSGI stuff
>> WSGIScriptAlias / /Library/WebServer/testing123/apache/django.wsgi
>>
>> 
>> Order deny,allow
>> Allow from all
>> 
>> #
>>
>> I am not seeing the 'invalid syntax.'
>>
>> Ane help would be appreciated
>>
>> --
>> Bradley J. Hintze
>> Graduate Student
>> Duke University
>> School of Medicine
>> 801-712-8799
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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]   File
"/Library/WebServer/testing123/apache/django.wsgi", line 9
[Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]
[Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251] ^
[Wed Jul 07 09:53:12 2010] [error] [client 152.16.223.251]
SyntaxError: invalid syntax



Here is what I have in httpd.conf:

#WSGI stuff
WSGIScriptAlias / /Library/WebServer/testing123/apache/django.wsgi


Order deny,allow
Allow from all

#

I am not seeing the 'invalid syntax.'

Ane help would be appreciated

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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
> the polls app and the admin app.
>
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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

Any ideas?


-- 
Bradley J. Hintze

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 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:
>> The easiest solution I've found is to just install it with pip.
>>
>> Download the tarball for the version you want then run pip install filename.
>>
>> Of course you'll need to prefix that with sudo if you're installing it 
>> system-wide, but I recommend virtualenv.
>>
>> I use a Mac for development full-time and don't have any problems setting up 
>> in a fresh OS X install, compared to setting up an environment on our Linux 
>> servers. Other than a bit of hassle getting psycopg2 (the PostgreSQL module) 
>> to compile, but that's easily solved.
>>
>> Shawn
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
>
> --
> Bradley J. Hintze
> Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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:
> The easiest solution I've found is to just install it with pip.
>
> Download the tarball for the version you want then run pip install filename.
>
> Of course you'll need to prefix that with sudo if you're installing it 
> system-wide, but I recommend virtualenv.
>
> I use a Mac for development full-time and don't have any problems setting up 
> in a fresh OS X install, compared to setting up an environment on our Linux 
> servers. Other than a bit of hassle getting psycopg2 (the PostgreSQL module) 
> to compile, but that's easily solved.
>
> Shawn
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>



-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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-admin.py startproject
mysite' with no luck (-bash: django-admin.py: command not found). Any
help (whithout negative remarks) would be appreciated.

Thank you

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



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 my computer.

any idea?

-- 
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.