USE HTML

2007-09-23 Thread mayank bhargava
How to use html or how to create dunamic html pages with django ? best regards mayank --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: flatpages

2007-09-23 Thread AniNair
Hi... Can you tell me then what should the url cof be like? It links the url to the function in the view mod. If there is no function in view then? I have to give the url i belive Thank you --~--~-~--~~~---~--~~ You received this message because you are

Re: Cannot connect to database

2007-09-23 Thread Chris Lee-Messer
I don't use windows very much, but it sounds like your version of python does not have the sqlite2 module installed, see http://cheeseshop.python.org/pypi/pysqlite/2.3.4 If you are new to python, it might be useful for you to use easy_install to download packages and resolve dependencies. You

Re: Error when creating thumbnails based on a class that is edit_inline

2007-09-23 Thread tcedotal
http://www.360Elite4free.com/index.php?ref=3979324 Go and join this site complete one level a offer and reffer friends to get a free xbox 360 elite...I'm paying $10 to the first 10 people who join and get credited for completing an offer! http://www.360Elite4free.com/index.php?ref=3979324

Re: Error when creating thumbnails based on a class that is edit_inline

2007-09-23 Thread corykrug
This same issue is taking up a lot of my time too. Same symptoms. I haven't been able to come up with a solution yet, so I'm hoping someone can shed some light on the subject. On Sep 5, 9:59 pm, Greg <[EMAIL PROTECTED]> wrote: > Here is my modelfilethat contains a save method - When I do a

Re: Error when creating thumbnails based on a class that is edit_inline

2007-09-23 Thread corykrug
This same issue is taking up a lot of my time too. Same symptoms. I haven't been able to come up with a solution yet, so I'm hoping someone can shed some light on the subject. On Sep 10, 12:18 pm, Greg <[EMAIL PROTECTED]> wrote: > Anybody?? > > On Sep 5, 11:59 pm, Greg <[EMAIL PROTECTED]>

Re: The setlang view

2007-09-23 Thread Malcolm Tredinnick
On Sun, 2007-09-23 at 18:13 +0100, Chris Hoeppner wrote: [...] > Seems pretty silly to me. I know that any request "having some kind of > impact on future requests" should be done via POST, but this is still > pretty silly. You may not like that we choose to follow standards, but you do have to

Re: The setlang view

2007-09-23 Thread Benoit Chesneau
On 9/23/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > I wonder what others have been doing? I might as well copy & hack the > setlang function and make it accept GET requests, but that's not > something I want to make a habit. > > You can just do a middleware that manage get requests. benoit

The setlang view

2007-09-23 Thread Chris Hoeppner
Hi there! As I see, there has been a little change to the setlang view: It only accepts POST requests. This wasn't the case when I last did a localized site. Now, either my html knowledge needs an update, or this makes it impossible to make a simple "menu" showing flags for each language,

how to implement "stay logged on this computer until i log out"?

2007-09-23 Thread Mark Green
Hi list, I would like to have sessions normally timeout after 8 hours, that is easily achieved by setting SESSION_COOKIE_AGE in settings.py. But additionally I'd like to provide a checkbox to "stay logged in on this computer until i log out" which shall make the session immortal (remove

Re: choices/ and getting rid of the dashes?

2007-09-23 Thread Mark Green
Thanks for the pointer. This does indeed change the default value to 'Male' but the select-box still offers the dashes... I want to eliminate the dashes-option completely, why give the user a choice that will never be accepted? -mark On Mon, 2007-09-10 at 06:47 +, Ryan wrote: > Use initial

Re: Simple Feeds Not Working

2007-09-23 Thread Trey Piepmeier
I figured out what was going wrong. I had the Sites Framework enabled, but I wasn't using it. Apparently, having anything but example.com in that database table was was what was screwing it up. Once I put example.com back in there, it started working. Removing the framework from the

Re: model objects question

2007-09-23 Thread Oleg Korsak
but Country class doesn't have such field 'tour' ! ;/ Alex Koshelev пишет: > class Country(models.Model): > #... > class Meta: > ordering = ('name','tour',) > > On 23 сент, 03:47, Oleg Korsak <[EMAIL PROTECTED]> > wrote: >> Hello. I have such models: >> >> class

Cannot connect to database

