Since getting mod_wsgi working on Heroku would be impossible for most, this 
sounds like just a Django question and nothing to do with mod_wsgi. I would 
suggest you ask on StackOverflow.

Graham

> On 16 Dec 2018, at 10:17 pm, Joel Mathew <[email protected]> wrote:
> 
> I just started using heroku today. I was testing a web application, and got 
> different results on using django app from local development server and 
> heroku.
> 
> From my local django webserver, the following search yields correct results:
> 
>     from django.db.models import CharField
>     from django.db.models.functions import Lower
>     CharField.register_lookup(Lower, "lower")
>     import logging
>     logger = logging.getLogger('testlogger')
>     logger.info <http://logger.info/>('This is a simple log message')
>     items_set = []
>     if request.method == 'POST':
>         print(request.POST.get)
>         form = CGHSMetaForm(request.POST)
>         name = request.POST.get('name').lower()
>         items_set = CGHSRates.objects.filter(
>             name__lower__contains=name).order_by('name')
>         print(items_set)
>         logger.info <http://logger.info/>(items_set)
>     else:
>         form = CGHSMetaForm()
> 
>     return render(
>         request, 'app/cghs_search.html', {
>             'rnd_num': randomnumber(),       
>             'form': form,
>             'items': items_set,
>         })
> 
> I get the following results:
> 
>     Code
>     Name
>     Rate
>     1098
>     After Mastectomy (Reconstruction)Mammoplasty
>     Rs 13800.0
>     364
>     Local mastectomy-simple
>     Rs 14548.0
>     251
>     Mastoidectomy
>     Rs 17193.0
> 
> On heroku, however, I receive an empty result.
> 
> The database is the default heroku database, a postgre db, defined by the 
> following settings in settings.py:
> 
>     import dj_database_url
>     DATABASES = {'default': 
> dj_database_url.config(default='postgres://kpnbcpyqtxxjqu:2c86exffsdff0d789e7f3b29d70sfsfsffs7be197sffsfsffb...@ec2-53-22-46-10.compute-1.amazonaws.com:5432/dful1l3ra7nknn'
>  
> <http://kpnbcpyqtxxjqu:2c86exffsdff0d789e7f3b29d70sfsfsffs7be197sffsfsffb...@ec2-53-22-46-10.compute-1.amazonaws.com:5432/dful1l3ra7nknn'>)}
> 
> Why does the same database when accessed on different servers yield different 
> queries?
> Sincerely yours,
> 
>  Joel G Mathew
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/modwsgi 
> <https://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to