Re: django-celery connects to localhost but not by ip

2013-09-19 Thread Chad Vernon
Thanks, I found the issue after checking the logs. I saw in the log that it listed the AMQP connection that it accepts: =INFO REPORT 19-Sep-2013::20:52:57 === accepting AMQP connection <0.403.0> (127.0.0.1:59930 -> 127.0.0.1:5672) So if that is stating the obvious, I assumed it was blocking

Re: django-celery connects to localhost but not by ip

2013-09-19 Thread John DeRosa
First things to check: Check the firewall on the RabbitMQ server. Can you access that server? Did you set up the vhost and account on the RabbitMQ server? Look in the RabbitMQ logs. Did the request make it to RabbitMQ? John On Sep 19, 2013, at 7:34 PM, Chad Vernon

django-celery connects to localhost but not by ip

2013-09-19 Thread Chad Vernon
I am using djcelery and rabbitmq. Everything runs fine when the BROKER_HOST is localhost but when I change it to the ip of the machine it no longer runs. Basically I am trying to be able to run python commands on a separate machine to be picked up by the RabbitMQ server on a different machine.

Re: Group by using DJango ORM

2013-09-19 Thread Russell Keith-Magee
On Fri, Sep 20, 2013 at 7:34 AM, Nicolas Mendoza wrote: > Actually what's the best way for do a group by using django ORM? > > I know workarounds like combinate "values" with "Anotate", etc. but I > wil like know your favorite workaround without rawSQL and not manager >

Group by using DJango ORM

2013-09-19 Thread Nicolas Mendoza
Actually what's the best way for do a group by using django ORM? I know workarounds like combinate "values" with "Anotate", etc. but I wil like know your favorite workaround without rawSQL and not manager based , only Django ORM ;-) Example.objects.values('type').annotate(dcount=Count('type'))

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
I see now that you are not passing the CSRF token, are you? https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page-

Re: Receive parameter via post

