Re: Django development server crash on syntactic or indent error after check

2014-12-04 Thread Mario De Frutos Dieguez
If i understand you correctly, when an error occur the server should not stop, instead of that it will print the error trace to let you correct the problem but in my case when an error occur the server show the trace and stop working or at least it returns to the shell. :S What i understand

Re: Problem Making New Django project - please help

2014-12-04 Thread Shashwat singh
No , it used to work perfectly on osx mavericks, then i did some stuff with opencv and since then i'm getting that error. I've tried each n every solution available on internet but nothing seems to solve that problem :/ -- You received this message because you are subscribed to the Google

Re: Problem Making New Django project - please help

2014-12-04 Thread Shashwat singh
Django version -- 1, 7, 1 And yes doing this from my home directory. -- 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

Does ticket 19866 apply to Django 1.4

2014-12-04 Thread yakkadesign
Does ticket 19866 apply to Django 1.4? Reading through the notes, it seems it does but I'm still getting a 500 error. If not, is there a way to keep Django from returning a 500 error. I've found other people filtering these out. I don't want to

Re: Mysql connector python 3

2014-12-04 Thread Collin Anderson
Hi Andréas, If it helps, mysqlclient (python3-compatible fork of mysqldb) is Django's recommended connector/driver. https://pypi.python.org/pypi/mysqlclient https://docs.djangoproject.com/en/dev/ref/databases/#mysql-db-api-drivers Collin On Thursday, December 4, 2014 1:50:09 PM UTC-5,

django shell not respecting vi editing-mode in .inputrc

2014-12-04 Thread Michael Scheper
G'day peeps, I somehow missed the Django shell (python manage.py shell) until somebody quite new to Django showed it to me. It's pretty and seems to have some nice tricks, but the vi editing commands I expect aren't working when I run it in my own environment. The normal Python interpreter

Re: Generic Views and Django.contrib.auth

2014-12-04 Thread Rootz
Thanks . It work using both the name and namespaces. On Thursday, December 4, 2014 8:45:27 AM UTC-5, Collin Anderson wrote: > > Hi, > > Not sure about namespaces, but you can certainly use name: > > urlpatterns = patterns('', > url(r'^about/', login_required(AboutView.as_view()),

Re: How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-04 Thread inoyon artlover KLANGRAUSCH
Very cool! :) Many thanks, once more! :) Could be off-topic, but there is somethin more tricky: Before a ManyToManyField there is one ForeignKeyField which has few of the same values. So the ForeignKey-value has to be excluded from the ManyToMany choices. For example the ForeignKey selection

Python/Django programmers needed (telecommute)...

2014-12-04 Thread Fred Stluka
Django programmers, Interested in a telecommute position for $80-100K/year? I just forwarded this one to my "Job Wanted" and "Consultants" mailing lists. See email appended below. Also, for anyone local to Philadelphia PA, I expect to be recruiting onto my own team in about a month or so.

Re: How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-04 Thread Larry Martell
On Thu, Dec 4, 2014 at 6:46 PM, inoyon artlover KLANGRAUSCH wrote: > Great, it works with one form but not with an another... > Btw. how is it possible to overwrite the 'this field is required' error > message? You can provide your custom set of default errors to

Re: How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-04 Thread inoyon artlover KLANGRAUSCH
Great, it works with one form but not with an another... Btw. how is it possible to overwrite the 'this field is required' error message? Many thanks and best regards! :) Am Donnerstag, 4. Dezember 2014 23:01:15 UTC+1 schrieb larry@gmail.com: > > On Thu, Dec 4, 2014 at 4:54 PM, inoyon

