Django API CSRF Issues - Need Help

2016-05-20 Thread Chris Troutner
Hey all, This is my first time posting to the group. I'm working with Bob Hagan on the Network Resource Planning (NRP) project . The platform runs on Django and he's been using the REST API app to open up ports to some of the

Re: Moving django app(nginx server) from iMac to Linux environment

2016-05-20 Thread Fred Stluka
Dhruv, Should be no changes required.  I develop on Mac and just copy my Django files (*.py, *.html, etc.) to my Linux server when I deploy. You said you already have the same Django/gunicorn/nginx installed on both machines, right?  And you did a

Moving django app(nginx server) from iMac to Linux environment

2016-05-20 Thread Dhruv Jain
We have a basic Django(1.4.5) application setup on a linux machine which runs via gunicorn. We have another application which is the main application which we plan to deploy on the linux machine mentioned above, currently runs on an iMac Django/gunicorn/nginx server with Mysql. We have

Django: Fields in inlineformset to display only logged in users Authors

2016-05-20 Thread Pulkit Sharma
How to create new titles for authors using inlineformset factory by selecting authors created by logged in users only. *Models.Py* Model1 user=models.ForeignKey(settings.AUTH_USER_MODEL) Author = models.CharField(max_length=100) Model2

Re: is there any django app for opendata

2016-05-20 Thread Luis Zárate
Sure, I need something like CKAN, I saw it time ago and I forget it. Thanks you. I have not problem if I is not in Django, I like Python too and can learn other frameworks. Thanks you. El viernes, 20 de mayo de 2016, Derek escribió: > Not to discourage you, but there is

Re: get all columns as a list

2016-05-20 Thread Larry Martell
On Fri, May 20, 2016 at 2:26 AM, Gergely Polonkai wrote: > Hello, > > Django can’t do this out of the box, but see this post[1] for a possible > solution with dicts. Well, it seems it can. As pointed out by Erik in another post, an empty values_list() returns all the

Re: get all columns as a list

2016-05-20 Thread Larry Martell
On Fri, May 20, 2016 at 2:23 AM, Erik Cederstrand wrote: > >> Den 20. maj 2016 kl. 00.12 skrev Larry Martell : >> >> This is probably very simple, but I just can't figure out how to do it. >> >> I want to get all the columns in some rows as a

Re: is there any django app for opendata

2016-05-20 Thread Derek
Not to discourage you, but there is already a large Python project called CKAN that tries to do exactly that: make data open and transparent. Its built on Pylons and SQLAlchemy, but maybe it will suit your needs, and maybe you can contribute to improving it, rather than starting a new project

[ANNOUNCE] Django 1.10 alpha 1 released

2016-05-20 Thread Tim Graham
We've made the first release on the way to Django's next major release, Django 1.10! With two and a half months until the scheduled final release, we'll need timely testing from the community to ensure an on-time and stable release. Check out the blog post:

Re: Aggregation / annotation over results of a subquery

2016-05-20 Thread Simon Charette
Hi Malcom, I suggest you look into the conditionnal aggregation documentation[1]. from django.db.models import Case, Count, When Contact.objects.annotate( messages_count=Count( Case(When( messages__recipient=recipient, messages__status=Message.STATUS_UNREAD,

Re: ImportError: No module named south

2016-05-20 Thread Frank Wiles
>From the looks of it, you need to install the requirements for RatticDB. There are 2 setups for MySQL or PostgreSQL listed here https://github.com/tildaslash/RatticWeb For the PG option you'd just run: pip intall -r requirements-pgsql.txt And it will install all of the necessary PIP

Re: django queryset/annotate get extra column

2016-05-20 Thread stunaz
Wonderfull (ps :sorry, I should have put the model) On Friday, May 20, 2016 at 2:40:33 AM UTC-4, James Schneider wrote: > > On Wed, May 18, 2016 at 9:54 PM, stunaz > wrote: > >> Hi, >> I would like to write the following query using django orm. >> >> select * , >> (select

Aggregation / annotation over results of a subquery

2016-05-20 Thread Malcolm Box
Hi all, I'm trying to get the ORM to let me sort things based on an annotation, where that annotation requires a subquery to select items to consider. Concrete example, given models: class Contact(models.Model): name = models.CharField() class Message(models.Model): sender =

ImportError: No module named south

2016-05-20 Thread Priyadharshini S
When i trying to install RatticDB on ubuntu 12.04 I got this error please help me to solve ./manage.py syncdb --noinput Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File

Django-Hive Connectivity and Accessing Tables

2016-05-20 Thread Prem Kumar
I am trying to build an dynamic web framework with hive connectivity keeping python and Django as an back end. Can anyone please tell me what are the requirements or configurations i have to do for django to hive connectivity and how to access the tables from the hive database to showcase

Re: Error: ImportError: No module named south

2016-05-20 Thread Priyadharshini S
On Sunday, August 11, 2013 at 5:00:54 PM UTC+5:30, alekto.a...@gmail.com wrote: > > Hi, > am using django==1.5.1 and south==0.8.2, as well as pip-1.1-py2.7.egg > (python 2.7) > I keep getting this error: ImportError: No module named south, when I run: > sudo python manage.py syncdb. > I have

Re: is there any django app for opendata

2016-05-20 Thread Gergely Polonkai
Hello, what exactly want to achieve? I mean, Open data is not a standard data format you can implement, it’s just the way you make that data accessible. The biggest challenge in this, I think, is keeping the integrity of the data, so everyone sees the same thing at any point in time. Best,

Re: Create account that can either be a person or a group

2016-05-20 Thread James Schneider
> > I want to create user accounts for my website. The account can be either a > person or a group. So for *person* account I want to get different > information from them (such as First name, Last Name, ...), and for > *group* account get different information (such as Group name, ...). >

Re: django queryset/annotate get extra column

2016-05-20 Thread James Schneider
On Wed, May 18, 2016 at 9:54 PM, stunaz wrote: > Hi, > I would like to write the following query using django orm. > > select * , > (select image_url from blog_image bi where bi.blog_id = b.id and bi. > principal=1) as blog_main_imange > from blog b > > > Any idea, how to write

Re: get all columns as a list

2016-05-20 Thread Gergely Polonkai
Hello, Django can’t do this out of the box, but see this post[1] for a possible solution with dicts. You might also want to look at serialization[2]; it might help you a bit, but again, it’s primarily for dicts, not lists. On the other hand, I started wondering why you need this, do you care to

Re: get all columns as a list

2016-05-20 Thread Erik Cederstrand
> Den 20. maj 2016 kl. 00.12 skrev Larry Martell : > > This is probably very simple, but I just can't figure out how to do it. > > I want to get all the columns in some rows as a list. I know I could > use values_list and flat=True and list all the columns, but is that