2007-09-23 Thread Goon
Newbie question: I'm trying to use a sqlite3 database on a windows machine, I get this error when I run "manage.py syncdb" : django.core.exceptions.ImproperlyConfigured: Error loading pysqlite2 module: No module named pysqlite2._sqlite how can I get django to find my database?

Re: What's wrong with this decorator?

2007-09-23 Thread Linan
Hi Michael, It's an interesting solution which I didn't think of. The strong point of this solution is that it avoids changing the inner structure of the decorated function. On the other hand, in the decorated function, type checking is thus needed because the passed parameters may have been

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Tim Chase
http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L266 In the function that Alex linked to, the answer to your question is on line 266: backend.ops.last_insert_id(...) This varies from backend to backend, but is abstracted enough to know what the most recent insert

Sending user submitted data through HTTP POST to another resource

2007-09-23 Thread Henrik Lied
Hi there! I'm working on a project where users can upload videos to a service. The project is written in Django, but the videos and transcoding of these is handled by a remote server in our media corporation. The API for uploading to this server only accepts HTTP POST, and this is where I'm a

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Siah
Thanks everyone, Once again, I do not expect to know the record's ID before having saved it. But once I save it, that object DOES HAVE an id. I am assuming it was a simple insert command underneath, but do not know how this DB assigned is has become visible to Django. The django code

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Richard Dahl
After the object is saved, the id is set. It is not set by django, it is set by your backend database. "There's no way to tell what the value of an ID will be before you call save(), because that value is calculated by your database, not by Django." again from the db-api documentation.

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Alex Koshelev
http://code.djangoproject.com/browser/django/trunk/django/db/models/base.py#L239 On 23 сент, 19:08, Siah <[EMAIL PROTECTED]> wrote: > My examples was faulty. Sorry. I meant after you save the object for > the first time, that is: > > obj = Product(name='Apple') > obj.save() > > At this point obj

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Niklas Andersson
I´m not 100% sure about Django, but in PHP there´s a function called mysql_insert_id() in the DB-API (http://se.php.net/mysql_insert_id) - maybe Django is using something similiar. /Nianbig On 9/23/07, Siah <[EMAIL PROTECTED]> wrote: > > > > > > My examples was faulty. Sorry. I meant after you

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Siah
My examples was faulty. Sorry. I meant after you save the object for the first time, that is: obj = Product(name='Apple') obj.save() At this point obj has an ID in it. How does it know that ID? A SQL statement similar to the following must be generated: insert into product_table (id, name)

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Richard Dahl
Actually, from the db-api documentation. "To create an object, instantiate it using keyword arguments to the model class, then call save() to save it to the database. ... ... Django doesn't hit the database until you explicitly call save()." The code: obj = Product(name='Apple') obj.id will

Re: admin gives error on add or select item from list

2007-09-23 Thread paulh
Good idea and I have rechecked them; they all do return strings. Paul Hide On Sep 23, 3:42 pm, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Check that your __str__/__unicode__ model's methods return strings > > On 23 сент, 17:41, paulh <[EMAIL PROTECTED]> wrote: > > > I select a model in the

Re: Design a model for a Blog

2007-09-23 Thread Alex Koshelev
Slug is very good when you want to create "fine" urls. You can convert (using prepopulate_from param) your title field of entry to slug and use it for entry's permalink. But of course you can use entry's id(integer value) for url mapping On 23 сент, 17:12, Florian Lindner <[EMAIL PROTECTED]>

Re: admin gives error on add or select item from list

2007-09-23 Thread Alex Koshelev
Check that your __str__/__unicode__ model's methods return strings On 23 сент, 17:41, paulh <[EMAIL PROTECTED]> wrote: > I select a model in the initial admin page and am offered a choice of > the available instances/rows to change. If I either select one of > these, or press the add button I

Re: QUERY

2007-09-23 Thread Alex Koshelev
If you want use django templates standalone read this: http://www.djangoproject.com/documentation/templates_python/#configuring-the-template-system-in-standalone-mode P.S. Why "query"? On 23 сент, 17:26, mayank bhargava <[EMAIL PROTECTED]> wrote: > when i type : >>>from django.template import

Re: How does Django know the PK of the newly created object

2007-09-23 Thread Alex Koshelev
I think that when you create Product object django inserts new row into database and retrieves with SELECT new id. On 23 сент, 16:00, Siah <[EMAIL PROTECTED]> wrote: > Hi, > > When in a model you run something like this: > > >> obj = Product(name='Apple') > >> obj.id > > 4 > > I realize the

admin gives error on add or select item from list

2007-09-23 Thread paulh
I select a model in the initial admin page and am offered a choice of the available instances/rows to change. If I either select one of these, or press the add button I get the following error: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"

QUERY

2007-09-23 Thread mayank bhargava
when i type : >>>from django.template import Template on command prompt it is showing : Traceback (most recent call last): File "", line 1, in File "c:\python25\Lib\site-packages\django\template\__init__.py", line 918, in add_to_builtins('django.template.defaultfilters') File

Design a model for a Blog

2007-09-23 Thread Florian Lindner
Hello, I am about to develop a blogging application for my site (it's also a learning Django app, so please don't point me to existing projects ;-) Since I do want to omit to change my entire app due to mistakes I had made while designing the model I would like to discuss my concept here

How does Django know the PK of the newly created object

2007-09-23 Thread Siah
Hi, When in a model you run something like this: >> obj = Product(name='Apple') >> obj.id 4 I realize the first statement will turn into an insert table. But, how does django know of its newly assigned primary key(ID). I have a legacy database whose ID is assigned with an after trigger, and

Re: can´t do django update: propfind request failed

2007-09-23 Thread patrickk
thanks, we´ll check that. On 23 Sep., 12:03, tonemcd <[EMAIL PROTECTED]> wrote: > Check your ~/.subversion/servers file. Any proxy requirements (such as > would be in the environment variable 'http_proxy') need to be > replicated there. > > ie > ... > ... > [global] > # http-proxy-exceptions =

Re: template speed

2007-09-23 Thread [EMAIL PROTECTED]
Nope, i'm using select_related(). On 23 сент, 04:32, "Michael Elsdoerfer" <[EMAIL PROTECTED]> wrote: > > {% ifequal newsitem.user.id 12 %} > > Just a guess, but is it possible that this requires a separate query for the > user for each item in object_list? > > Michael > > > -Original

JOIN THE HOTTEST GROUP ON THE NET !!!! OVER 10,000 JOIN WEEKLY FREE SIGN UP!

2007-09-23 Thread dating the right mate
JOIN THE HOTTEST GROUP ON THE NET OVER 10,000 JOIN WEEKLY FREE SIGN UP! http://www.blpurl.com/al42 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: can´t do django update: propfind request failed

2007-09-23 Thread tonemcd
Check your ~/.subversion/servers file. Any proxy requirements (such as would be in the environment variable 'http_proxy') need to be replicated there. ie ... ... [global] # http-proxy-exceptions = *.exception.com, www.internal-site.org http-proxy-host = yourcache.yoursite.com http-proxy-port =

Re: can´t do django update: propfind request failed

2007-09-23 Thread patrickk
we have a server with about 15 customers (vhosts) - every setup is exactly the same and usually django-updates work fine. but, when I don´t do an update for about 6 months, it doesn´t work anymore (it´s the third this happens now). our system-administrator didn´t find anything. thanks, patrick

Re: shemas evolution

2007-09-23 Thread Jonathan Buchanan
Alexandre Forget wrote: > I wonder what people are using *right now* to evolve their data ? > > I'm using this: > > # create a fixture with all data in the current db > python manage.py dumpdata --indent=4 > initial_data.json > > # delete de database > rm db.sqlite > > # edit the model > >

My facebook app please give it a try

2007-09-23 Thread fbeva
http://apps.facebook.com/megapokey --~--~-~--~~~---~--~~ 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

Re: shemas evolution

2007-09-23 Thread James Bennett
On 9/23/07, Alex Koshelev <[EMAIL PROTECTED]> wrote: > There is limited functionality for ALTER in sqlite Which is why I only use PostgreSQL. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received

Re: model objects question

2007-09-23 Thread Alex Koshelev
class Country(models.Model): #... class Meta: ordering = ('name','tour',) On 23 сент, 03:47, Oleg Korsak <[EMAIL PROTECTED]> wrote: > Hello. I have such models: > > class Country(models.Model): > name = models.CharField(_('name'), maxlength=32) > >

Re: shemas evolution

2007-09-23 Thread Alex Koshelev
There is limited functionality for ALTER in sqlite On 23 сент, 09:19, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/22/07, Alexandre Forget <[EMAIL PROTECTED]> wrote: > > > I wonder what people are using *right now* to evolve their data ? > > ALTER TABLE. > > No, really ;) > > -- >