Re: Installing django on python3.5.2. Debian

2016-12-14 Thread GMail
As far as I remember, in Debian-based distributions you have to install pip via another package, usually python-pip or python3-pip. Also, there's a way to install pip via easy_install. And yes, you probably shouldn't use system pip, virtualenv does install pip inside newly created virtual envir

Problem with views when I try to move urls to a new app (folder)

2016-12-14 Thread Uri Even-Chen
Dear Django Users, I'm trying to move the main view into a new main app (folder) inside speedy/mail. Currently the file urls.py is like this: from django.conf import settings from django.conf.urls import url, include from . import views from django.conf.urls.static import static urlpatterns = [ u

Re: Problem with views when I try to move urls to a new app (folder)

2016-12-14 Thread GMail
Hi! It looks like the problem is with Site query, not urlconf. Do you use django.contrib.sites? If so, check SITE_ID variable in your django settings, it probably contains non-existant Site id. > On 14 Dec 2016, at 17:31, Uri Even-Chen wrote: > > Dear Django Users, > > I'm trying to move the m

Re: Problem with views when I try to move urls to a new app (folder)

2016-12-14 Thread Uri Even-Chen
Hi, I found the problem, I had a problem with the local database. Now it works. Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/

Messages framework name error

2016-12-14 Thread Zachary Sohovich
I'm attempting to add a success or error message to a form. As far as I can see, I've added everything correctly. But, when I try to submit the form with success or with error I get a 'NameError at /contact/' -> 'name message not defined'. Note that it says name message (not plural) not defined

Re: Messages framework name error

2016-12-14 Thread Antonis Christofides
Hi, could you show the full stack trace? Antonis Christofides http://djangodeployment.com On 12/14/2016 07:34 AM, Zachary Sohovich wrote: I'm attempting to add a success or error message to a form. As far as I can see, I've added everything correctly. But, when I try to submit the form with s

Phone number field in form/ model

2016-12-14 Thread Sithembewena Lloyd Dube
Hi, Has anyone captured phone number information using a Form/ModelForm instance? I have the field as an IntegerField in my model and (for obvious reasons) it truncates the leading '0'. How have you solved this problem, anyone? -- Regards, Sithembewena -- You received this message because you

Re: Phone number field in form/ model

2016-12-14 Thread Fabio C. Barrionuevo da Luz
Use CharField and try to find on https://django-localflavor.readthedocs.io/en/latest/ a Phone form Field for valid to you country or create Or create your own PhoneFormField with the validation rules that you need Implementation example: https://github.com/django/django-localflavor/blob/master/lo

Re: Phone number field in form/ model

2016-12-14 Thread Michal Petrucha
On Wed, Dec 14, 2016 at 09:36:06PM +0200, Sithembewena Lloyd Dube wrote: > Hi, > > Has anyone captured phone number information using a Form/ModelForm > instance? I have the field as an IntegerField in my model and (for obvious > reasons) it truncates the leading '0'. How have you solved this prob

Re: Phone number field in form/ model

2016-12-14 Thread Sithembewena Lloyd Dube
Thanks guys! On Wed, Dec 14, 2016 at 9:47 PM, Michal Petrucha < michal.petru...@konk.org> wrote: > On Wed, Dec 14, 2016 at 09:36:06PM +0200, Sithembewena Lloyd Dube wrote: > > Hi, > > > > Has anyone captured phone number information using a Form/ModelForm > > instance? I have the field as an

Re: Messages framework name error

2016-12-14 Thread Zachary Sohovich
So, I woke up this morning and went to go get the trace for you. Turned off my DEBUG setting in the settings.py and ran into some internal server errors. Fixed those, and then the messages error I was getting fixed itself, I guess. It's working now, randomly. Don't know what was causing it, gue

Error 500 'NoneType' object

2016-12-14 Thread Zachary Sohovich
I created a simple contact form with Django for a client. I am using the Messages framework to display an error or success message on form submission. If the form encounters any errors once or twice, we're good. It displays the error message. But, after the third of fourth time there's an error

Re: Opinions on permissions stategy

2016-12-14 Thread Avraham Serour
Hi, I've given a lot of thought on this, I have also searched for django apps that deal with permissions, I didn't find something that implements hierarchical object level permissions, I have a feeling that I am overcomplicating things if none did this... Well, first of all I thought of creating

Re: Error 500 'NoneType' object

2016-12-14 Thread Avraham Serour
it seems you have a bug on your error handling, it seems messages.error is None Can you reproduce this locally? your tests should also cover the error handling On Thu, Dec 15, 2016 at 1:45 AM, Zachary Sohovich < zacharyesohov...@gmail.com> wrote: > I created a simple contact form with Django for