Peepcode like screencasts for Django

2009-10-01 Thread hrishy
Hi Rails programmers have many screencasts like http://railscasts.com/ to bring newbie programmers upto speed is there anything like tahat available for Django regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Peepcode like screencasts for Django

2009-10-01 Thread Benjamin Buch
I especially enjoyed Eric Florenzano's excellent screencast series 'Django From the Ground Up'. You'll find it here: http://thisweekindjango.com/screencasts/ There are no screencasts on http://djangodose yet, but I think this is a good place to look out for screencasts in the future.

Re: Include multiple entries in Atom feed

2009-10-01 Thread peppergrower
I think I figured this out. What Django's syndication refers to as "items" are the same thing the Atom specification calls "entries." (I'd thought that an "item" referred to a single Django model instance, but this clearly isn't the case when I look at the raw XML generated by my feed.) On Sep

Re: Pass a non-pickable object in between pages without using the session

2009-10-01 Thread Carsten Reimer
Hi, Karen Tracey schrieb: > On Wed, Sep 30, 2009 at 1:49 PM, Gabriel Rossetti > > wrote: > > > Why can't it be pickled? > > Because it has a socket open > > > Clearly, since every request is independent, > >

How to get result from manytomany?

2009-10-01 Thread veasna bunhor
I have two models : class Individual(models.Model): name = models.CharField(max_length=200) * is_author = models.BooleanField()* active = models.BooleanField(default=True) class

Re: How to get result from manytomany?

2009-10-01 Thread Anıl KARADAĞ
Hi, veasna bunhor yazmış: > I have two models : > > class Individual(models.Model): > name = models.CharField(max_length=200) >* is_author = models.BooleanField()* > active = models.BooleanField(default=True) >

Re: How to get result from manytomany?

2009-10-01 Thread veasna bunhor
Thanks you very much. Now it's work. On Thu, Oct 1, 2009 at 3:06 PM, Anıl KARADAĞ wrote: > > Hi, > > veasna bunhor yazmış: > > I have two models : > > > > class Individual(models.Model): > > name = models.CharField(max_length=200) > >* is_author =

Re: composite primary keys?

2009-10-01 Thread nausikaa
Hi again What I wrote is wrong sorry, I didn't read the ticket properly. You can't do multi-column primary keys in django (yet). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Peepcode like screencasts for Django

2009-10-01 Thread hrishy
Hi Benjamin Excellent thansk for the link --- On Thu, 1/10/09, Benjamin Buch wrote: > From: Benjamin Buch > Subject: Re: Peepcode like screencasts for Django > To: django-users@googlegroups.com > Date: Thursday, 1 October, 2009, 7:55 AM > > I especially

Re: Pass a non-pickable object in between pages without using the session

2009-10-01 Thread Gabriel Rossetti
Carsten Reimer wrote: > Hi, > > Karen Tracey schrieb: > >> On Wed, Sep 30, 2009 at 1:49 PM, Gabriel Rossetti >> > wrote: >> >> > Why can't it be pickled? >> >> Because it has a socket open >> >> > Clearly, since

Re: Pass a non-pickable object in between pages without using the session

2009-10-01 Thread Gabriel Rossetti
Karen Tracey wrote: > On Wed, Sep 30, 2009 at 1:49 PM, Gabriel Rossetti > > wrote: > > > Why can't it be pickled? > > Because it has a socket open > > > Clearly, since every request is independent, > > if it really

Database Consistecy using Django ORM

2009-10-01 Thread Geobase Isoscale
Hi Everyone, I would like to know how to Add a new Collumn to an already created table in Django. I would like to know whether one can create database triggers, create database functions, database Index and database views using Django ORM. I'm investigation to what extend does Django support

Re: 'NoneType' object has no attribute 'widget'

2009-10-01 Thread dijxtra
On Sep 30, 5:12 pm, Karen Tracey wrote: > On Wed, Sep 30, 2009 at 10:53 AM, dijxtra wrote: > > > I'm getting "'NoneType' object has no attribute 'widget'" exception > > and I just can't figure out where is the problem. Here is my error: > > > Django

Re: Database Consistecy using Django ORM

