Re: Collaborative text editor with Django

2011-02-28 Thread Anoop Thomas Mathew
@piotr zalewa: jsFiddle is of course a nice Is jsFiddle open source?? I couldn't find its source anywhere. http://www.facebook.com/topic.php?uid=183790024998&topic=14241 So, friends, This etherpad is in comet (java) and can anyone tell how to integrate etherpad, keeping it as it is, with other dja

django, postgresql and eliminating duplicates

2011-02-28 Thread Kenneth Gonsalves
hi, I have a model which allowed duplicates to be entered. Subsequently it was decided to add a unique_together constraint and make the necessary change in the db structure. Postgresql of course will not make a unique_together constraint if there are duplicates. Since this is one off, I wrote a sc

Re: limit number of rows in change_list

2011-02-28 Thread Derek
On Feb 28, 1:55 pm, bigfudge wrote: > How do I limit the number of rows displayed by default in a > change_list? > > Many thanks, In the admin.py file, under the class whose number of rows you want to display - use "list_per_page" class MyModelAdmin(admin.ModelAdmin): list_per_page = 10 The

Accessing foreign key fields

2011-02-28 Thread ydjango
class Article(models.Model): author = models.ForeignKey(Author) title = models.CharField(max_length = 100) (assume an article can have only one author) article = Article.objects.get(title="Django is awesome) if I need only author id, I can access author id as 1) article.author_id or 2) a

Re: Model Question

2011-02-28 Thread Nolan Brubaker
I'm not sure about your first question; I've never tried overriding a field in a subclass. For your second question are you trying to check on the whole query set, or an individual model instance? If you're checking on an individual model instance, you can use hasattr() like: if hasattr(instan

Re: Python/Django AMQP?

2011-02-28 Thread Nolan Brubaker
+! for Celery, though I haven't used it with django-celery yet. Soon will, though. On Feb 24, 2011, at 11:58 AM, Brian Bouterse wrote: > +1 for Celery and django-celery. I use them also. > > On Thu, Feb 24, 2011 at 9:07 AM, Shawn Milochik wrote: > +1 on Celery and django-celery. I use them b

Python/Django position in King of Prussia, PA, US

2011-02-28 Thread Shawn Milochik
Hi everyone. I thought I'd check in with my "home group" before I post this up on Dice. Any locals? Shawn Python/Django Developer Greenphire is a growing company in King of Prussia, PA. We are looking for a bright developer to join us in our quest for truth, justice, and the Pythonic way. We

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-02-28 Thread Ian
On Feb 28, 10:04 am, lipt0n wrote: > Hi > my application works fine in apache as mod_python and wsgi, also work > great when I run manage.py runserver > but I have to move it on nginx. > > so I run it by 'python2.6 manage.py runfcgi host=127.0.0.1 port=9001 -- > settings=settings' > and it works f

Re: Number of Django powered sites?

2011-02-28 Thread Ted
I've found that using "django tutorial" and "django documentation" in google insights/trends does a pretty good job of filtering out the namespace noise. You can also append tutorial or documentation to the names of other frameworks to get an idea of relative trends. Ted On Feb 25, 9:10 pm, Russ

Re: Foreignkey troubles : some key look ups give me a ValueError: invalid literal for int() with base 10 error

2011-02-28 Thread hari jayaram
I posted this question as a ticket : kmtracey suggested the fix ( http://code.djangoproject.com/ticket/15513) which is to use the ForeignKey.to_field to specify the column in the Parent table that the relation is mapped to. I am copy-pasting his comments here: The cause of the exception you are

multi model forms

2011-02-28 Thread django
hi guys I am new to django. I have got two model User(Django built in ) and a model customer, user is foreign key in customer class Customer(models.Model): user = models.ForeignKey(User, related_name='customers') street = models.CharField(max_length=200) city = models.CharField(max_length=1

Re: django and mod_wsgi

2011-02-28 Thread Graham Dumpleton
On Monday, February 28, 2011 11:23:14 PM UTC+11, atm wrote: > > Try adding, > > > *import os* > > *import sys* > > * * > > *path = 'C:\\Programme\\Apache Software Foundation\\Time2\\Time2\\'* > > *path1 = 'C:\\Programme\\Apache Software Foundation\\Time2\\'* > > * > * > > *if path not in sys.pa

Re: DatabaseError at / no such table: cms_page

2011-02-28 Thread delegbede
I suspect you had already done a syncdb before creating that field. If yes, the database would not create it just like that. When I had similar problem, here's what I did. I removed the database file from my project root and then ran a syncdb again. It worked. There's a price to pay however, y

DatabaseError at / no such table: cms_page

2011-02-28 Thread electrocoder
How do "DatabaseError at / no such table: cms_page" -- 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. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Re: urls.py usage

2011-02-28 Thread Vladimir
I only followed manuals! Please, Mr. Daniel, give me more details! -- 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. To unsubscribe from this group, send email to django-users+un

Re: urls.py usage

2011-02-28 Thread Daniel Roseman
On Monday, February 28, 2011 4:26:57 PM UTC, Vladimir wrote: > > > > That you have duplicate registration of one model in your admin.py > > somewhere (I believe, I may be wrong). > There is no admin.py file in this project. > Well, why not? That is the cause of your problem. Putting admin reg

Re: python mysqldb installation problem

2011-02-28 Thread Joel Goldstick
On Mon, Feb 28, 2011 at 1:19 PM, Pulkit Mehrotra wrote: > OS: Ubuntu 10.04 > I am learning web developing with Django.I downloaded and installed > python-mysql but i couldn't connect.I think problem is database > settings. > Here is the process: > > django-admin.py startproject mysite #creating a

Re: How to check if string is in Hebrew

2011-02-28 Thread Ian Clelland
On Sun, Feb 27, 2011 at 3:01 PM, ydjango wrote: > Hebrew is within the unicode range 0x590 to 0x5ff. > > I tried > if lang_string[0] >= u'0x590' and lang_string[0] <= u'0x5ff': > > but it does not seem to work. That isn't the correct syntax for unicode string literals. What you are trying to do s

python mysqldb installation problem

2011-02-28 Thread Pulkit Mehrotra
OS: Ubuntu 10.04 I am learning web developing with Django.I downloaded and installed python-mysql but i couldn't connect.I think problem is database settings. Here is the process: django-admin.py startproject mysite #creating a project and a mysite folder files in 'mysite' folder: /__init__.py /u

Django include templates problem, from 0.96 to 1.2

2011-02-28 Thread Pete.
Hi folks, I using google app engine, in 0.96 I have no problem to include a template as following {% include "../header.html" %} However, in 1.2 the code above not functioning?? Any idea? -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: sqlite path

2011-02-28 Thread Brian Bouterse
Make sure the directory containing your sqlite database is writable by the user your web server is running as. sqlite occasionally creates some temporary files in the same directory side-by-side your actual sqlite file. Brian On Mon, Feb 28, 2011 at 10:45 AM, Tim wrote: > On Feb 28, 10:05 am,

Re: jquery document ready aggregation

2011-02-28 Thread Bill Freeman
If I'm remembering correctly, the context is composed of a list of dictionaries. When you reference a value, the layers are searched, most recently added first, until one is found that has the variable you want (or not). When you set a variable, it always uses the top layer, even if the same varia

new project settings file not found

2011-02-28 Thread garagefan
this is a first for me. i set up a project like i normally do and get things set up... run syncdb for the first time for the project. Havent had this happen before and things seem to be working on other projects just fine. I've even go so far as to comment out the handful of apps. I presume there

Re: how-to-design-a-django-driven-cms-hosting-like-solution

2011-02-28 Thread delegbede
Check out Practical Django Projects by James Bennette. Sent from my BlackBerry wireless device from MTN -Original Message- From: BearCode Sender: django-users@googlegroups.com Date: Sat, 26 Feb 2011 14:50:27 To: Django users Reply-To: django-users@googlegroups.com Subject: how-to-design

Re: urls.py usage

2011-02-28 Thread Vladimir
>   That you have duplicate registration of one model in your admin.py > somewhere (I believe, I may be wrong). There is no admin.py file in this project. Model.py file contains: from django.db import models from django.contrib import admin class BlogPost(models.Model): title = models.CharFiel

Re: GENERIC VIEW CONCERNS AND EXPLANATION REQUIREMENTS

2011-02-28 Thread Norberto Leite
Short answer: yes. The generic views are there for a reason, to provide a simple implementation of most generic operations like detail views, listings ... A complete different things is the "if I have to", you don't! One thing is DRY other is use the tools and possibilities that the framework gives

Re: Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-02-28 Thread lipt0n
also when i first run fast cgi it is working, but only first page, second return error, after killing fcgi and run it again a can get another page (but only one) it;s looks like this: 1)python2.6 manage.py runfcgi host=127.0.0.1 port=9001 -- settings=settings 2) go to http://localhost <- page is wo

GENERIC VIEW CONCERNS AND EXPLANATION REQUIREMENTS

2011-02-28 Thread Dipo Elegbede
Hi all, I am currently trying to read up generic views. I can do most of my django stuff at my level without the generic view but it appears almost in all texts i read and also seem to be a key part of django's underlying principles of DRY and keeping things from redundancy. My question is, if i

Re: sqlite path

2011-02-28 Thread Tim
On Feb 28, 10:05 am, Tim wrote: > On Feb 26, 9:25 am, spa...@gmail.com wrote: > > > > > > > > > > > Have you tried updating the DB path in settings.py and creating a new db > > file? > > > On Sat, Feb 26, 2011 at 2:30 AM, Andre Terra wrote: > > > Try appending the custom location to the beginning

Re: sqlite path

2011-02-28 Thread Tim
On Feb 26, 9:25 am, spa...@gmail.com wrote: > Have you tried updating the DB path in settings.py and creating a new db > file? > > > > > > > > > > On Sat, Feb 26, 2011 at 2:30 AM, Andre Terra wrote: > > Try appending the custom location to the beginning of your PYTHONPATH. > > > Sincerely, > > And

Django+ oracle, working with apache(mod_python, wsgi) and in runserver, ora-03114 in fastcgi

2011-02-28 Thread lipt0n
Hi my application works fine in apache as mod_python and wsgi, also work great when I run manage.py runserver but I have to move it on nginx. so I run it by 'python2.6 manage.py runfcgi host=127.0.0.1 port=9001 -- settings=settings' and it works fine until it have to connect to the database (oracl

Re: urls.py usage

2011-02-28 Thread Jirka Vejrazka
> AlreadyRegistered at /blog/ > The model BlogPost is already registered That you have duplicate registration of one model in your admin.py somewhere (I believe, I may be wrong). Cheers Jirka -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: urls.py usage

2011-02-28 Thread Vladimir
What does this message (it appears after web browser entering) means: AlreadyRegistered at /blog/ The model BlogPost is already registered ? -- 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@goog

CSRF token can be only rendered in CSRF protected views

2011-02-28 Thread Vlastimil Zima
I was not able to describe my problems to ticket on first attempt, so I try here before creation of another ticket. We use CSRF protection on almost all POST requests, but we encountered some limitations of CSRF protection as currently implemented in django. - You can not render POST form in unp

Re: Extend admin template without copying the whole template

2011-02-28 Thread Dan Christensen
Martin Brochhaus writes: > So I tried the obvious: > > {% extends "admin/base.html" %} > {% block breadcrumb %} > [old breadcrumb code] > [my additional code] > {% endblock %} > > And of course the obvious error happened: The template tries to extend > itself. I think one solution is to create a

Wrong datetime format with datepicker in admin

2011-02-28 Thread Dirk Eschler
Hello, using django-1.2.4 i get the wrong date format when using the datepicker or the today shortcut in the admin. Instead of the format specified in my settings, it generates a local format - "28.02.2011" instead of "2011-02-2011". settings.py: DATE_FORMAT = 'Y-m-d' DATETIME_FORMAT = 'Y-m-d H

limit number of rows in change_list

2011-02-28 Thread bigfudge
How do I limit the number of rows displayed by default in a change_list? Many thanks, B -- 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. To unsubscribe from this group, send em

Re: django and mod_wsgi

2011-02-28 Thread Anoop Thomas Mathew
Try adding, *import os* *import sys* * * *path = 'C:\\Programme\\Apache Software Foundation\\Time2\\Time2\\'* *path1 = 'C:\\Programme\\Apache Software Foundation\\Time2\\'* * * *if path not in sys.path:* *sys.path.append(path)* *sys.path.append(path1) * * * *os.environ['DJANGO_S

django and mod_wsgi

2011-02-28 Thread Szabo, Patrick (LNG-VIE)
I'm trying to get my django-app running on apache 2.2 on windows XP. I've installed everything and the Hello Worlf wsgi ran fine. Now i wanted to run my django ap and did the following in a django.wsgi : import os import sys path = 'C:\\Programme\\Apache Software Foundation\\Time2\\

Re: Extend admin template without copying the whole template

2011-02-28 Thread AndyB
There a ticket or two for this already. For example: http://code.djangoproject.com/ticket/8158 (I think a workaround is to set your ModelAdmin's to use your own template name and in they pull in and override elements of the base templates. The only drawback is you are dependent on the built-in tem

How to cache and clean paginated content?

2011-02-28 Thread galago
I know how to create cache and delete it. But - how can cache and then remove cached content based on pagination. Now my caches are named result-1, result-2, . How in 1 line can I delete all paginated content? -- You received this message because you are subscribed to the Google Groups "Dj

Re: autocomplete omg

2011-02-28 Thread Piotr Zalewa
Hi, Would you give us a little info about your background? Are you familiar with JavaScript (jQuery, MooTools, YUI, anything) ? Can you create a front-end example of autocomplete with a fake data on http://jsfiddle.net/ ? The rest would be a simple search in Django zalun On 11-02-28 08:52,

autocomplete omg

2011-02-28 Thread Szabo, Patrick (LNG-VIE)
Hi, I'm using the latest version of Django with sqlite and want to implement autocomplete for one of my fields. I've tried 4 diffrent tutorials an non oft them works. Has anyone got a full tutorial for me that definetely works with the current version ?! Maybe one youre using yourfelf

Could not find the GEOS library

2011-02-28 Thread ravi krishna
Hi, i am working on a simple employee listing Django application. i wanted to include filtering in my app, so tried installing django-filter module. i think django-filter is not installed properly ( i am not going to use it anyway). But after doing this, when i try to run my application, it gives t

Re: Some cache problems

2011-02-28 Thread galago
Anyone can help me with that error? -- 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. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: How can I control JSON serialization?

2011-02-28 Thread Derek
On Feb 27, 1:46 am, Alexander Bolotnov wrote: > I actually removed this topic from -developers and posted a new one in > -users - I guess you picked it sometime in between. I initially posted in > -developers and then thought it's not very relevant and re-created in > -users. > > sorry for the con