Re: Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Dylan Reinhold
In polls/url.py patterns is missing the N. Dylan On Mon, Oct 10, 2016 at 5:24 PM, Johnny McClung wrote: > Thank you. I've added the comma as you mentioned. Can't believe I missed > that. But now I am getting a new error. > > > > E:\Dropbox\Python Scripts\mysite>python

Re: Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Johnny McClung
Thank you. I've added the comma as you mentioned. Can't believe I missed that. But now I am getting a new error. E:\Dropbox\Python Scripts\mysite>python manage.py runserver Performing system checks... Unhandled exception in thread started by .wrapper at 0x044B16A8> Traceback (most recent

How to read the json file of a dinamical way in relation to their size structure

2016-10-10 Thread Bernardo Garcia
I have the following JSON file named ProcessedMetrics.json which is necessary read for send their values to some template: { "paciente": { "id": 1234, "nombre": "Pablo Andrés Agudelo Marenco", "sesion": { "id": 12345, "juego": [ { "nombre":

Re: EmailValidator and ipv4 or ipv6 address

2016-10-10 Thread Vineet Kothari
Domains are also mapped to ip only by DNS On Fri, Oct 7, 2016 at 9:06 PM, Tim Graham wrote: > I'd take a look at the tests for the validator to see its expected inputs: > https://github.com/django/django/blob/c60feb6999f83bfd1fdabff01f0dd4 >

Re: Multiple instances of a Django application operating on different data

2016-10-10 Thread Vineet Kothari
you can use classes refer from here https://github.com/bmentges/django-cart and see how he is using cart.py On Sat, Oct 8, 2016 at 3:22 PM, hans.krebs42 wrote: > I'm coding a Django web project. I've created an app and

Re: Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Vineet Kothari
try to swap both statement On Tue, Oct 11, 2016 at 2:13 AM, Tim Graham wrote: > Add a comma after: url(r'^polls/', include('polls.urls')) > (these are items in a list, separated by a comma) > > > On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote: >> >>

Re: Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Tim Graham
Add a comma after: url(r'^polls/', include('polls.urls')) (these are items in a list, separated by a comma) On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote: > > I am getting an error when I try to run the Django server. > > >> mysite >> polls >> urls.py > from

Error with Tutorial - Writing your first Django app, part 1

2016-10-10 Thread Johnny McClung
I am getting an error when I try to run the Django server. >> mysite >> polls >> urls.py from django.conf.urls import url from . import views urlpatters = [ url(r'^$', views.index, name='index'), ] >> mysite >> mysite >> urls.py from django.conf.urls import include, url from

template or javascript

2016-10-10 Thread Lorenzo Bernardi
Hello, I'm making a website with bootstrap and I use some menu items (in fact nav bars) and I was wondering what is the best practice to make a menu item highlighted when I am on the page connected with this menu item. I mean in bootstrap the nav bar has a to highlight the fact that I'm

Re: Django app crashes with out of memory

2016-10-10 Thread James Schneider
On Mon, Oct 10, 2016 at 10:01 AM, Constantine Covtushenko < constantine.covtushe...@gmail.com> wrote: > Hi Dmitry, > > Please check that documentation page > . > As you can see iterator() loads all in the memory and after that

Re: Django app crashes with out of memory

2016-10-10 Thread Constantine Covtushenko
Hi Dmitry, Please check that documentation page . As you can see iterator() loads all in the memory and after that returns an iterator. Try to fetch records say by 50 - 100 items. Hope that helps. On Mon, Oct 10, 2016 at

Re: model form does not work

2016-10-10 Thread ludovic coues
Most of the time, it help to provide the full stack trace that come with the error. The one in the console where you started django should be easier to copy and paste. In your case, it look like a typo. In forms.py, it should be `class Meta` and you wrote `class meta`. An alternative is to use

Re: Django app crashes with out of memory

2016-10-10 Thread Горобец Дмитрий
Hello. Thanks for advices. Crash occures, when I run Django command through python manage.py my_command_name. It doesn't relate to nginx and even gunicorn, because, again, it's Django command, which I call from shell. I switched off redis caching (I use cacheops), but it' didn't help too.

model form does not work

2016-10-10 Thread prashant joshi
i created model form model.py from django.db import models from django.utils.encoding import python_2_unicode_compatible from django import forms from django.forms import ModelForm CATEGORIES = ( ('mh', 'Maharashtra'), ('pb', 'Punjab'), ('gj', 'Gujarat'), ) Country = (

Re: Extracting results of a join

2016-10-10 Thread Sanjay Bhangar
On Mon, Oct 10, 2016 at 12:56 PM, Geoff Kuenning wrote: > > > So is there a way to get Django to issue this join and collect the > results into an aggregate set? I've read through the docs and > experimented with different filter and double-underscore notations, > without

Extracting results of a join

2016-10-10 Thread Geoff Kuenning
I have a table, Photos, which contains pretty much what you'd expect. A second table, Albums, contains a field named "key", a title, and other information. The two are related by a ManyToManyField through AlbumMembers, which relates the photo ID to the album key ("album"). I mention