Re: Chat application

2014-06-18 Thread carlos
Hi, maybe not all with django, maybe you need learn gevent http://www.gevent.org/ socket.io http://socket.io/ and here is example for a chat with redis and django + gevent + socketio etc. https://github.com/rlr/django-gevent-socketio-redis-chat-example Cheers On Wed, Jun 18, 2014 at 4:46 PM, Pe

Re: Stack Overflow Open Source Advertising, 2H 2014

2014-06-18 Thread Russell Keith-Magee
Hi Jorge, On Wed, Jun 18, 2014 at 3:21 PM, Jorge Cardoso Leitão < jorgecarlei...@gmail.com> wrote: > Hi Russell, > > Thank you for raising these concerns here. > > It would be a pleasure to me to represent the Django project but I'm not > sure that this is the case here, and surely was not my int

Chat application

2014-06-18 Thread Pedro
Hello, i'm working in a mobile app that depends of a Django server (to manage user data and stuff). This mobile app is about a social network with users interacting. It should have a chat system, where two or more users can send and receive messages and photos. I'm thinking in the best way to imp

Re: All tests fail with TypeError: isinstance() arg 2 must be a type or tuple of types

2014-06-18 Thread Sceva
Deleted all the migration files, re-ran makemigrations and migrate, and errors disappeared. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubsc

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
By override I mean I add this at the start of my handle() function in my custom management command: from django.utils import translation translation.activate(settings.LANGUAGE_CODE) Where settings.LANGUAGE_CODE = "en-gb". Calling get_language in my custom management command stil

Re: Any position for Django/Python Developer?

