Re: Django 1.8 data migrations not able to locate related collections

2015-04-17 Thread Pavel Kuchin
Hi A Lee, Can't say for sure but probably it is because your related_name is not unique in core/migrations/0001_initial.py (https://github.com/virtualcommons/vcweb/blob/develop/vcweb/core/migrations/0001_initial.py#L647,

Re: Django 1.8 data migrations not able to locate related collections

2015-04-17 Thread Pavel Kuchin
related models.py lines https://github.com/virtualcommons/vcweb/blob/10f44c3038f70a2e91f3a80704a4ab30c748f3e9/vcweb/core/models.py#L2060 https://github.com/virtualcommons/vcweb/blob/10f44c3038f70a2e91f3a80704a4ab30c748f3e9/vcweb/core/models.py#L2087 Hi A Lee, > > Can't say for sure but probably

Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
socket.gaierror: [Errno -5] No address associated with hostname # server.py import socket import time # create a socket object serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) # get local machine name host = socket.gethostname() port = # bind to the port

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread François Schiettecatte
What is the value of host? François > On Apr 17, 2015, at 7:38 AM, SHINTO PETER wrote: > > socket.gaierror: [Errno -5] No address associated with hostname > > # server.py > import socket > import time > # create a socket object > serversocket = socket.socket(

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
i just want to give host as localhost / 127.0.0.1 On Friday, 17 April 2015 17:15:05 UTC+5:30, François Schiettecatte wrote: > > What is the value of host? > > François > > > On Apr 17, 2015, at 7:38 AM, SHINTO PETER > wrote: > > > > socket.gaierror: [Errno -5] No

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread François Schiettecatte
Well then why do you get it from socket.gethostname() ? Just set it to ‘localhost’. F. > On Apr 17, 2015, at 7:56 AM, SHINTO PETER wrote: > > i just want to give host as localhost / 127.0.0.1 > > On Friday, 17 April 2015 17:15:05 UTC+5:30, François Schiettecatte wrote:

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
socket.gethostname() Return a string containing the hostname of the machine where the Python interpreter is currently executing ie in python documentation so ie used gethostname() On Friday, 17 April 2015 17:31:11 UTC+5:30, François Schiettecatte wrote: > > Well then why do you get it from

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread François Schiettecatte
I know what socket.gethostname() does, we still dont know what it returns on your setup. And the exception you get is about the host name. Note that a host can have multiple host names and socket.gethostname() only returns one, which may not be the one you want to use. By default a machine will

managed=False ignored by migrate

2015-04-17 Thread Drew Ferguson
Hi Trying to use a legacy database with Django 1.8 (specifically Django-1.8-py2.py3-none-any.whl with python2.7) I followed the steps in https://docs.djangoproject.com/en/1.8/howto/legacy-databases/ i.e. "python manage.py inspectdb" and tidyup the resulting models file However when I

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
Thank you François. i got it. i will give gethostbyaddr() or gethostbyname() On Fri, Apr 17, 2015 at 6:15 PM, François Schiettecatte < fschietteca...@gmail.com> wrote: > I know what socket.gethostname() does, we still dont know what it returns > on your setup. And the exception you get is about

Re: invalid literal for int() with base 10 trying to access uploaded image

2015-04-17 Thread Jyothi Naidu
Hi Kelvin, I am also having the similar issue where i am not able to solve it invalid literal for int() with base 10: '' Request Method:POSTRequest URL: http://172.19.7.125:8001/super-admin-dashboard/status-change/Django Version: 1.6Exception Type:ValueErrorException Value: invalid literal

Re: managed=False ignored by migrate

2015-04-17 Thread Drew Ferguson
Erk! My own fault unfortunately, apologies for the noise Some files had gotten left in a migration folder in an app; causing all sorts of confusion evidently All well now... On Fri, 17 Apr 2015 13:51:08 +0100 Drew Ferguson wrote: > Hi > > Trying to use a legacy

Re: invalid literal for int() with base 10 trying to access uploaded image

2015-04-17 Thread Stephen J. Butler
On Fri, Apr 17, 2015 at 8:16 AM, Jyothi Naidu wrote: > > if 'audit_info_manage' in request.POST: > 192 #fullname = Employee.objects.get(emp_id=request.POST['emp_id']) > 193 audit_manage_key = request.POST.get('audit_info_getdata') > 194 if

Difficulty in using windows azure blob services for my project !!

