Re: Django querysets and postgresql views

2014-03-18 Thread Cherrymae Tulfo
if Postgresql view is made within Postgresql, i mean by not making in django models, would still Django access these data? On Tuesday, March 18, 2014 9:10:04 PM UTC+8, esatte...@wi.rr.com wrote: > > Yes you can. Just create the view however you like. Make a django model > with the fields that m

F() expression not compatible with __range field look up

2014-03-18 Thread Adonis Liu
*platform:* Django-1.5, python2.7 *code:* class TestModel(models.Model): a = models.SmallIntegerField() b = models.SmallIntegerField() TestModel.objects.filter(a__range=(F('b')-1, F('b')+1) *result:* django.db.models.fields in get_prep_value TypeError: int() argument must be a string or

Django 1.6 and get_search_results

2014-03-18 Thread ReneMarxis
Hello can someone tell me why all 'custom' the GET parameters (except the once used from admin directly like ?q or ?o) are getting removed from the request before get_search_results is called on an admin.ModelAdmin instance? i do see all the GET parameters in get_changelist but they are removed

Client side timestamp handling and timezone

2014-03-18 Thread Yoanis Gil Delgado
Hello there, I've been struggling with this issue for the last few days and I cannot seem to find the way to fix it. I've this web page with a form where a user is requested to enter a date and a time of the day. Then there is a search button which does a JSON post back to the server with certa

RE: [ELI5] how to deploy django

2014-03-18 Thread Sells, Fred
The latest “Two Scoops of Django” book claims to have good info on deploying; I’ve not read it yet. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Walter Wang Sent: Tuesday, March 04, 2014 11:54 AM To: django-users@googlegroups.com Subject: Re: [ELI5] how

Re: Django RequestContext and JQuery.

2014-03-18 Thread Mario Gudelj
Return your context in json format, load it into js var and then use .each() on it. On 19/03/2014 3:27 am, "Kelechi Anyanwu" wrote: > Hi guys! > > How do i use JQuery to loop through a chunk of Django RequestContext being > returned to my template. > > Please i need response!! > > Thanks. > > --

Re: starting a django project

2014-03-18 Thread Bill Freeman
A first guess: Try using "python django-admin.py startproject mysite". That will help if your system isn't configured to automatically use python for this task. If this helps, then later, when you are running manage.py commands, you will also need to prefix them with python. On Tue, Mar 18, 201

starting a django project

2014-03-18 Thread aparajith sundar
HI, i am a first time django user. i have successfully installed django but when i try running this "django-admin.py startproject mysite" code all i get is the django-admin text file! i have tried adding different paths and changing all types of settings but its to no avail.. i am told i should

ImportError: No module named core in django 1.5.5

2014-03-18 Thread Alex Scoble
Hi All, Running CentOS 6.4 with python 2.6.6 and django 1.5.5 Doing this at prompt works: python -c 'import django; print django.VERSION' Returns: (1, 5, 5, 'final', 0) However, running django-admin.py or import django from django.core.management import execute_from_command_line when in Pyth

Django RequestContext and JQuery.

2014-03-18 Thread Kelechi Anyanwu
Hi guys! How do i use JQuery to loop through a chunk of Django RequestContext being returned to my template. Please i need response!! Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Connecting to a MS SQL server from django

2014-03-18 Thread Larry Martell
Fred- I finally got around to trying this. It all worked perfectly until I tried to access the MSSQL server from django. That fails with: mod_wsgi (pid=27541): Exception occurred processing WSGI script '/usr/local/motor/motor/wsgi.py'. Traceback (most recent call last): File "/usr/local/lib/pyt

Re: "Beginning Geo Django: Rich Gis Web Applications With Python" Where can I get the book?

2014-03-18 Thread Alex Mandel
Thats an interesting dilemma. I just looked around a no one has copies. The publisher says "The eBook version of this title will be available soon" http://www.springer.com/computer/book/978-1-4302-2532-4 But I have no idea how long it's said that. This appears to be the ISBN for the printed versi

Re: Django querysets and postgresql views

2014-03-18 Thread m1chael
esatterwhite, that's a great tip! What about raw queries as another option? On Tue, Mar 18, 2014 at 9:10 AM, esatterwh...@wi.rr.com wrote: > Yes you can. Just create the view however you like. Make a django model with > the fields that map to the table the view returns and set the model to > m

Django querysets and postgresql views

2014-03-18 Thread esatterwh...@wi.rr.com
Yes you can. Just create the view however you like. Make a django model with the fields that map to the table the view returns and set the model to managed = false. You can only fetch data and do simple filtering obviously. -- You received this message because you are subscribed to the Google

How to convert SQL Complex QUERY to django QUERY

2014-03-18 Thread Shoaib Ijaz
I am trying to convert sql query to django query but failed to do this, can anyone help me select id,name,round(value::numeric,2) as value, st_transform(geometry, 3857) as geometry from net_rest where state_id in (1,2) and name = 'height' union (select d.id,d.re

Re: How can I upload async files with django-storages

2014-03-18 Thread Rise Riyo
Check out these links: https://devcenter.heroku.com/articles/s3-upload-python https://github.com/flyingsparx/FlaskDirectUploader https://github.com/tadruj/s3upload-coffee-javascript On Tuesday, July 23, 2013 8:27:52 AM UTC-7, Nicolas wrote: > > Hi all, > > I'm doing a web site where the users ca

Re: Skip upload of existing S3 Object

2014-03-18 Thread Rise Riyo
Hi, Chris, Were you able to get this working? I'm in the same situation. I am able to directly upload my files to S3 using S3Upload.js (https://groups.google.com/forum/#!searchin/django-users/s3$20django-storages/django-users/5ltaK8NQ_lw/6hGtCE-oqH8J) and Will's code (https://github.com/flyi