2014-06-18 Thread carlos
Hi or maybe look for odesk.com and similar website for freelancer On Wed, Jun 18, 2014 at 10:31 AM, Huy T wrote: > If you want to relocate why not select some target cities. > > Otherwise why not search dice.com (job board) and google perhaps. > > On Jun 18, 2014, at 11:08 AM, Kannan wrote: >

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread James Bennett
On Wed, Jun 18, 2014 at 10:21 AM, Stodge wrote: > Even when I override the language code in my custom command get_language() > still returns "en-us". Weird. Guess I'll have to use settings.LANGUAGE_CODE > instead of get_language(). > Define what you mean by "override the language code". Are you

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
Oh, sorry, I forgot it is about manage command. Try to disable USE_I18N (USE_I18N = False) and check if it works. See "django\utils\translation\__ini__.py" in your site-libs for details (class Trans, its getattr and get_language() function) Ilya Kazakevich, JetBrains PyCharm (Best Python/Dja

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
LocaleMiddleware sets your language to one, provided by your webbrowser. Tty to disable LocaleMiddleware or configure your browser to use different language (http://stackoverflow.com/questions/7769061/how-to-add-custom-accept-languages-to-chrome-for-pseudolocalization-testing) Ilya Kazakevich,

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
This has nothing to do with the browser - it's a post save signal that executes inside a custom management command. Thanks again On Wednesday, 18 June 2014 13:48:41 UTC-4, Ilya Kazakevich wrote: > > LocaleMiddleware sets your language to one, provided by your webbrowser. > Tty to disable Locale

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
Thanks. I am using LocaleMiddleware. I changed my languages to: LANGUAGE_CODE = 'en-gb' USE_I18N = True LANGUAGES = ( ('en-gb', ugettext('English')), ('de', ugettext('German')), ('fr', ugettext('French')) ) But I'm still getting en-us. On Wednesday, 18 June 2014 13:29:45 UTC-4, Ilya

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
1) Try to debug your code. Django is open source and sources are available:) 2) Do you have LocaleMiddleware installed? 3) Do not use bare language, use language-region (http://www.i18nguy.com/unicode/language-identifiers.html) : en-gb, en-us, en-bb and so on 4) It is generally bad idea to depend

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
Even when I override the language code in my custom command get_language() still returns "en-us". Weird. Guess I'll have to use settings.LANGUAGE_CODE instead of get_language(). On Wednesday, 18 June 2014 13:02:37 UTC-4, Stodge wrote: > > Oh. > > > https://docs.djangoproject.com/en/dev/howto/cus

Re: LiveServerTestCase modifies production database when ran in python script

2014-06-18 Thread yakkadesign
The solution was to use DjangoTestSuiteRunner. I ended up copying the method DjangoTestSuiteRunner.run_tests and modifying to use a test suite. The code is from django.test.simple import DjangoTestSuiteRunnerfrom django.utils import unittest suite_payment = unittest.TestLoader().loadTestsF

Re: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
Oh. https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#management-commands-and-locales I forgot to mention that the signal is executed as a result of a loaddata management command. So management commands don't respect settings.LANGUAGE_CODE? That makes no sense. On Wednesd

Language code issue - Django thinks default is en-us?

2014-06-18 Thread Stodge
My settings for languages are: LANGUAGE_CODE = 'en' USE_I18N = True LANGUAGE_COOKIE_NAME='django_language' ugettext = lambda s: s LANGUAGES = ( ('en', ugettext('English')), ('de', ugettext('German')), ('fr', ugettext('French')) ) I have a post-save signal that creates instances of a

Re: Any position for Django/Python Developer?

2014-06-18 Thread Huy T
If you want to relocate why not select some target cities. Otherwise why not search dice.com (job board) and google perhaps. On Jun 18, 2014, at 11:08 AM, Kannan wrote: > Guys, > I have not got a single reply. > Please let me know where I can search for a remote job or part time job in > Pyth

Re: Any position for Django/Python Developer?

2014-06-18 Thread Sithembewena Lloyd Dube
Also search on Indeed.com. On Wed, Jun 18, 2014 at 6:20 PM, Sithembewena Lloyd Dube wrote: > Hey, > > Try www.djangogigs.com? Also, search LinkedIn - I always see stuff posted > there. Join the Django and Python groups. > > > On Wed, Jun 18, 2014 at 5:08 PM, Kannan wrote: > >> Guys, >> I have

Re: Any position for Django/Python Developer?

2014-06-18 Thread Sithembewena Lloyd Dube
Hey, Try www.djangogigs.com? Also, search LinkedIn - I always see stuff posted there. Join the Django and Python groups. On Wed, Jun 18, 2014 at 5:08 PM, Kannan wrote: > Guys, > I have not got a single reply. > Please let me know where I can search for a remote job or part time job in > Python

Re: Database problem in Django

2014-06-18 Thread C. Kirby
You really need to show the models you are interested in this working on. In particular you will need the models to have a "created time" or something similar to order your query on. Kirby On Wednesday, June 18, 2014 7:06:18 AM UTC-5, Ashu Singh wrote: > > Hello everyone. My doubt is how to fet

Re: Any position for Django/Python Developer?

2014-06-18 Thread Kannan
Guys, I have not got a single reply. Please let me know where I can search for a remote job or part time job in Python/Django technologies. On Tue, Jun 17, 2014 at 5:48 PM, Kannan wrote: > > Hi All, > I am looking for job for Django Developer. And I am ready to work on part > time role also. >

RE: Who are using Aptana Studio 3? Please respond.

2014-06-18 Thread Ilya Kazakevich
Aptana is based on Eclipse, Eclipse is java-based, java-based drivers are called "JDBC" drivers. So you probably need mysql JDBC driver. Here it is: http://www.mysql.com/products/connector/ Here is manual: http://www.od2dev.be/configuring-aptana-to-connect-mysql-databases/ Some IDEs download dat

Re: Who are using Aptana Studio 3? Please respond.

2014-06-18 Thread Jorge Andrés Vergara Ebratt
You need the DB Backends, but that doesn't depend in the IDE you are using... If you are going to work with MySQL you need to have MySQL installed and install MySQL-python (Only works on Python 2.x there is another one for 3.x but I'm not familiar with it) If you are going to work with PostgreSQL

Re: Database problem in Django

2014-06-18 Thread Glen Jungels
Erik is certainly right on this. All queries are point in time and in databases with large numbers of inserts per second, getting the true last two inserts will be relative to when the query starts. On Jun 18, 2014 9:33 AM, "Erik Cederstrand" wrote: > Den 18/06/2014 kl. 14.31 skrev Glen Jungels

Re: Database problem in Django

2014-06-18 Thread Erik Cederstrand
Den 18/06/2014 kl. 14.31 skrev Glen Jungels : > It will be different depending on the database (assuming you are asking about > the query only). You will need to do an order by on either your auto > incremented field or dat field plus something like a limit 2 (Postgres and I > believe MySQL) o

Re: Expected URL with primary key when testing SimpleTestCase.assertRedirects()

2014-06-18 Thread Antonio Alaniz
Thanks, K. I think one of my main issues, after looking at your tests, is that I'm not currently using the client to test the redirect. I have this test as a part of my functional_tests.py, but it sounds like I need to possibly build this into my unit tests as I see your test is in tests.py. I'