2013-09-19 Thread carlos
Hi, try in the views: print request.POST['id'] for see de value cheers, On Thu, Sep 19, 2013 at 7:25 AM, Hélio Miranda wrote: > Good. > I have my client application server, and was trying to send an id > parameter via a post like this: > $scope.deleteIMG = function(ID){ >

Re: AUTH_USER_MODEL refers to model 'registration.RegistrationProfile' that has not been installed

2013-09-19 Thread Gladson Simplício Brito
Sorry I deleted the file, but are here: https://gist.github.com/gladson/9426052311ffe0e234e8 2013/9/19 Gladson Simplício Brito > Solved: > from registration.models import RegistrationProfile as User > > > 2013/9/19 Gladson Simplício Brito > >>

Re: AUTH_USER_MODEL refers to model 'registration.RegistrationProfile' that has not been installed

2013-09-19 Thread Gladson Simplício Brito
Solved: from registration.models import RegistrationProfile as User 2013/9/19 Gladson Simplício Brito > Django Version:1.5.4 > Exception Type:ImproperlyConfigured > Exception Value: > AUTH_USER_MODEL refers to model 'registration.RegistrationProfile' that > has not been

AUTH_USER_MODEL refers to model 'registration.RegistrationProfile' that has not been installed

2013-09-19 Thread Gladson Simplício Brito
Django Version:1.5.4 Exception Type:ImproperlyConfigured Exception Value: AUTH_USER_MODEL refers to model 'registration.RegistrationProfile' that has not been installed https://gist.github.com/gladson/d2731f4587c4524f90b8 Works on my local machine, in ubuntu, but Webfaction of this error. Do not

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Daniel Roseman
On Thursday, 19 September 2013 08:21:49 UTC+1, Leo wrote: > A question to better understand your problem: do you use a custom User > model in Django 1.3? > Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py? > There was no such thing as that setting in 1.3. It's new in 1.5.

Re: session data and logout

2013-09-19 Thread Bill Freeman
About the only meaning that "logout" can have on a web site is "this session is no longer valid". The expires stuff has to do with when you don't log out, but don't visit the page again. On Thu, Sep 19, 2013 at 8:54 AM, MikeKJ wrote: > I have this oddball requirement

Re: Receive parameter via post

2013-09-19 Thread Nicolas Mendoza
Here an example: https://gist.github.com/6625035 2013/9/19 Hélio Miranda : > Good. > I have my client application server, and was trying to send an id parameter > via a post like this: > $scope.deleteIMG = function(ID){ > $http({ > method: 'POST',, > url:

Re: while loop in django

2013-09-19 Thread Lee Hinde
Just a stab… https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#ifchanged The sample code shows you how to move through a selection and how to test changes. On Sep 19, 2013, at 12:53 AM, Harjot Mann wrote: > On Thu, Sep 19, 2013 at 12:45 PM, Leonardo

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
The way you are creating the DB is quite complicated, but I suspect that you are not syncing the base Django applications before doing your magic stuff. That could be the reason why Django is complaining about the auth.User not being installed. I would do the following: * settings.py with the

Re: Exception Error

2013-09-19 Thread Leonardo Giordani
You are using self.loan_amount, which is an attribute, as a function: self.load_amount(). I suspect there is a missing sign (+-*/) between self.loan_amount and the following ( May you confirm this? Leo Leonardo Giordani Author of The Digital Cat My profile on

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
Ok, I have found the problem (through digging through to post more information about it). It turns out that in our gui application, the gui-specific settings file was setting: INSTALLED_APPS = ( 'ncis_gui', 'ncis_sslauth', 'django_auth_ldap', ) and did not include the apps that

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
More information: Interactively, I can get a user_model: $ python Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from django.contrib.auth import get_user_model >>>

Receive parameter via post

2013-09-19 Thread Hélio Miranda
Good. I have my client application server, and was trying to send an id parameter via a post like this: $scope.deleteIMG = function(ID){ $http({ method: 'POST',, url: "http://localhost:8080/onpitch/delImagePlayer/;, data: {id:ID}, headers: { "Content-Type": "application/json; charset=utf-8" }

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
Yes, it is installed: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', ) -- lauri On Wednesday, September 18, 2013 1:41:48 PM UTC-5, Daniel Roseman wrote: > > On Wednesday, 18 September 2013 18:51:30

Re: Exception Error

2013-09-19 Thread Leonardo Giordani
Ok, can you report the content of /home/maurice/Desktop/django/Servant/Dashboard/models.py around line 264? Your error is there. Simply paste the output of "nl models.py | grep 264 -C 20" Regards PS: Rember to reply to the list =) Leonardo Giordani Author of The Digital Cat

DatabaseError during executing in ibm_db_dbi.py

2013-09-19 Thread Dennis Jade Toribio
Hi, i am new to using DB2 in Django. So far, my problem was with using ibm_db_django adapter as I see it. Since using ibm_db has no problem saving/getting data. I was wondering what causes the problem here. It seems to me the *execute*method inside ibm_db_dbi.py => _execute_helper =>

Re: Exception Value: 'Decimal' object is not callable dont no where this is coming from, Any help will be kindly appreciated

2013-09-19 Thread MAurice
On Wednesday, September 18, 2013 1:07:57 AM UTC+3, MAurice wrote: > > class Loan(models.Model): > id = models.AutoField(primary_key=True,default=1) > loan_type =models.CharField(max_length=20, > choices=LTYPE,default=1) > def number(): > no

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
I don't think we used a custom User model in Django 1.3, but perhaps we did without knowing it. How would I know for sure? We aren't setting any AUTH_USER_*** anything in our settings file, that's certain. - We use django-admin.py syncdb to create the authentication tables and whatever else

session data and logout

2013-09-19 Thread MikeKJ
I have this oddball requirement where an authenticated user is logged in so I can create a session variable to use elsewhere then do logout(request),so far so good, but it appears that my session variable is destroyed by the logout. Now I honestly thought that this wouldnt be the case as in

Re: Upload de musicas (music upload)

2013-09-19 Thread Kelvin Wong
I just wrote a blog post on uploading files using generic class based views. It has a sample app as well. https://bit.ly/14m6Q65 Let me know if you have any questions. K On Monday, September 16, 2013 8:41:06 AM UTC-7, Carlos Andre wrote: > > Olá pessoal, tudo bom? > Eu gostaria de uma ajuda

Template unable to show media files in production

2013-09-19 Thread vittorio
*Context: Ubuntu linux server 12, Apache 2.2 server, django 1.5.3* * * My project, /home/victor/magazantea is dealt with by admin and it works fine in the development environment (/manage.py runserver 192.168.1.19:8000). I built a view which gets data from the following fields from model

Re: Make a realtime video and Teleconsultation

2013-09-19 Thread aini jalil
Can i ask why you need this path: ultrasound --> laptop --> Web Server on REALTIME? Do you want do some Video Streaming ? or just backup your Image/Video on a Web Server ? Can this [1] help you? The reason I need this path "ultrasound --> laptop --> Web Server" because I want to do the video

Re: Preview video

2013-09-19 Thread Rafael E. Ferrero
You can use HTML5 or some free flash player this is one i use http://www.longtailvideo.com/jw-player/about/ See ya 2013/9/19 Hélio Miranda > Good staff. > > I'm here with a problem which is: I'm uploading videos and now wanted to > show the video, but not sure how. I have

Re: Image Maps + Django

2013-09-19 Thread Tom Evans
On Tue, Sep 17, 2013 at 9:54 AM, +Emmanuel wrote: > I am intending to implement something similar to this: > https://opendata.go.ke/facet/counties > That has been developed in Ruby on Rails. How does Django handle image maps? > Are there any additional Python/ Django libraries

Fixing missing permissions (not in contrib.auth.models.Permission table in db)

2013-09-19 Thread graeme
As far as I can see the permissions should be there. I checked the South migration I used to add the Model and it seems correct: the schema migration creates the table and then calls db.send_create_signal('managed_villas', ['GuestReview']) How do I fix it? The ContentType exists and seems

Re: Image Maps + Django

2013-09-19 Thread Nigel Legg
GeoDjango uses ESRI shape files in the example in the Djang documentation, not Google maps?? (I don't want to use google maps either). To me it looks ideal for your purpose Cheers, Nigel 07914 740972 On 19 September 2013 10:50, +Emmanuel wrote: > @Nigel, > If I understand

Problem with authentication middleware, session and cache

2013-09-19 Thread Alessandro Pasotti
Hi, I' have some problems trying to cache most of my websites when authentication mw is in place. I only want to cache anonymous users: CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True anyway, I also want to show a different menu to authenticated users, so I also check for user.is_authenticated in a

Re: add marks of same roll number of different of different semestrs

2013-09-19 Thread Lachlan Musicman
I will presume that you have 2 Student details with the same roll_no but with different class numbers. If that is not the case, then you will need to revisit the modelling of your data. Anyway, something like this would work. student_details = StudentDetail.objects.get(roll_no=) for

Re: Image Maps + Django

2013-09-19 Thread +Emmanuel
@Nigel, If I understand it well, GeoDjango seems to be for a more robust GIS application that utilizes Google Maps. In contrast, I want to use a simple image map with no Google Maps. Thanks On Tuesday, September 17, 2013 12:34:49 PM UTC+3, Nigel Legg wrote: > > Read the documentation on

Preview video

2013-09-19 Thread Hélio Miranda
Good staff. I'm here with a problem which is: I'm uploading videos and now wanted to show the video, but not sure how. I have to use a player? Someone can help me. For example the images I'm uploading and then viewing the'm doing something like this def viewAcademyPhotos (request, id):

Re: while loop in django

2013-09-19 Thread Leonardo Giordani
Harjot, with so little information is very difficult to help you, you should try to give a description of your models and exactly what you want to do. What are the "values" and the "job-id" you are talking about? And what about "differences"? About the while loop: in Python it is used this way

Re: while loop in django

2013-09-19 Thread Harjot Mann
On Thu, Sep 19, 2013 at 12:45 PM, Leonardo Giordani wrote: > Can you perhaps better describe what you are trying to do? > Do you need it in a view or in a template? In views I want to add two values having same job-id in my app but having some other differences.

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
In Django key:value are sent the way you specify in your urls configuration. E.g., say that you want to show an object that you can extract from your DB with year=2013 and month=09 ('year' and 'month' are here a primary key for that model if used together). The URL schema is completely up to you,

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
A question to better understand your problem: do you use a custom User model in Django 1.3? Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py? If you do not need a custom user model just drop the AUTH_USER_MODEL setting variable. Otherwise subclassthe AbstractBaseUser and set

Re: while loop in django

2013-09-19 Thread Leonardo Giordani
Can you perhaps better describe what you are trying to do? Do you need it in a view or in a template? Regards Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page- My

Re: Using environment variables in settings.py - good practice? How to handle missing variables gracefully?

2013-09-19 Thread Mike Dewhirst
On 19/09/2013 3:59pm, Victor Hooi wrote: Hi, Hmm, in many cases there isn't really a sensible default (e.g. API keys or passwords). I was asking more in terms of - is this the "right" way of doing it in Django, or are people using some other technique to handle configuration you don't want in