2015-04-17 Thread livelikehimanshu12
Hello friends !! So my project requires me to store images on blob service of windows azure .I am using django in visual studio express . I even have an azure account.. So I wrote the code using a lot help from internet (I was total beginner to django when I started this project ) . My code

Re: Difficulty in using windows azure blob services for my project !!

2015-04-17 Thread Tom Evans
On Fri, Apr 17, 2015 at 3:45 PM, livelikehimanshu12 wrote: > Hello friends !! > So my project requires me to store images on blob service of windows azure > .I am using django in visual studio express . I even have an azure account.. > So I wrote the code using a lot

Re: Django 1.8 data migrations not able to locate related collections

2015-04-17 Thread Markus Holtermann
Hi A Lee, I think I've seen that one before. Can you check if the fix for https://code.djangoproject.com/ticket/24573 resolves the issue? /Markus On Friday, April 17, 2015 at 2:52:26 AM UTC+2, A Lee wrote: > > Hello, > > After upgrading to 1.8 from 1.7.7 our tests are now unable to create test

DurationField with default value

2015-04-17 Thread Mathijs Jonker
Hi, I'm trying to figure out how to use a default value with a duration field. When I use *time_passed = models.DurationField(default=0)*: * Migrations work * Form defaults *don't* work *'int' object has no attribute 'total_seconds'* When I use *time_passed =

Re: Difficulty in using windows azure blob services for my project !!

2015-04-17 Thread HIMANSHU RANJAN
Ohh thanks Tom it helped !! In views.py i changed ifile=request.POST.get('inputfile') to ifile=request.FILES['inputfile'] and it worked Thanks a lot !!! On Fri, Apr 17, 2015 at 8:59 PM, Tom Evans wrote: > On Fri, Apr 17, 2015

"RuntimeError: Error creating new content types."

2015-04-17 Thread Christophe Pettus
On Django 1.8, I'm encountering this error when attempting to apply migrations on the production system. What's interesting is that it works fine on the dev system, and inspecting the django_migrations table, I don't see any (meaningful) differences between them (error text below). There was

Re: "RuntimeError: Error creating new content types."

2015-04-17 Thread Christophe Pettus
Digging into this a bit more, the specific exception is that it is trying to insert a contenttypes row with a null 'name' value. The code in question is doing a get_or_create() on the contenttype object. I assume it should be picking up the name from the name @property on the ContentType

Re: annotate() questions

2015-04-17 Thread Carsten Fuchs
Hi Ramiro, Am 2015-04-16 um 19:30 schrieb Ramiro Morales: https://docs.djangoproject.com/en/1.8/topics/db/aggregation/#aggregations-and-other-queryset-clauses "...When used with an annotate() clause, a filter has the effect of constraining the objects for which an annotation is calculated. For

Re: "RuntimeError: Error creating new content types."

2015-04-17 Thread Tim Graham
The contenttypes name column was removed in Django 1.8. Could you retrieve the underlying exception before the RuntimeError is raised? On Friday, April 17, 2015 at 2:55:07 PM UTC-4, Christophe Pettus wrote: > > Digging into this a bit more, the specific exception is that it is trying > to

Re: DurationField with default value

2015-04-17 Thread Tim Graham
It's a bug that Django cannot serialize timedelta objects in migrations. It will be fixed in 1.8.1 -- see https://code.djangoproject.com/ticket/24566. On Friday, April 17, 2015 at 1:06:09 PM UTC-4, Mathijs Jonker wrote: > > Hi, > > I'm trying to figure out how to use a default value with a

Re: "RuntimeError: Error creating new content types."

2015-04-17 Thread Christophe Pettus
Well, django_content_type.name definitely in my database. :) This is a project that was migrated from 1.6. The underlying exception was a null value complaint about django_content_type.name; it appears as though (on the production database) it thought that the migration to remove had been

Should squashmigrations produce a migration that could be improved by editing?

2015-04-17 Thread Andrew Farrell
Hi Folks, I recently squashed 93 migrations down to 1 in order to improve the speed at which tests ran. (5 tests took about 70 seconds to run before. Now they take 13.) I noticed that the resulting migration had a large list of small operations, mostly migration.AddField. What I have two

Re: Django 1.8 data migrations not able to locate related collections

2015-04-17 Thread A Lee
Hi Markus, thanks for the fast response! Yup, that did the trick. I had to do some manual copypasta into the stable/1.8.x branch to get it to run but it appears that was the issue. On Fri, Apr 17, 2015 at 9:45 AM, Markus Holtermann wrote: > Hi A Lee, > > I think I've