2009-10-01 Thread Rama Vadakattu
On one thing which i can guide you is you can use 1.django evolutions Link : http://code.google.com/p/django-evolution/ 2.south LInk: http://south.aeracode.org/ to add a new column to an already created table via django. On Oct 1, 2:14 pm, Geobase Isoscale wrote: > Hi  

Re: 'NoneType' object has no attribute 'widget'

2009-10-01 Thread Rama Vadakattu
'importance' field is already comming from model. Why did you defined again in the forms? (remove it and check out whether error is occurring or not) On Oct 1, 2:33 pm, dijxtra wrote: > On Sep 30, 5:12 pm, Karen Tracey wrote: > > > > > On Wed, Sep 30,

Re: 'NoneType' object has no attribute 'widget'

2009-10-01 Thread dijxtra
If I remove that line, the "'NoneType' object has no attribute 'widget' " exception is still thrown at if not f.is_valid():. That's why I trid to define it again... On Oct 1, 11:44 am, Rama Vadakattu wrote: > 'importance' field is already comming from model. > Why did

How can i filter choices in ManyToMany Box by request.user in Admin Site?

2009-10-01 Thread Cousteau
Hello: I'm trying to filter the choices in a Multiple select box in admin site, in order to show only those belongs to the user Is it posssible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

{% for articles in article_list %}

2009-10-01 Thread Matt
How do you add an article to that? I mean put some python and django code down so I can understand it but, here's what I think it might be: example.py #!C:/Python/python import datetime today = datetime.datetime.today() class article_list(): class articles(): def from_Sarah():

Re: How can i filter choices in ManyToMany Box by request.user in Admin Site?

2009-10-01 Thread Cousteau
This is my simplified code: # models.py class Category(models.Model): user = models.ForeignKey(User) text = models.CharField(max_length=200) slug = models.SlugField(max_length=200, editable=False) class Book(models.Model): isbn = models.CharField(max_length=32) title =

Re: {% for articles in article_list %}

2009-10-01 Thread Daniel Roseman
On Oct 1, 11:56 am, Matt wrote: > How do you add an article to that? I mean put some python and django > code down so I can understand it but, here's what I think it might be: > > example.py > > #!C:/Python/python > > import datetime > > today = datetime.datetime.today()

unicode and manage.py test

2009-10-01 Thread gentlestone
I wrote a piece of code for correct slugification: _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E', u'Ì': 'I', u'Í': 'I', u'Î': 'I', u'Ï': 'I', u'Ð': 'D', u'Ñ': 'N', u'Ò': 'O',

Re: 'NoneType' object has no attribute 'widget'

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 5:33 AM, dijxtra wrote: > > On Sep 30, 5:12 pm, Karen Tracey wrote: > > On Wed, Sep 30, 2009 at 10:53 AM, dijxtra wrote: > > > > > I'm getting "'NoneType' object has no attribute 'widget'" exception > > > and I

Re: Trouble with Messages feature in django.contrib.auth

2009-10-01 Thread willfe
On Sep 30, 7:50 pm, Karen Tracey wrote: > On Wed, Sep 30, 2009 at 6:28 PM, willfe wrote: > > > *sigh* I was just about to post this as-is, and tried one more thing, > > which fixed it. I hadn't added context_instance=RequestContext > > (request) to the end

Reading text files into mysql database

2009-10-01 Thread Carlos Gustavo
Hi All, I am a django newbie and so far it has been great. How do I populate a mysql database table with data from a text file? Also How do I dump results of a database query into a text file. I have already created my django model for the mysql table. Thanks in advance. -Carlos

Re: Database Consistecy using Django ORM

2009-10-01 Thread Russell Keith-Magee
On Thu, Oct 1, 2009 at 5:14 PM, Geobase Isoscale wrote: > Hi  Everyone, > > I would like to know how to Add a new Collumn to an already created table in > Django. As noted by Rama - the answer here is either to use raw ALTER statements, or to use a tool like South or Django

Error with IPython shell and Django

2009-10-01 Thread Symbios
Hello, I was using the python shell to test my Django model, and I got this error : In [91]: MediaCollection.objects.by_country("gabon") Out[91]: ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in

form and related inline formset on same page

