Re: model objects question

2007-09-22 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-22 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 ;) > > -- > "Bureaucra

Re: shemas evolution

2007-09-22 Thread Alex Koshelev
There is some schema-evolution tools but they are not stable. Use the search for this group. On 23 сент, 08:55, "Alexandre Forget" <[EMAIL PROTECTED]> 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

Re: shemas evolution

2007-09-22 Thread James Bennett
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 ;) -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You re

shemas evolution

2007-09-22 Thread Alexandre Forget
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 # recreate db and reload data manage syncdb --noinp

Re: Today's newform-admin branch, svn version 6364

2007-09-22 Thread Russell Keith-Magee
On 9/23/07, Pigletto <[EMAIL PROTECTED]> wrote: > > > Thanks for the fix; I've applied it to the trunk in [6406]; it will > > find its way into newforms-admin on the next branch merge. > One more thing about this patch I wonder about, is why 'force_unicode' > can't/shouldn't > use just: > > if str

Re: i18n translation urls in templates

2007-09-22 Thread ferran
Hi Esau, Thanks for reply my messages, for do that: {% if es_home_url_presentation %} something {% if en_home_url_presentation %} something else i'm before need trans tag because "es_home_url_presentation" and "en_home_url_presentation" are a i18n string's for this tag, and represents the nam

Re: install on windows

2007-09-22 Thread Goon
it looks something like this: DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'c:/mytest/myproject/sqlite3/pysqlite2/ test.db' DATABASE_USER = '' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = '' --~--~-~--~~~---~--~~ You received this message because you

RE: template speed

2007-09-22 Thread Michael Elsdoerfer
> {% 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 Message- > From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] > On Behalf Of [EMAIL PROTECTED] > Sent: Satur

Re: install on windows

2007-09-22 Thread Justin Lilly
Please paste your settings.py file with the portions related to the database. On 9/22/07, Goon <[EMAIL PROTECTED]> wrote: > > > I have Python2.5, pysqlite2, sqlite3 and django installed, but I can't > get the database working. when I do 'manage.py runserver' I get > errors like: > > "skipping va

install on windows

2007-09-22 Thread Goon
I have Python2.5, pysqlite2, sqlite3 and django installed, but I can't get the database working. when I do 'manage.py runserver' I get errors like: "skipping validation because things arent configured properly" or "Improperly Configured: Error loading pysqlite2 module: no module named pysqlite2

model objects question