RE: Database problem in Django

2014-06-18 Thread Glen Jungels
It will be different depending on the database (assuming you are asking about the query only). You will need to do an order by on either your auto incremented field or dat field plus something like a limit 2 (Postgres and I believe MySQL) or top 2 for something like SQL Server. On Jun 18, 2014 8:1

RE: Database problem in Django

2014-06-18 Thread Ilya Kazakevich
You probably need to have "insert_date" field and store entry created date there. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@google

Database problem in Django

2014-06-18 Thread Ashu Singh
Hello everyone. My doubt is how to fetch the recent two database entries in django. User may enter into database anytime but the query should always fetch last two entries. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Database problem in Django

2014-06-18 Thread Ashu Singh
Hello everyone. My doubt is how to fetch the recent two database entries in django. User may enter into database anytime but the query should always fetch last two entries. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: reset button

2014-06-18 Thread Tom Evans
On Wed, Jun 18, 2014 at 11:06 AM, Sebastián Richmond wrote: > Hi, > I am interested in a reset buttion for a form. > > I have this form.py > > > from django import forms > > class ContactForm(forms.Form): > topic = forms.ChoiceField(choices=TOPIC_CHOICES) > message = forms.CharField() >

Re: Problem with runserver

2014-06-18 Thread Dariusz Mysior
Ok I now now Start the development server Remember, don't use runserver and *localhost:8000* on PythonAnywhere . Instead, go back to your *Web* tab, and hit reload on your web app. You will then be able to go to *your-username.pythonanywhere.

Re: Problem with runserver

2014-06-18 Thread Dariusz Mysior
It,s work but another message with port :/ Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Error: That port is already in use. W dniu środa, 18 czerwca 2014 12:43:38 UTC+2 użytkownik Dariusz Mysior napisał: > > I use pythonanywhere.com and now I install Py

Re: Problem with runserver

2014-06-18 Thread Helton Alves
Hi, you need install this: pip install MySQL-python :D 2014-06-18 11:43 GMT+01:00 Dariusz Mysior : > I use pythonanywhere.com and now I install Python 2.7 and Django 1.6 with > virtualenv > > My settings.py is > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.mysql', >

reset button

2014-06-18 Thread Sebastián Richmond
Hi, I am interested in a reset buttion for a form. I have this form.py *from django import forms* *class ContactForm(forms.Form):* *topic = forms.ChoiceField(choices=TOPIC_CHOICES)* *message = forms.CharField()* *sender = forms.EmailField(required=False)* It adds a submit button

Problem with runserver

2014-06-18 Thread Dariusz Mysior
I use pythonanywhere.com and now I install Python 2.7 and Django 1.6 with virtualenv My settings.py is DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'daro822$db1', 'USER': 'daro822', 'PASSWORD': '*', 'HOST':'mysql.s

Re: Expected URL with primary key when testing SimpleTestCase.assertRedirects()

2014-06-18 Thread Kelvin Wong
This is how I usually do redirect tests: self.assertEqual(response.status_code, 302) self.assertRedirects( response, 'http://testserver' + reverse('pizza:deleted') ) I recommend using named URLs, that way your message_id would be similar to this: reverse('pizza:delete', args=[pi

Who are using Aptana Studio 3? Please respond.

2014-06-18 Thread Віталій Лисенко
How are working with database Postgres or MySql in Aptana3? Am I need special driver? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@go

Re: Strange behavior when running a join in Django shell versus script

2014-06-18 Thread Daniel Roseman
On Wednesday, 18 June 2014 07:16:23 UTC+1, Jason Skicewicz wrote: > > I have a many to many relationship from my UserProfile object to an object > called ThemeTimes. The declaration looks like the following: > >theme_times = models.ManyToManyField('fixupthemes.FixupThemeTime', >> blank=True,

Strange behavior when running a join in Django shell versus script

2014-06-18 Thread Jason Skicewicz
I have a many to many relationship from my UserProfile object to an object called ThemeTimes. The declaration looks like the following: theme_times = models.ManyToManyField('fixupthemes.FixupThemeTime', > blank=True, > related_name='profiles', editable=False) the FixupThemeTime mod

Re: Stack Overflow Open Source Advertising, 2H 2014

2014-06-18 Thread Jorge Cardoso Leitão
Hi Russell, Thank you for raising these concerns here. It would be a pleasure to me to represent the Django project but I'm not sure that this is the case here, and surely was not my intention! That post was added as a SO member who is thrilled about a project and wanted to promote it to other S