2009-10-01 Thread kurak
Hello, How can I render new form for object X and inline formset for model Y (with foreign key to X) on the same- the same way it's done in django- admin. I've been struggling with it for a while, I tried to render form and formset separately but it won't work this way. How should I approach

not required in Atom feeds

2009-10-01 Thread peppergrower
Question about Django's syndication framework: why does it require a link for each item/entry in a feed? As far as I can tell, this is optional in the Atom specification (http://www.atomenabled.org/ developers/syndication/atom-format-spec.php#element.link): >> The "atom:link" element defines a

Re: Reading text files into mysql database

2009-10-01 Thread Mark (Nosrednakram)
Hello, If your data is in a CSV format I have a tool I wrote to do this a while ago that has served me well several times: http://projects.django-development.info/trac/dd_csvloader To download if you want as a CSV check for a snippet at djangosnippets.org.

doctest and sqllite

2009-10-01 Thread gentlestone
I have this model: from django.db import models class Subjekt(models.Model): """ >>> osoba = Osoba(meno = "Ludmila", priezvisko = "Safarova") >>> osoba >>> subjekt = Subjekt(nazov = "Zaba s.r.o.", osoba = osoba) >>> subjekt >>> subjekt.osoba.save() >>>

Re: Database Consistecy using Django ORM

2009-10-01 Thread Geobase Isoscale
Many Thanks, Rama, thanks again, I have taken a look at South, I understand Django Evolution project is on going.(its mature to use it?) Russell, thanks again, You have supplied invaluable information that would have me taken ages to decipher. New Question, Is it possible to use UML and OCL or

Re: Reading text files into mysql database

2009-10-01 Thread Shawn Milochik
On Oct 1, 2009, at 9:25 AM, Carlos Gustavo wrote: > > Hi All, > > I am a django newbie and so far it has been great. > > How do I populate a mysql database table with data from a text file? > > Also How do I dump results of a database query into a text file. > > I have already created my django

Two Formset on the same page

2009-10-01 Thread Val Makykh
Hello all. I use Django 1.1. I try to make two formsets on the same page. But when I'm trying to use the data from POST, I have such problem: from POST each formset takes only first form with value. Where have I mistaken? Sourse: In views.py: __ def results(request,

Re: Two Formset on the same page

2009-10-01 Thread Shawn Milochik
Are both Django forms being rendered in the same HTML form, or are they separate? If they're in separate HTML forms, that could be the problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Reading text files into mysql database

2009-10-01 Thread Carlos Gustavo
Thanks, Shawn!!! Deeply appreciated! -Carlos. On Thu, Oct 1, 2009 at 10:38 AM, Shawn Milochik wrote: > > > On Oct 1, 2009, at 9:25 AM, Carlos Gustavo wrote: > > > > > Hi All, > > > > I am a django newbie and so far it has been great. > > > > How do I populate a mysql

Re: Reading text files into mysql database

2009-10-01 Thread Carlos Gustavo
Thanks, Mark!!! Deeply appreciated! -Carlos On Thu, Oct 1, 2009 at 10:26 AM, Mark (Nosrednakram) wrote: > > Hello, > > If your data is in a CSV format I have a tool I wrote to do this a > while ago that has served me well several times: >

Re: Two Formset on the same page

2009-10-01 Thread Tom Evans
On Thu, 2009-10-01 at 07:26 -0700, Val Makykh wrote: > Hello all. > > I use Django 1.1. > > I try to make two formsets on the same page. > But when I'm trying to use the data from POST, I have such problem: > from POST each formset takes only first form with value. Where have I > mistaken?

Abstract model across apps

2009-10-01 Thread phoebebright
I am trying to use use a hCalendar model from django-microformats as the base class for events in my own app, microformat.models.py class hCalendar(LocationAwareMicroformat): ... class Meta: abstract = True web.models.py class Event(hCalendar): owner =

Re: doctest and sqllite

2009-10-01 Thread gentlestone
the same confusing result I've got in the python interpeter - manage.py shell --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com

session intermittently disappears just after login

2009-10-01 Thread Jeff Gentry
Hi there ... (this is also posted to stackoverflow: http://stackoverflow.com/questions/1504537/django-session-intermittently-disappears-just-after-login) In my django app, I handle login in the following manner. Users go to a gateway page (index.html) - if they are not currently logged in,

Re: doctest and sqllite

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 10:29 AM, gentlestone wrote: > > I have this model: > > from django.db import models > > class Subjekt(models.Model): >""" >>>> osoba = Osoba(meno = "Ludmila", priezvisko = "Safarova") >>>> osoba > >>>> subjekt = Subjekt(nazov =

Re: Two Formset on the same page

2009-10-01 Thread Val Makykh
Thanks for advice, Tom. I've now followed it and have this exception: __ Environment: Request Method: GET Request URL: http://localhost:8000/results/2/1/ Django Version: 1.1 Python Version: 2.6.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes',

Re: doctest and sqllite

2009-10-01 Thread gentlestone
thx Karen it's true, strange, but so it is On 1. Okt, 17:41 h., Karen Tracey wrote: > On Thu, Oct 1, 2009 at 10:29 AM, gentlestone wrote: > > > I have this model: > > > from django.db import models > > > class Subjekt(models.Model): > >    """ > >  

Re: Abstract model across apps

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 10:59 AM, phoebebright wrote: > > I am trying to use use a hCalendar model from django-microformats as > the base class for events in my own app, > > microformat.models.py > > Is that really microformat.models.py or microformats.models.py? I'm

Avoid queryset caching

2009-10-01 Thread Adrián Ribao
Hello, I need to disable the queryset caching in two situations: * When I process a huge amount of rows, and for each one I have to perform a new queryset. The script memory increases very quick and the system run out of memory. * When I generate a form dinamically from a queryset. Is there

Re: Two Formset on the same page

2009-10-01 Thread Tom Evans
On Thu, 2009-10-01 at 08:52 -0700, Val Makykh wrote: > Thanks for advice, Tom. > > I've now followed it and have this exception: > __ > Environment: > > Request Method: GET > Request URL: http://localhost:8000/results/2/1/ > Django Version: 1.1 > Python Version: 2.6.2 > Installed

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
> > This sounds like a character set encoding problem.  The first thing I > > would try, if possible, is to 1) recompile cx_Oracle with the > > WITH_UNICODE option enabled and 2) switch to Django trunk (Django 1.1 > > does not support this option).  This allows Django to send unicode > > strings