2007-09-22 Thread Oleg Korsak
Hello. I have such models: class Country(models.Model): name = models.CharField(_('name'), maxlength=32) def __unicode__(self): return self.name class Meta: verbose_name = _('country') verbose_name_plural = _('countr

Re: Today's newform-admin branch, svn version 6364

2007-09-22 Thread Pigletto
> Thanks for the fix; I've applied it to the trunk in [6406]; it will > find its way into newforms-admin on the next branch merge. One more thing about this patch I wonder about, is why 'force_unicode' can't/shouldn't use just: if strings_only and isinstance(s, basestring,): ... Docstring f

Re: How to implement funky caching

2007-09-22 Thread julian.bash
Rails/Django creates the html files and the webserver serves one of those or calls django if there is none that matches the request. For example if someone requests "domain.com/blog/2007/13/12/my-god" than there would be a folder somewhere in the filesystem where the file "/blog/2007/13/12/my-god/

Simple Feeds Not Working

2007-09-22 Thread Trey Piepmeier
I can't seem to get the most basic of feeds working by following the instructions here: http://www.djangoproject.com/documentation/syndication_feeds/ I keep getting this error message: --- DoesNotExist at /feeds/feed_name/ Site matching query does not exist. Request Method: GET Request URL:

admin functionality outside of admin screen

2007-09-22 Thread OliverMarchand
Hello, so now I have spent some time with Django and after the "WOW! the models and the admin interface so cool!"-phase I am now in a "somehow things are complicated for me..."-phase. Here is what I did: * defined a few models * used the admin screen * defined a few views Now my idea was of cou

Re: How to implement funky caching

2007-09-22 Thread Chris Hoeppner
If it is Django/Rails who is doing the thing, the server *has* to run it. So it's nonsense speaking about mephisto doing that. The deal would be in apache taking care of it. El s�b, 22-09-2007 a las 17:26 +, julian.bash escribi�: > Thanks a lot for your answers! > > The even greater thing w

Re: How to implement funky caching

2007-09-22 Thread Sean Perry
On Sep 22, 2007, at 10:26 AM, julian.bash wrote: > > Thanks a lot for your answers! > > The even greater thing with funky caching is that the webserver only > has to serve html (if there is a cached version) and doesn't have to > run django. So, django's normal caching is good, but when the serve

Add/change detail pages will throw an exception, newforms-admin, svn version 6407

2007-09-22 Thread Rob J Goedman
Hi Russ, Did test the json based fixture problem. Initially I continued to have problems until I actually cleaned up the database itself. Tricky! But now it is working fine! Thanks a lot. In testing the fix for the 1st problem this morning, I did notice the 2nd problem is still there. A furt

Re: How to implement funky caching

2007-09-22 Thread julian.bash
Thanks a lot for your answers! The even greater thing with funky caching is that the webserver only has to serve html (if there is a cached version) and doesn't have to run django. So, django's normal caching is good, but when the server only has to serve already-generated html-files, the whole t

Re: File uploading problems

2007-09-22 Thread Russell Keith-Magee
On 9/22/07, jacoberg2 <[EMAIL PROTECTED]> wrote: > > I tried using the file upload methods like using a filefield in a > model, and i got it to work on a test program but i can't sem to get > it to work on my real site and I get a few different errors when it > comes up. this is my code: ... > Tem

ordering for many-to-many fields: random?

2007-09-22 Thread patrickk
I never thought about this before, but displaying the results of a many-to-many relationship on a website seems to be ordered by random. Lets´s say I´m having a movie and I´m assigning countries with m2m. The movie is a co-production and the countries should be "USA/GB/F". Within the Admin-Interf

Re: form variables in templates

2007-09-22 Thread Alex Koshelev
Yes. If you had request context processor installed you can access to variables like so {{request.POST.foo}} On 22 сент, 18:47, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > can I access form variables (like request.POST["foo"]) in a template? Without > writing them in the argument dictio

form variables in templates

2007-09-22 Thread Florian Lindner
Hello, can I access form variables (like request.POST["foo"]) in a template? Without writing them in the argument dictionary before. Thanks, Florian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Windows Optimization Tips

2007-09-22 Thread John Travolta
http://windowsfreetips.blogspot.com/ --~--~-~--~~~---~--~~ 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: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-22 Thread Russell Keith-Magee
On 9/20/07, Tomasz Melcer <[EMAIL PROTECTED]> wrote: > > On 19 Wrz, 16:37, Rob J Goedman <[EMAIL PROTECTED]> wrote: > > Tomasz, > > > > The fixture is breaking with ' "2007-09-17 09:17:57.890755", ', after > > revision 6329 it either > > started to add the subseconds or can't read them anymore. No

Re: Today's newform-admin branch, svn version 6364

2007-09-22 Thread Russell Keith-Magee
On 9/20/07, Pigletto <[EMAIL PROTECTED]> wrote: > > > >> Looking at the initial_data.json file I think it complains about > > >> timestamps such as '2007-09-16 12:34:51.765432'. Removing the sub- > > >> second parts fixes it, it accepts a :SS component. This happen in > > >> user and some other fi

Re: How to implement funky caching

2007-09-22 Thread Tim Chase
> "you redirect 404 errors to a script, which looks at the requested > URL, decides whether it should actually exist, and if it should it > builds the file from the database, saves it to the filesystem, and > then returns the page to whoever requested it. Next time that URL is > requested, the sta

Re: How to implement funky caching

2007-09-22 Thread Chris Hoeppner
That's more or less how flatpages work. Have a look at their middleware. El s�b, 22-09-2007 a las 05:40 -0700, julian.bash escribi�: > Hi! > > Does anyone have an idea how to implement funky caching with django? > For those who don't know what that is (it's similar to how movabletype > does cach

How to implement funky caching

2007-09-22 Thread julian.bash
Hi! Does anyone have an idea how to implement funky caching with django? For those who don't know what that is (it's similar to how movabletype does caching but doesn't prepache everything): "you redirect 404 errors to a script, which looks at the requested URL, decides whether it should actuall

Top 10 Tips to Keep Your Car Healthy

2007-09-22 Thread Juicy Hilton
Top 10 Tips to Keep Your Car Healthy *With so much to do, man

template speed

2007-09-22 Thread [EMAIL PROTECTED]
Hello. I'm worrying about my django-app setted up on mod_python 3.3.1+apache 2.0.59 speed. I have this model http://dpaste.com/20362/. On production server (Pentium D, 2Gb RAM) with all DEBUG turned off and StatsMiddleware from (http://code.djangoproject.com/wiki/PageStatsMiddleware to get page g

Re: customized admin form

2007-09-22 Thread eXt
Ello! I think that the only way to do what you want is to use methods described here: http://www.djangobook.com/en/beta/chapter18/ regards -- Jakub Wiśniowski On 22 Wrz, 11:56, Rufman <[EMAIL PROTECTED]> wrote: > how can i make a admin form that can be used with the normal django > admin, but

customized admin form

2007-09-22 Thread Rufman
how can i make a admin form that can be used with the normal django admin, but contains other fields that the ones defined in the db model. I what to make a form that allows that user to upload a csv file, which is then parsed and inserted into the db according to the columns defined. This should

Re: How to call a .htm page without going to the views.py file?

2007-09-22 Thread Bert Heymans
If it's just just a static html page you want to show using none of the template functions it may be worth it to just serve it from the webserver (directly by apache or lighttpd, or whatever you are using) instead of handling the request with the Django dispatch mechanism. regards Bert On Sep 22

Re: i18n translation urls in templates

2007-09-22 Thread Esau Rodriguez
On Saturday 22 September 2007 08:51:11 ferran wrote: > Hi, > > I'm trying translate url's in my templates but i don't know how, i'm > using tags url and trans > i'm try this > > {% url trans "home_url_presentation" %} > {% url | trans "home_url_presentation" %} > but do not anything > > in locale

i18n translation urls in templates

2007-09-22 Thread ferran
Hi, I'm trying translate url's in my templates but i don't know how, i'm using tags url and trans i'm try this {% url trans "home_url_presentation" %} {% url | trans "home_url_presentation" %} but do not anything in locale .po files: /en/LC_MESSAGES/django.po msgid "home_url_presentation" msgst