Re: How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-04 Thread Larry Martell
On Thu, Dec 4, 2014 at 4:54 PM, inoyon artlover KLANGRAUSCH wrote: > Hi there, I got a following Form-Class: > > > class CustomUserprofileInterestsForm(forms.ModelForm): > > interests = forms.ModelMultipleChoiceField( > queryset=Interests.objects.all(),

Re: Postgresql Triggers and Django

2014-12-04 Thread Carl Meyer
Hi Philip, On 12/04/2014 02:28 PM, Philip Haynes wrote: > Hi, > I have tracked back through the messages in this group and examined the > documentation for version 1.7 of Django and I have a question. > > The 1.7 documentation > (https://docs.djangoproject.com/en/1.7/howto/initial-data/) >

How to set choice limit of given number on ModelMultipleChoiceField in Django?

2014-12-04 Thread inoyon artlover KLANGRAUSCH
Hi there, I got a following Form-Class: class CustomUserprofileInterestsForm(forms.ModelForm): interests = forms.ModelMultipleChoiceField( queryset=Interests.objects.all(), widget=forms.CheckboxSelectMultiple) I want to limit the choices for example to 6 of all displayed.

Re: Postgresql Triggers and Django

2014-12-04 Thread Andreas Kuhne
Hi Philip, I ran into this problem earlier today actually. The problem is that you can't provide initial data for populating the models (or tables). That's what this refers to. To provide initial data, you have to run a migration. The initial-data information is only for loading the database

Postgresql Triggers and Django

2014-12-04 Thread Philip Haynes
Hi, I have tracked back through the messages in this group and examined the documentation for version 1.7 of Django and I have a question. The 1.7 documentation (https://docs.djangoproject.com/en/1.7/howto/initial-data/) describes the "Providing initial SQL data" functionality as deprecated.

Re: Redirect not working

2014-12-04 Thread jogaserbia
I now realize that the button type input does not automatically submit a form in all browsers. I changed the button type to submit, and it worked to call the testing view.

Re: how to pass request.user in .hbs file in django

2014-12-04 Thread JAI PRAKASH SINGH
hi actuall when i pass simple static value it shhows it in .hbs file (user: = "jai prakash singh") but when i pass request.user it show none (user:request.user) i think u r right , i should passs in serialise format. thank you let me try, and i will send u what is the response thank you again

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
I now checked the RDS settings and set a CONN_MAX_AGE on the database connection. Previously the connections were being terminated after use, so it probably took a while to get information from the database (so CONN_MAX_AGE was 0). I could see this in the number of connections that are on the

Re: Mysql connector python 3

2014-12-04 Thread Michael Pöhn
On 2014-12-04 20:03, Andreas Kuhne wrote: > Being an RDS instance it's not easy for me to get the my.cnf file, but > I should be able to see the settings somehow. You may use the MySQL Statement: show variables; for listing most configuration properties, wait_timeout included. br. Michael --

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
François, I hear what you are saying, checked the doc's and as far as I can see I don't have any MAX_CONN_AGE defined (i.e. it should be 0, which means no connection pooling). But what I see here is that there could be an issue even though it should be 0. I'll have to give it a try. Thanks

Re: Redirect not working

2014-12-04 Thread jogaserbia
Thanks for the reply Florian. I am unclear on what exactly does the redirecting. I think you are right about the .get. I stripped it out of the code, same issue. You say there is no redirect, I am unclear on what exactly should be doing the redirecting. What has to be in the index.html to

Re: Mysql connector python 3

2014-12-04 Thread François Schiettecatte
Andréas Django 1.6 introduced persistent connections: https://docs.djangoproject.com/en/dev/ref/databases/#persistent-database-connections The problem is that the mysql is dropping the connection while it is still in the pool on the django side (I have run into this with Java

Re: Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
François, Thanks for your answer. I will check the settings. The problem we have had is that it seems to be on ANY query, both those that take a long time and those that take a short time. But I'll check. Being an RDS instance it's not easy for me to get the my.cnf file, but I should be able to

Re: Mysql connector python 3

2014-12-04 Thread François Schiettecatte
Andreas Are your sql queries taking a very long time or is this for quick queries. Places to start would be to check that CONN_MAX_AGE in settings.py is less than wait_timeout in my.cnf. You could also check slow query log in MySQL. I ran into this issue but with a different setup, Django

Mysql connector python 3

2014-12-04 Thread Andreas Kuhne
Hi all, We went live with a new website, completely rewritten in python 3 and with django 1.6 (upgrade to 1.7 is in progress) on November the 18th. Of course there were some minor issues, but most of them have been resolved and so far everything is working really nice. HOWEVER... We are having

Re: Redirect not working

2014-12-04 Thread Florian Schweikert
On 04/12/14 18:58, jogaserbia wrote: > This is what I get from chrome when I click on the button in the > index.html, but nothing else happens. I bolded what I believe should > redirect to the testing UR with the lng and lat data. does it work with hardcoded url? is the testing url in the

Re: Problem Making New Django project - please help

2014-12-04 Thread jogaserbia
Are you trying to set it up in a virtualenv? On Wednesday, December 3, 2014 10:36:34 AM UTC-5, Shashwat singh wrote: > > Django is properly installed but when i try to create a new project --- " > django-admin.py startproject abc " it returns ^^ that error. > Any help will be highly

Redirect not working

2014-12-04 Thread jogaserbia
Hi, I am trying to build a simple app. On the index.html page an input box and button. I put address in, click box to geocode and output some maps. When I click on the button, the geocoding seems to work (see chrome output below), but it does not bring up the testing URL. This is what

Re: Problem Making New Django project - please help

2014-12-04 Thread Florian Schweikert
On 03/12/14 16:36, Shashwat singh wrote: > Django is properly installed but when i try to create a new project --- > " django-admin.py startproject abc " it returns ^^ that error. > Any help will be highly appreciated. starting new project with name abc throws the my_project.settings not found?

Re: cURL or wget with contrib.auth and CSRF

2014-12-04 Thread Kevin Trainor
David, I realize this was a long time ago, wondering if you ever got it working. I'm battling the same dragon currently. Step 1: seems to work wget --save-cookies c:\cifs\cookies.txt --keep-session-cookies --no-check-certificate --http-user=myuser --http-password=mypass

Re: Problem Making New Django project - please help

2014-12-04 Thread Collin Anderson
Hi, That is quite odd. Do you have the DJANGO_SETTINGS_MODULE set in your shell environment? (you shouldn't). What version of Django are you using? Are you doing this from your home directory? Collin On Wednesday, December 3, 2014 10:44:20 AM UTC-5, Shashwat singh wrote: > > Django is

Re: Generic Views and Django.contrib.auth

2014-12-04 Thread Collin Anderson
Hi, Not sure about namespaces, but you can certainly use name: urlpatterns = patterns('', url(r'^about/', login_required(AboutView.as_view()), name='about'), ) Or better yet, patterns() is deprecated so: urlpatterns = [ url(r'^about/', login_required(AboutView.as_view()),

Re: how to pass request.user in .hbs file in django

2014-12-04 Thread Collin Anderson
Hi, What happens when you try? You may need to "serialize" the individual attributes of user, or just return request.user.username. Django has some tools to help you serialize models. https://docs.djangoproject.com/en/dev/topics/serialization/ Collin On Tuesday, December 2, 2014 11:57:10 PM

Re: Beginner: Creating a form with variable number of checkboxes

2014-12-04 Thread Collin Anderson
Hi, The forms.ModelMultipleChoiceField might help you out here. class UpdateGroup(forms.Form): non_member_checkboxes = forms.ModelMultipleChoiceField( queryset=User.objects.all(), widget=forms.CheckboxSelectMultiple, ) Collin On Tuesday, December 2, 2014 7:27:47 PM

Re: Django development server crash on syntactic or indent error after check

2014-12-04 Thread Mike Dewhirst
On 4/12/2014 7:58 PM, Mario De Frutos Dieguez wrote: First of all i want to say hi!, i'm new in the group :) I'm having a problem with the development server (a.k.a runserver). When i'm working in a file but i have an error (for example indent error or syntactic error) the server crash instead

Django development server crash on syntactic or indent error after check

2014-12-04 Thread Mario De Frutos Dieguez
First of all i want to say hi!, i'm new in the group :) I'm having a problem with the development server (a.k.a runserver). When i'm working in a file but i have an error (for example indent error or syntactic error) the server crash instead of report the error and keep running. I've been

ManyToManyField with rating using 'through' on each ManyToMany relation in Django

2014-12-04 Thread inoyon artlover KLANGRAUSCH
I am very beginner in the programming world, so please forgive my lack of understanding... There is a CustomUserprofile in my models.py.. nothin very special about this... class Interests(models.Model): RATING = [(y, y) for y in range(1, 7)] interest =

Re: Django 1.7 problem

2014-12-04 Thread Andreas Kuhne
2014-12-04 1:39 GMT+01:00 Carl Meyer : > Hi Andreas, > > On 12/03/2014 01:34 PM, Andreas Kuhne wrote: > > I am trying to migrate our current website to django 1.7. > > > > Currently we are using a plugin called django-dbgettext to get parts of > our > > database translated (we