Re: form and related inline formset on same page

2009-10-01 Thread Daniel Roseman
On Oct 1, 3:09 pm, kurak wrote: > Hello, > How can I render new form for object X and inline formset for model Y > (with foreign key to X) on the same- the same way it's done in django- > admin. > > I've been struggling with it for a while, I tried to render form and > formset

Re: Abstract model across apps

2009-10-01 Thread phoebebright
Karen, Am wanting to use the standard in django-microformats (with an s!) but want additional fields, so rather than change the models within microformats I thought I could be clever and make them all abstract and inherit them. My suspicion is django doesn't like inheriting from another app,

Re: Abstract model across apps

2009-10-01 Thread phoebebright
Karen, Aghh - was editing a backup copy of the file, so django quite happy to use abstract models from other apps. However, my cunning plan does not work because of the many to many relationships within microformats - can't have a many to many relationship with an abstract model obviously.

combining user and userprofile in admin

2009-10-01 Thread booty
I am creating an application where I want the admin site to display the User and the UserProfile (my extensions to the User class) together in the list view. Currently, I have something like: class UserProfile(models.Model): " User profile class " # That field link toward the django

Problem deleting object with foreignkey to self

2009-10-01 Thread Lavoie Francis
Hi, I have a puzzle here I can't solve, if you have an idea or a starting point, it would be very useful and appreciated. In order to have an easy way to link to the next object and the previous one (with special ordering), I add to my model two Foreignkey pointing to self. These keys

Problem moving project on other PC. No module found.

2009-10-01 Thread NMarcu
Hello, I made a project in Django, and runs grate on my PC. I have all my files in a folder: "project". I copied to anoter PC via ssh, and on that pc I configurate apache, and acces is from my browser via http, but sometimes I got: "Could not import project.operators.views. Error was: No

group by

