Re: unique not working as expected

2013-05-10 Thread Amber Kulkarni
Yes , Sam is right. unique=True was added after table was created. On Sat, May 11, 2013 at 12:12 AM, Sam Solomon wrote: > My guess is that unique=True was added after the table was created using > syncdb. > > I'm guessing that most companies that use Django professionally use South ( > http://

New Release of IBM_DB_DJANGO (1.0.5)

2013-05-10 Thread Rahul
IBM_DB_DJANGO-1.0.5 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? - Added support for Django-1.5, with backward comp

Re: not able to create a site, instead text document pops out.

2013-05-10 Thread Mike Dewhirst
On 10/05/2013 10:23pm, gintare wrote: Windows7 computer. Django 1.5.1 Python 2.7 Not able to create a site, instead text document pops out. Command: c:\Python27\Scripts>c:\Python27\Scripts\django-admin.py startproject mysite This looks as though you changed directory to c:\python27\script

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread Hu Shizhi
My urls.py: from django.conf.urls import patterns, include, url # from django.contrib.auth import login, logout # Uncomment the next two lines to enable the admin:

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
Hi Philippe, I think that it really depends on how modular you would like your Django project to be. Do you want the stats generation functionality to be separately pluggable from the pie-charting functionality? Is your gather_data app large enough (number of models) to warrant breaking it down? I

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
By the way, the book mentioned above - "Two Scoops of Django" - makes very good reading for Django in general. I believe a good way to get apps talking to each other is through the use urls.py configurations in conjunction with views. More on that in the official Django tutorial. On Sat, May 11,

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
By the way, the book mentioned above - "Two Scoops of Django" - makes very good reading for Django in general. I believe a good way to get apps talking to each other is through urls.py configurations. More on that in the official Django tutorial. On Sat, May 11, 2013 at 2:28 AM, Sithembewena Lloy

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
By the way, the book mentioned above - "Two Scoops of Django" - makes very good reading for Django in general. On Sat, May 11, 2013 at 2:28 AM, Sithembewena Lloyd Dube wrote: > Hi Phillipe, > > I think that it really depends on how modular you would like your Django > project to be. Do you want

Re: Use different apps or not?

2013-05-10 Thread Sithembewena Lloyd Dube
Hi Phillipe, I think that it really depends on how modular you would like your Django project to be. Do you want the stats generation functionality to be separately pluggable from the pie-charting functionality? Is your gather_data app large enough (number of models) to warrant breaking it down? I

detecting stale session data

2013-05-10 Thread testbackupacct
Hi, I'm pretty new to Django and am having a problem with a race conditions while modifying my session data. I'm using the standard session backend in Django 1.4.1,, backed by Mysql. I have view A, which can take a long time to process, and view B, which is usually faster. I store multiple dat

Use different apps or not?

2013-05-10 Thread Philippe Schraepen
Hi all, I'm new to Python and Django so don't be to hard on me please :) I'm writing a Django project which analyses your music folders, gives back statistics about it (like file-extentions, mp3 bitrate, number of unique artists,...) and generates pie charts of these stats. My project current

Re: Django with 2 subapps with same name

