Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
I got it working Vijay! Thank you so much for your help, and have a great Christmas!! On Thursday, December 22, 2016 at 9:55:05 PM UTC-5, Vijay Khemlani wrote: > > if the form is not valid then form.errors should contain human-readable > errors for each field, including the one you validate you

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Vijay Khemlani
if the form is not valid then form.errors should contain human-readable errors for each field, including the one you validate yourself (the string inside the raise ValidationError call), you can return that. On Thu, Dec 22, 2016 at 11:49 PM, Chris Kavanagh wrote: > Yeah, I was wrong Vijay. For s

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
Yeah, I was wrong Vijay. For some odd reason I thought the ValidationError would catch it BEFORE submitted. . . I re-read the docs and saw I was wrong. . In other words, I I try to submit the form with the input field empty, I get a small pop up error saying "Please Enter An Email". Or, if I u

Re: Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Vijay Khemlani
I'm not following If you submit the form with incorrect information (non unique email) then your view does not return anything because form.is_valid() returns False Validation errors don't prevent the form from being submitted, they prevent the form from validation (making form.is_valid() return

Re: How to display user's photo that i follow in post's list in Django

2016-12-22 Thread skerdi
That get_photo func, I'm not using it. It tried to do something and I forgot to delete it. About screenshotting the code, I thought that it was more clarifying. class ProfileManager(models.Manager): use_for_related_fields = True def all(self): qs = self.get_queryset().all()

Re: django.db.migrations.graph.NodeNotFoundError:

2016-12-22 Thread skerdi
I have the same problem, but with an existing project. I've deleted migrations and the database and shows the same problem. I have 2+ hours searching but I haven't fixed it. On Wednesday, June 1, 2016 at 12:58:55 AM UTC+2, Bose Yi wrote: > > When new project start, commands makemigrations and

Re: How can I access field values generically?

2016-12-22 Thread Mike Dewhirst
Very generous. Thank you. It looks as though you did get the model structure. Your first comment nails it because mixtures can have other mixtures as ingredients. I'm right into recursion nowadays :) Mike On 22/12/2016 7:48 PM, C. Kirby wrote: Ill be honest, I'm still not getting how your mode

Re: Unique app name error problem when building a Wagtail multisite solution

2016-12-22 Thread 'Matthias Brück' via Django users
Hi Melvyn, thanks for your answer. Unfortunately switching the CMS isn't an option. And even if I skip the multisite requirements i could think of usecases where it might be a problem in just a django project as well, wanting to have a similar project structure, doesn't it? Am Donnerstag, 22.

Form Validation Error NOT Raised When Form Is Submitted

2016-12-22 Thread Chris Kavanagh
I have a model form called *"ContactForm" *that has an email field. I created a custom* forms.ValidationError* in *"clean_email"* method which checks to see if the email is already in the database , however it's never raised on submit. When submit is called, the view runs and I get the error

Re: How do you recommend to use Hebrew gender-related translations?

2016-12-22 Thread Avraham Serour
maybe translation context? https://docs.djangoproject.com/en/dev/topics/i18n/translation/#contextual-markers On Thu, Dec 22, 2016 at 9:29 PM, Fergus Cameron wrote: > I personally try to use language agnostic message IDs and translate > everything (i.e. including English). Your idea of appendin

Re: How do you recommend to use Hebrew gender-related translations?

2016-12-22 Thread Fergus Cameron
I personally try to use language agnostic message IDs and translate everything (i.e. including English). Your idea of appending the gender is along the same lines and seems logical. On 22/12/2016, Uri Even-Chen wrote: > Hi Django users, > > How do you recommend to use Hebrew gender-related trans

ProgrammingError: relation "auth_user" does not exist.

2016-12-22 Thread Biplab Gautam
I tried to set up custom user model by inheriting from AbstractBaseUser as instructed in django documentation, but I am encountering relation "auth_user" does not exist error. #models.py from django.db import models from django.contrib.auth.models import (BaseUserManager, AbstractBaseUser) clas

How do I translate site.name to other languages?

2016-12-22 Thread Uri Even-Chen
Hi Django users, We have our site.name and other site names (we have 4 sites in Django right now) in templates such as base.html. The site is taken from model Site (```from django.contrib.sites.models import Site```). In templates we just use "{{ site.name }}" or "{{ other_site.name }}". How do we

Re: starting django

2016-12-22 Thread Antonis Christofides
You typed pools instead of polls in your browser. Antonis Christofides http://djangodeployment.com On 12/22/2016 06:29 PM, Giovanni Oliverio wrote: > > Hello, I'm following the guide at the following link: > https://docs.djangoproject.com/en/1.10/intro/tutorial01/ but when I go to call > the pag

Re: starting django

2016-12-22 Thread pradam programmer
just correct pools to polls in url On Thu, Dec 22, 2016 at 9:59 PM, Giovanni Oliverio wrote: > > Hello, I'm following the guide at the following link: > https://docs.djangoproject.com/en/1.10/intro/tutorial01/ but when I go to > call the page: http://localhost:8000/polls/ the result is the foll

starting django

2016-12-22 Thread Giovanni Oliverio
Hello, I'm following the guide at the following link: https://docs.djangoproject.com/en/1.10/intro/tutorial01/ but when I go to call the page: http://localhost:8000/polls/ the result is the following:

Re: Django Channels - WebSocket connection to 'wss://mysite.local/chat/stream/' failed: WebSocket is closed before the connection is established. response code: 200

2016-12-22 Thread Adam Teale
I do have the mod_proxy_wstunnel module loaded. I realised that I am getting an error in apache: No protocol handler was valid for the URL /chat/stream/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. I've tried a

Re: Django Channels - WebSocket connection to 'wss://mysite.local/chat/stream/' failed: WebSocket is closed before the connection is established. response code: 200

2016-12-22 Thread Andrew Godwin
Apache's default mod_proxy does not support WebSockets. If you want to keep using Apache I would consider looking at mod_proxy_wstunnel. Andrew On Thu, Dec 22, 2016 at 2:24 PM, Adam Teale wrote: > Hi everyone, > > I have a django app running on mac os x server via mod_wsgi (apache 2.4). > > I a

How do you recommend to use Hebrew gender-related translations?

2016-12-22 Thread Uri Even-Chen
Hi Django users, How do you recommend to use Hebrew gender-related translations? For example, here are the choices for diet in Speedy Net (notice it's currently only used in Speedy Match, but it's part of the profile of Speedy Net): ``` class User(Entity, PermissionsMixin, AbstractBaseUser): ...

Re: Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread pradam programmer
I restarted hundred times still can't able to rectify it On 22 Dec 2016 9:07 pm, "ADEWALE ADISA" wrote: Restart the server On Dec 22, 2016 4:27 PM, "pradam programmer" wrote: > Hi Guys, > I am unable to rectify this error I am doing the following things: > 1. I am running the project in django

Re: Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread ADEWALE ADISA
Restart the server On Dec 22, 2016 4:27 PM, "pradam programmer" wrote: > Hi Guys, > I am unable to rectify this error I am doing the following things: > 1. I am running the project in django 1.7 later upgraded to 1.7.11 to > check whether I fix the issue but no use. :( > 2. In settings.py I comme

Django stops working with RuntimeError: populate() isn't reentrant

2016-12-22 Thread pradam programmer
Hi Guys, I am unable to rectify this error I am doing the following things: 1. I am running the project in django 1.7 later upgraded to 1.7.11 to check whether I fix the issue but no use. :( 2. In settings.py I commented the allowed_host = [*] still no use :( I don't know why this error is coming..

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Tim Chase
On 2016-12-22 03:56, NoviceSortOf wrote: > Our DB requirements though are complicated by the need to work with > Asian languages, Chinese, Japanese and so on as well as European > languages. If you are genuinely interested in MS-SQL Server, I would spin up a simple test server and bang against it.

Django Channels - WebSocket connection to 'wss://mysite.local/chat/stream/' failed: WebSocket is closed before the connection is established. response code: 200

2016-12-22 Thread Adam Teale
Hi everyone, I have a django app running on mac os x server via mod_wsgi (apache 2.4). I am using proxypass to point to daphne (running on port 8000). As far as I can tell things should be running ok. Daphne is being run via this command: daphne mysite.asgi:channel_layer -v2 -p 8000 When ever

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Antonis Christofides
Hi, I'm using SQLite in production in one application I've made for an eshop hosted by BigCommerce. It gets the orders from the BigCommerce API and formats them on a PDF for printing on labels. It has no models, and all the data is stored in BigCommerce. The only significant data stored in SQLite

Re: How to display user's photo that i follow in post's list in Django

2016-12-22 Thread Melvyn Sopacua
Hi, not sure why you're screenshotting code instead of copying it...makes it harder to point you at the mistake. On Wednesday 21 December 2016 14:33:58 skerdi wrote: > *In a post list I've shown only the users posts that I follow but I'm > not able to display their photo. * in Profile.get_phot

Re: Django - save user in another table

2016-12-22 Thread Avraham Serour
I think you should create another table called Profile that will hold all the addtitional info the common users have that the admins do not. The auth.user table is useful for handling password, authentication, session and common features all users have. On Wed, Dec 21, 2016 at 11:45 PM, milad rana

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Avraham Serour
if one really wants to pay for suport you can still use postgres and pay to enterpriseDB On Thu, Dec 22, 2016 at 2:45 PM, Sundararajan Seshadri wrote: > The situation justifies the data base. There are more data bases (like > Oracle and Firebird) than what you have specified. But, let me compare

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Sundararajan Seshadri
The situation justifies the data base. There are more data bases (like Oracle and Firebird) than what you have specified. But, let me compare the ones you listed. Same observations apply to the other data bases too. On the first level comparison, you can say SQLITE is excellent for productivity

How to display user's photo that i follow in post's list in Django

2016-12-22 Thread skerdi
*In a post list I've shown only the users posts that I follow but I'm not able to display their photo. * *Here is my Profile model, extending Django User model*

Django - save user in another table

2016-12-22 Thread milad ranaei siadat
Django - save user in another table up vote down votefavorite Is there a way to save my user registration in another table from the da

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread graeme
SQLite is very good for what it is and requires zero admin and no installation, but it cannot scale, has no replication, and cannot run on separate server. Postgres has robust transaction DDL, which means that if you get a crash in the middle of a migration the change gets reversed. MySQL does

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Melvyn Sopacua
Hi, On Thursday 22 December 2016 03:56:07 NoviceSortOf wrote: > Our DB requirements though are complicated by the need to work with > Asian languages, Chinese, Japanese and so on as well as European > languages. This makes a relative import/export trivial between > various tables and is a major

SOLVED Erroneous links in my Django URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread NoviceSortOf
Thanks that does the job. I'm editing subject to read as 'Solved' - Is this considered best practice in this form? On Thursday, December 22, 2016 at 2:43:23 AM UTC+1, NoviceSortOf wrote: > > > URLs not defined in my urls.py all show my home page and not a 404 missing > page error. > > For ins

Re: Unique app name error problem when building a Wagtail multisite solution

2016-12-22 Thread Melvyn Sopacua
Hi, On Wednesday 21 December 2016 14:30:32 'Matthias Brück' via Django users wrote: > is this really just not possible? What I found is this: > > you can't have two apps with the same name, even if they have > different > > fully qualified module paths > > https://groups.google.com/forum/#!msg/

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Vijay Khemlani
https://sqlite.org/whentouse.html SQLite is not directly comparable to client/server SQL database engines such as MySQL, Oracle, PostgreSQL, or SQL Server since SQLite is trying to solve a different problem. Client/server SQL database engines strive to implement a shared repository of enterprise

Re: Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread Vijay Khemlani
(r'$',index2), matches anything i think you would need something like (r'^/$',index2), On Thu, Dec 22, 2016 at 8:36 AM, NoviceSortOf wrote: > Thanks for the response... Apache setting and URL's follow. > > Apache setting looks like this... > > > Require all granted > > > = > > > UR

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread NoviceSortOf
The primary cost is licensing unless we can scale the MS-SQL db projects size and more expensive hosting cost . Currently we use PostGresSQL, based in part of my suspicions of the limitations of SQLite. Our DB requirements though are complicated by the need to work with Asian languages, Ch

Re: Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread Avraham Serour
I do not want to speak ill of sqlite, it is very useful for development, testing and other uses, but in short it is not a fully featured DBMS. Django can work with many different databases, not only sqlite and MSSQL. You will have license costs for the database and for the OS, I would personally

Postgres SQL vs SQLite vs MS SQL vs MY SQL

2016-12-22 Thread NoviceSortOf
Curious what advantages if any people are finding working with DBs other than the default SQLLite? We are considering migrating to MSSQL to avoid kinks/ETL involved with having various DB backends for office and server applications, but uncertain the additional cost will be worth it or not.

Re: Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread NoviceSortOf
Thanks for the response... Apache setting and URL's follow. Apache setting looks like this... Require all granted = URLS look like this urlpatterns = patterns('', (r'^search/$', search), (r'^searchadv/$', searchadv), (r'^searchcat/$', searchcat), (r'^searc

Re: GeoDjango: Filter by Area

2016-12-22 Thread Sanjay Bhangar
On Wed, Dec 21, 2016 at 10:08 PM, Tim Graham wrote: > If you don't get an answer here, you can also ask on the geodjango list: > https://groups.google.com/forum/#!forum/geodjango. > > Will do. Thanks Tim, you're the best! -- You received this message because you are subscribed to the Google Gro

Re: How can I access field values generically?

2016-12-22 Thread C. Kirby
Ill be honest, I'm still not getting how your models are structured. That is ok though, I can give you some pointers and hopefully that will be sufficient. I'll also be very explicit in describing the steps. Several are probably better as single orm calls. _meta docs at https://docs.djangoproj