2009-10-01 Thread garyrob
Hello, Suppose I have a model my_model, with several fields, one of which is x. Suppose it's based on an SQL table with the same name. In SQL, I can: select x, count(*) from my_model group by x In order to get the number of rows with each value of x. I'm not sure how to do that in django.

Re: Django + QT4

2009-10-01 Thread Markus Stumpf
On Wed, Sep 23, 2009 at 01:59:35PM -0700, Gustavo Henrique wrote: > Is possible use django with qt4 for desktop apps? > if yes, where I can find about this? anyone have a example to study? A bit late maybe, but I stumbled over this today:

Re: group by

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 4:38 PM, garyrob wrote: > > Hello, > > Suppose I have a model my_model, with several fields, one of which is > x. Suppose it's based on an SQL table with the same name. > > In SQL, I can: > > select x, count(*) > from my_model > group by x > > In order to

Custom template tag problem: "No module named models"

2009-10-01 Thread shacker
Google apparently won't let me reply to an older thread: http://groups.google.com/group/django-users/browse_thread/thread/94239f017df4b12f so starting a new one. I too was hitting the "No module named models" problem when creating a template tag. I had the tag working perfectly when it

Re: Custom template tag problem: "No module named models"

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 6:16 PM, shacker wrote: > > Google apparently won't let me reply to an older thread: > > http://groups.google.com/group/django-users/browse_thread/thread/94239f017df4b12f > so starting a new one. > > I too was hitting the "No module named models"

Re: OperationalError: unable to open database file, when saving existing object

2009-10-01 Thread pigmalione
Hi, Wim - Thanks a lot for the reply. I'm doing everything through code, since accessing the admin interface is itself plagued with issues. And as far as I can tell, I am the same user as the owner of the db-file (since I can also change privileges on the file at will). These are some more

Re: combining user and userprofile in admin

2009-10-01 Thread Matt Schinckel
On Oct 2, 3:20 am, booty wrote: > I am creating an application where I want the admin site to display > the User and the UserProfile (my extensions to the User class) > together in the list view. > [snip] > My problem is that I want my User Profile fields to be displayed in

Re: combining user and userprofile in admin

2009-10-01 Thread Matt Schinckel
On Oct 2, 8:58 am, Matt Schinckel wrote: > On Oct 2, 3:20 am, booty wrote:> I am creating an > application where I want the admin site to display > > > But I am not able to sort by these values (nor filter, nor search). > I seem to have missed

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
I installed 9i at home and did some more test. With the same application running (and updating the same field) I discovered that the limit is not the same for my database. It is now 1246 Characters. I started a new application (a app with a model and a Textfield) and the limitation is 1316. I'll

Re: Custom template tag problem: "No module named models"

2009-10-01 Thread shacker
On Oct 1, 4:00 pm, Karen Tracey wrote: > > Yes, you must simply ensure you name things in such a way that the models > module you want to access is not hidden by something else. The original > problem noted in the thread you reference resulted from re-using the >

Re: Custom template tag problem: "No module named models"

2009-10-01 Thread Karen Tracey
On Thu, Oct 1, 2009 at 8:47 PM, shacker wrote: > > Found the problem. There were no namespace problems in my template > tag, but there were (are) in the external app I'm using, which is the > RSS aggregator used by the djangoproject.com site itself: > > >

Re: Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-10-01 Thread alphacc
Ok if you change the NCLOB to CLOB in the django\db\backends\oracle \creation.py and re-run a clear syncdb it works. Now what are the limitation of CLOB vs NCLOB ? Will it affect other part of the TextField methods ? --~--~-~--~~~---~--~~ You received this message

Returning a file from a view

2009-10-01 Thread Rodrigo Cea
I am creating a password-protected file repository. I would like to create a login_required view that returns the file without revealing it's actual location in the file system. Can I return an actual file (not it's location) from a view? --~--~-~--~~~---~--~~ You

Django Tiny Mce: focus on tab

2009-10-01 Thread zweb
I have a tinymce field like this... When I tab, the cursor just skips the tinymce text area and moves to next field. ie it jumps from field tabindex 1 to field with tabindex 3. tinymce editor has tabindex 2. I am using django tinymce. If anyone has come across this problem and know answer or