2013-05-10 Thread Andre Terra
Granted this structure doesn't seem reasonable. Each manufacturer shouldn't be a separate app, but rather "backends" to generic storage or invoice apps. So you only need INSTALLED_APPS = ( # ... 'storage', 'invoice' ) And then work from there. The apps themselves should be able to reg

Form that saves data into multiple models

2013-05-10 Thread Lev
Hello, I have 2 models: car and salesman. I want to make a form based off the car model. Salesman name is a foreign key in the car model. In the form, I want to be able to enter the salesman's name and if it doesn't exist already then create a new salesman. So I have something like this in for

Re: Setting up Django on GoDaddy Deluxe Shared Hosting

2013-05-10 Thread Gerald Klein
Wow thanks amazing work, I wondered if someone had figured out a way to do it. thanks --jerry On Fri, May 10, 2013 at 1:04 PM, Radomir Wojcik wrote: > I was looking for the answer to this today and I wrote a tutorial on how > to do this based on all the stuff I found on the net: > > With the

Re: Difficulties displaying correct value in select widget with ModelForm/formset_factory:

2013-05-10 Thread Matt Conrad
Answering my own question from a few days ago, this: choice_vals = scene.begin_scene.all().values() ChoiceFormFactory = formset_factory(ChoiceForm) formset = ChoiceFormFactory(initial=choice_vals) is all wrong. I needed to be using a modelformset_factory, not a formset_factory, with a

Re: HttpResponse.has_header

2013-05-10 Thread Larry Martell
On Fri, May 10, 2013 at 9:37 AM, Larry Martell wrote: > On Fri, May 10, 2013 at 8:55 AM, Tom Evans wrote: >> On Fri, May 10, 2013 at 2:52 PM, Larry Martell >> wrote: >>> Just upgraded to 1.5 and my app is failing with: >>> >>> Internal Server Error: >>> Traceback (most recent call last): >>> Fi

Re: Django with 2 subapps with same name

2013-05-10 Thread Valder Gallo
tnx :D On Fri, May 10, 2013 at 4:31 PM, Shawn Milochik wrote: > It is not possible. > > https://groups.google.com/forum/#!msg/django-users/AMYLfQo6Ba4/Y-57B0i7qy4J > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from th

Re: Django with 2 subapps with same name

2013-05-10 Thread Shawn Milochik
It is not possible. https://groups.google.com/forum/#!msg/django-users/AMYLfQo6Ba4/Y-57B0i7qy4J -- 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+uns

Re: Django with 2 subapps with same name

2013-05-10 Thread Valder Gallo
Nops ... when i used INSTALLED_APP = { 'invoice.sony', 'invoice.samsung', 'storage.sony', 'storage.samsung', } storage.samsung.models is overrind invoice.samsung.models :( On Fri, May 10, 2013 at 4:08 PM, Thiago Avelino wrote: > Yep, add in installed_app: > > application_name.stor

Re: Django with 2 subapps with same name

2013-05-10 Thread Thiago Avelino
Yep, add in installed_app: application_name.storage.sony application_name.storage.samsung Cheers, Thiago Avelino On Fri, May 10, 2013 at 3:19 PM, Valder Gallo wrote: > I cant have 2 subapp with same name in Django ? > > Ex. > > invoice/sony > invoice/samsung > > storage/sony > storage/sams

Re: unique not working as expected

2013-05-10 Thread Sam Solomon
My guess is that unique=True was added after the table was created using syncdb. I'm guessing that most companies that use Django professionally use South ( http://south.aeracode.org/) to make schema changes easier. Without South, you would have to keep the database in sync with the code manual

Django with 2 subapps with same name

2013-05-10 Thread Valder Gallo
I cant have 2 subapp with same name in Django ? Ex. invoice/sony invoice/samsung storage/sony storage/samsung -- 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

Re: Setting up Django on GoDaddy Deluxe Shared Hosting

2013-05-10 Thread Radomir Wojcik
I was looking for the answer to this today and I wrote a tutorial on how to do this based on all the stuff I found on the net: With the economy class Linux hosting its a bit tricky. For starters you don't have root access to the site packages so you cannot install for example MySQL-Python. 1.

Re: HttpResponse.has_header

2013-05-10 Thread Larry Martell
On Fri, May 10, 2013 at 8:55 AM, Tom Evans wrote: > On Fri, May 10, 2013 at 2:52 PM, Larry Martell > wrote: >> Just upgraded to 1.5 and my app is failing with: >> >> Internal Server Error: >> Traceback (most recent call last): >> File "/Library/Python/2.7/site-packages/django/core/handlers/base.

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
ok i'm totaly stupid {% extends "Base.html" %} {% block titolo %}Attore{% endblock %} {% block contenuto %} {{ attore.nome }} {{ attore.cognome }} {% endblock %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gr

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread C. Kirby
Do you have a urls.py file? To used the url tag with a name you need to have a defined url with that name, example: urlpatterns = patterns('', url(r'^$', 'app.views.index', name="index"), ) On Friday, May 10, 2013 9:38:27 AM UTC-5, Hu Shizhi wrote: > > Hi, > > I am new to Django and am using

Re: Fetching data from related tables

2013-05-10 Thread carlos
Hi maybe try with this app https://github.com/digi604/django-smart-selects Cheers On Thu, May 9, 2013 at 4:33 PM, Sam wrote: > I have 3 tables: Continent, Country and Story. > > Country has ForeignKey(Continent) and Story has ManyToManyField(Country, > blank=True) field. > > What I need is to

NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread Hu Shizhi
Hi, I am new to Django and am using django-registration and followed the quickstart.rst document and get the following. Could anyone kindly help? Thanks, Tian NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. Request Method:GETRe

Re: HttpResponse.has_header

2013-05-10 Thread Tom Evans
On Fri, May 10, 2013 at 2:52 PM, Larry Martell wrote: > Just upgraded to 1.5 and my app is failing with: > > Internal Server Error: > Traceback (most recent call last): > File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", > line 187, in get_response > response = middleware

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
In this way there isn't an exception but it doesn't load attore.nome e attore.cognome *Attore.html :* {% extends "Base.html" %} {% block titolo %}Attore{% endblock %} {% block contenuto %} {% for attore in film %} {{ attore.nome }} {{ attore.cognome }} {% endfor %}{% endblock %} -- Y

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
Sorry for the stupid question, but how? Thanks. *views.py :* from django.shortcuts import render_to_response, get_object_or_404from django.template import RequestContextfrom models import * def film(request): film = Film.objects.order_by("titolo") return render_to_response('Film.html',

HttpResponse.has_header

2013-05-10 Thread Larry Martell
Just upgraded to 1.5 and my app is failing with: Internal Server Error: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/django/core/handlers/base.py", line 187, in get_response response = middleware_method(request, response) File "/Library/Python/2.7/site-packag

Image upload on record that already exists

2013-05-10 Thread Hélio Miranda
Hi I'm doing a test to insert images in mongodb with GridFS. I am using mongoengine. I have this code: def index (request): if request.method == 'POST': MovieTitle = 'Avatar' Movie movie = (= movieTitle movieTitle) my_painting = Movie (movieTitle = movieTitle)

Re: [ANN] Python in the browser by Python

2013-05-10 Thread Amirouche
Le jeudi 9 mai 2013 21:09:13 UTC+2, Javier Guerra a écrit : > > On Thu, May 9, 2013 at 11:55 AM, Amirouche Boubekki > > wrote: > > I just released a new version of PythonScript, a "variant" of Python > that > > compiles to javascript. > > > nice! > > how does it compare with Pyjamas (http

not able to create a site, instead text document pops out.

2013-05-10 Thread gintare
Windows7 computer. Django 1.5.1 Python 2.7 Not able to create a site, instead text document pops out. Command: c:\Python27\Scripts>c:\Python27\Scripts\django-admin.py startproject mysite does not create folder 'mysite', instead (as any other commands like version, help..) commnad gives a

We started djangojobs.net

2013-05-10 Thread Djangojobs.net
We provide free job posting in our beta period of djangojobs.net You can follow us via twitter @djangojobsnet or our job email list to get latest job posts http://djangojobs.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Daniel Roseman
On Friday, 10 May 2013 10:29:21 UTC+1, Federico Erbea wrote: > > Hello everyone thanks in advance on the aid, I'm new in programming in > general. I would like to create a link (in Film.html) and using the ID to > open a new page (Attore.html) where to load only the data associated with > that

Re: middleware

2013-05-10 Thread Hristo Deshev
> > Does anyone know if is possible execute a middleware only to a specific > > application or url? On 05/09/2013 04:56 PM, Shawn Milochik wrote: > In your middleware you'll have access to the request object, so you can > easily check the URL, user, etc. I'd consider a solution based on view dec

problem with inserting data through sqlite manually.

2013-05-10 Thread Avnesh Shakya
Hi, I am inserting data into my models using sqlite3 manually, but it's not storing without id, it's generating error, this Id is generated automatically in django. how is it possible that i can store data without taking id value. please help me out. thanks. -- You received this me

how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
Hello everyone thanks in advance on the aid, I'm new in programming in general. I would like to create a link (in Film.html) and using the ID to open a new page (Attore.html) where to load only the data associated with that ID but it doesn't do that since it loads all data of attori instead of

Re: What's wrong with the Basic configuration of apache and mod_python?

2013-05-10 Thread lx
I have choiced to use the wsgi. 2013/5/10 lx > hi: > the the Basic configuration of apache is: > > LoadModule python_module /usr/lib64/httpd/modules/mod_python.so > > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODU