Re: one to many

2007-07-06 Thread Jeremy Dunck
On 7/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > class content(model.Models): > link = models.URLField(verify_exists=True) > mods = models.SomeKindOfManyToOne(lotsOfMods) Both in the database and in Django's ORM, it's done the other direction. What you're looking for is called a fo

one to many

2007-07-06 Thread [EMAIL PROTECTED]
Hi, I'm new to DB issues. I'm hoping Django can help me out. I'm trying to figure out how to do a one to many relationship. As I understand it, this means that a single table entry for a particular model would refer to many entries of another model table. Is that correct? Imagine a site like Di

Re: newforms-admin character encoding problem

2007-07-06 Thread leifbyron
Hi Malcom, Thanks for the quick reply! I will wait for the Unicode changes to be ported to the newforms-admin branch. Just so I understand the situation... Does the current newforms-admin branch always trigger errors when non-ASCII data such as é and ¢ are entered into text fields? And while we

Re: __unicode__() doesn't work in model

2007-07-06 Thread Olli Wang
Sorry, my mistake. I should refer tutorial for version 0.96. Thanks. :) On Jul 7, 10:45 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-07-07 at 02:42 +, Olli Wang wrote: > > Hi, I'm new to Django. I just followed the tutorial - Poll example > > (http://www.djangoproject.com/

Re: __unicode__() doesn't work in model

2007-07-06 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 02:42 +, Olli Wang wrote: > Hi, I'm new to Django. I just followed the tutorial - Poll example > (http://www.djangoproject.com/documentation/tutorial01/) . It said > that adding __unicode__() to models may change object's > representations, but don't know why that doesn't

__unicode__() doesn't work in model

2007-07-06 Thread Olli Wang
Hi, I'm new to Django. I just followed the tutorial - Poll example (http://www.djangoproject.com/documentation/tutorial01/) . It said that adding __unicode__() to models may change object's representations, but don't know why that doesn't take effect on my computer. Run "Poll.objects.all()" in she

Re: problem with django dev server and subprocess.Popen

2007-07-06 Thread Robert Coup
Robert Coup wrote: > Carl Karsten wrote: > >> Malcolm Tredinnick wrote: >> >> >>> I don't know what htmldoc does, but if it tries to access the url you >>> give it, you can't do that. The dev server is single threaded. It is >>> already serving one request (running your view), so it can

Re: problem with django dev server and subprocess.Popen

2007-07-06 Thread Robert Coup
Carl Karsten wrote: > Malcolm Tredinnick wrote: > >> I don't know what htmldoc does, but if it tries to access the url you >> give it, you can't do that. The dev server is single threaded. It is >> already serving one request (running your view), so it can't serve the >> second parallel access

Re: newforms-admin character encoding problem

2007-07-06 Thread Malcolm Tredinnick
On Sat, 2007-07-07 at 02:23 +, leifbyron wrote: > Hello, > > I have run into a character-encoding error while developing a custom > admin site with the newforms-admin branch. newforms-admin has not had the Unicode changes ported across to it yet. Using it with non-ASCII data is not recommend

newforms-admin character encoding problem

2007-07-06 Thread leifbyron
Hello, I have run into a character-encoding error while developing a custom admin site with the newforms-admin branch. Everything works fine with standard alphanumeric input, but as soon as I enter a special character (an accented e or a pound sign, for example) into a text field or textarea, I

Make money now!!!

2007-07-06 Thread Asher
WHY NOT MAKE MONEY AND CHANGE YOUR LIFE FOREVER< THIS REALLY DOES WORK. I found this on a bulletin board and decided to try it. A little while back, I was browsing through newsgroups, just like you are now, and came across an article similar to this that said you could make thousands of dollars wi

Re: Database caching, querysets not evaluating?

2007-07-06 Thread ejot
Hmm, Im guessing this might also have something to do with local() for threads? Made my app work by using an extra and from my point of view uneccesary worker thread that does the polling on the database.. . anyone willing to offer some insight on this? I see people are trying to do external (fro

Re: custom template tag

2007-07-06 Thread [EMAIL PROTECTED]
You might want to have a look at this, if not to use it, at least to see how the templatetags are done: http://code.google.com/p/django-template-utils/ On Jul 6, 4:39 pm, dystopia <[EMAIL PROTECTED]> wrote: > Hi, > I've been trying to get something together to > see if I can get to grips with w

Re: Error log interpretation

2007-07-06 Thread Vincent Nijs
Graham, Looks like you are right. If I hit the reload button repeatedly this message pops up in the error logs. Doesn't seem like a serious error then. Thanks for helping me sort that out! Vincent On 7/5/07 9:47 PM, "Graham Dumpleton" <[EMAIL PROTECTED]> wrote: > > On Jul 6, 9:38 am, Vincent

Re: caching and authentication

2007-07-06 Thread Jeremy Dunck
On 7/6/07, patrickk <[EMAIL PROTECTED]> wrote: > > when having a header where the username and a logout-button is > displayed, how do you cache this page/view? There's a CACHE_MIDDLEWARE_ANONYMOUS_ONLY setting if you want to only do anonymous caching. But I think you must have your cache middlew

Is possible run silently the pysqlite.exe on windows?

2007-07-06 Thread mamcxyz
I wonder if exist a way to install http://initd.org/pub/software/pysqlite/releases/2.3/2.3.4/pysqlite-2.3.4.win32-py2.4.exe using the command line and avoiding the GUI... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: cross-table unique_together?

2007-07-06 Thread Todd O'Bryan
On Fri, 2007-07-06 at 21:50 +, Nathan Ostgard wrote: > You would either have to duplicate the Title foreign key in the Copy > model or write a custom check in the save method. > > To enforce uniqueness over several columns you would use the > "unique_together" field of the Meta class for your

Re: cross-table unique_together?

2007-07-06 Thread Nathan Ostgard
You would either have to duplicate the Title foreign key in the Copy model or write a custom check in the save method. To enforce uniqueness over several columns you would use the "unique_together" field of the Meta class for your Copy model. (see: http://www.djangoproject.com/documentation/model

[Now making $1,000+ a day is easy.]

2007-07-06 Thread AShopper.net
We've been helping people like you profit online since 1994. Here are some of the ways we can help: * you already have a website and need custom design * you need your domain hosted or need to get a domain * you want to have an online home business but aren't sure how to get started * yo

Re: Anyone running Django and MySQL Cluster

2007-07-06 Thread Brian Morton
I have not done this before with Django, but I have set up a MySQL cluster before. It is the same as a standard MySQL server. Just connect to the management node as your SQL server. On Jul 6, 3:01 pm, johnny <[EMAIL PROTECTED]> wrote: > Is it even possible to run Django and MySQL Cluster or I h

Re: caching and authentication

2007-07-06 Thread [EMAIL PROTECTED]
Yes. However, you can probably cut down on your code in the view a bit by saying if the user is authenticated, then don't add it to the cache. If they are not authenticated, cache the result. This should allow you to render the template once, then conditionally cache the result after rendering.

Re: Checkout with Tortoise SVN

2007-07-06 Thread [EMAIL PROTECTED]
I have seen this error before. It is usually because your proxy doesn't support the PROPFIND command. Ask your administrator to upgrade the proxy (usually squid) to a version that supports this, or to reconfigure the proxy to allow this HTTP method. On Jul 6, 5:21 am, tsc <[EMAIL PROTECTED]> wr

Re: Filtering foreignkey results with newforms form_for_model

2007-07-06 Thread [EMAIL PROTECTED]
Thank you James, for both the solution and the advice. I really liked forms_for_model as a crutch while I got up to speed on newforms, but like most crutches, I'm finding I may spend more time working against it. Still, a nifty thing for a simple, straightforward form. On Jul 6, 3:12 pm, "James B

Re: Error loading MySQLdb module

2007-07-06 Thread Bryan L. Fordham
looks like you need to install MySQLdb: http://sourceforge.net/projects/mysql-python Jalil wrote: > I keep getting this below error when I try to sync my database. > I am using python2.3. Any ideas? > > > > [no job set:~/dev/mysite] 113% python2.3 manage.py syncdb > Traceback (most recent call

custom template tag

2007-07-06 Thread dystopia
Hi, I've been trying to get something together to see if I can get to grips with writing my own tempalte tags. In the end I came up with something like this (so far): from myproject.shop.models import Product from django import template register = template.Library() def get_latest_products(par

Error loading MySQLdb module

2007-07-06 Thread Jalil
I keep getting this below error when I try to sync my database. I am using python2.3. Any ideas? [no job set:~/dev/mysite] 113% python2.3 manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python2.3/site-packages/

Re: Slug (w/o using SlugField) Problems

2007-07-06 Thread Tim Chase
>> You might need to adopt a different approach to URL construction that is >> reversible (writing your own version of slugify, possibly?). > > Thanks for the help Malcolm. Using Jeff Croft's "I'm not a programmer" > excuse, would it be too much trouble to request a small example of a > reversibl

Re: Filtering foreignkey results with newforms form_for_model

2007-07-06 Thread James Bennett
On 7/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > EventFormClass.base_fields['club'].widget = > widgets.Select(choices=Club.objects.filter(approved=True)) > > But that throws > TypeError at /clubs/events/ > unpack non-sequence The 'choices' argument should look like this: ((1, 'Foo'), (

Re: Filtering foreignkey results with newforms form_for_model

2007-07-06 Thread [EMAIL PROTECTED]
I'm still struggling with this... came up with EventFormClass.base_fields['club'].widget = widgets.Select(choices=Club.objects.filter(approved=True)) But that throws TypeError at /clubs/events/ unpack non-sequence Any ideas? On Jul 5, 2:13 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >

OT: NICEST butt EVER!

2007-07-06 Thread JohnZhang
NiceVERY nice ;) http://www.thepollspace.com/polls.php?pollid=1722 --~--~-~--~~~---~--~~ 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 uns

Re: Slug (w/o using SlugField) Problems

2007-07-06 Thread Bryan Veloso
> You might need to adopt a different approach to URL construction that is > reversible (writing your own version of slugify, possibly?). Thanks for the help Malcolm. Using Jeff Croft's "I'm not a programmer" excuse, would it be too much trouble to request a small example of a reversible slugify?

Re: Django Template

2007-07-06 Thread dystopia
Hi Doug, Thanks for your reply. I've been trying to get something together to see if I can figure this all out. In the end I came up with something like this (so far): from myproject.shop.models import Product from django import template register = template.Library() def get_latest_products(pa

Anyone running Django and MySQL Cluster

2007-07-06 Thread johnny
Is it even possible to run Django and MySQL Cluster or I have to write some patch to django for it to work (I am not a python or Django guru.)? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Trying to use many-to-many to emulate a one-to-one field

2007-07-06 Thread Charles Wesley
Correction: Use a many-to-ONE field On Jul 3, 3:06 pm, Charles Wesley <[EMAIL PROTECTED]> wrote: > Hi, > > Since I can't (as far as I can tell) enable inline editing on a one-to- > one field, I'm trying to use an inline-edited many-to-many field with > a related object maximum of 1. Trivial e

Re: Trying to use many-to-many to emulate a one-to-one field

2007-07-06 Thread Charles Wesley
Correction: Use a many-to-ONE field On Jul 3, 3:06 pm, Charles Wesley <[EMAIL PROTECTED]> wrote: > Hi, > > Since I can't (as far as I can tell) enable inline editing on a one-to- > one field, I'm trying to use an inline-edited many-to-many field with > a related object maximum of 1. Trivial e

cross-table unique_together?

2007-07-06 Thread Todd O'Bryan
I'm writing an app to deal with checking out textbooks to students. The models are Title: the book PurchaseGroup: when purchased and how much they cost, foreign key to Title Copy: number, foreign key to PurchaseGroup I'd like to make it so that no two copies have the same

Re: Help with a Caching Strategy

2007-07-06 Thread Jeremy Dunck
On 7/6/07, Clint Ecker <[EMAIL PROTECTED]> wrote: ... > When I set up caching I then just cache this_month_detail for 15 > minutes and previous_month_detail for 10 years or so. What cache backend are you using? Note that memcached has an LRU expiry policy, so that if there is pressure on the cac

Re: Difficulty validating ModelMultipleChoiceField

2007-07-06 Thread danylo
Problem solved thanks to Adrian. Added: from django.utils.datastructures import MultiValueDict and I added the following to the SortedCheckBox widget: def value_from_datadict(self, data, name): if isinstance(data, MultiValueDict): return data.getlist(name) return

Re: Help with a Caching Strategy

2007-07-06 Thread Clint Ecker
Thanks Jeremy, I'll try to expand a bit, and give some insight into a solution I crafted this morning after reading your message (it flipped a switch in my brain) > How's the data updated? Need to know how to get the update info to > the cache. :) The data is updated by a crontab job that

Re: Newforms Attribute Errors

2007-07-06 Thread robo
Ok, For the record, I finally figured out the problem. Guess what? Nothing was wrong with my code. I simply updated from 0.96-pre to 0.97-pre and everything went well. Hopefully this discussion will help some other poor lonely developer out there who will stumble across this miserable error. Re

Re: Feeds don't work with Unicode URLs

2007-07-06 Thread web-junkie
On Jul 6, 4:44 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-06 at 07:25 -0700, web-junkie wrote: > > Thanks for your reply. I'll give more information: > > > # c:\django_src\django\core\handlers\base.py in get_response > > > 77. response = callback(request, *callback_args

Re: problem with django dev server and subprocess.Popen

2007-07-06 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Fri, 2007-07-06 at 07:18 -0700, Filippo Santovito wrote: >> Hi all, >> I'm having a strange problem with a view. >> Its code runs well if I test if in the shell but seems to block the >> dev server: >> >> #django 0.96 >> def html2pdf(request, url = None ): >> fro

Re: ubuntu 6.06 deployment issues

2007-07-06 Thread Carl Karsten
Graham Dumpleton wrote: > On Jul 6, 2:59 pm, John-Scott <[EMAIL PROTECTED]> wrote: >> On Jul 6, 12:29 am, Graham Dumpleton <[EMAIL PROTECTED]> >> wrote: >> >>> Hmmm, I'm not sure the documentation is actually accurate. When you >>> use manage.py to run up development server for Django, it will >>>

Re: Django books application i18n

2007-07-06 Thread Joseph Heck
I think most everything that you'd like to know is detailed out at http://www.djangoproject.com/documentation/i18n/ -joe On 7/6/07, Gianluca <[EMAIL PROTECTED]> wrote: > > Hello, > I'm following the Django tutorial about books application. How can I > internationalize this application? > For exa

Europython, anyone?

2007-07-06 Thread Michael Radziej
Hi, I'm going to attend the Europython congress next week, and I'll arrive on early Sunday afternoon. If anyone would like to gather together, please send me an email, I'd appreciate! Cheers, Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax

Per request internal variables

2007-07-06 Thread PoBK
I've got a case for passing an object between various components within my framework. The basic concept is similar to the way Mod_Python does things, where I can add an attribute to the request instance and that attribute will persist accross the current request only, irrespective of which handle

Re: TextField in newforms

2007-07-06 Thread Todd O'Bryan
On Fri, 2007-07-06 at 11:00 -0500, James Bennett wrote: > On 7/6/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > Is there any reason there's not a TextField in newforms that defaults to > > use a TextArea widget other than the fact that no one has written one > > yet? > > http://groups.google.com

Re: TextField in newforms

2007-07-06 Thread James Bennett
On 7/6/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Is there any reason there's not a TextField in newforms that defaults to > use a TextArea widget other than the fact that no one has written one > yet? http://groups.google.com/group/django-users/browse_frm/thread/b3dc5cc742f3f068/ -- "Burea

TextField in newforms

2007-07-06 Thread Todd O'Bryan
Is there any reason there's not a TextField in newforms that defaults to use a TextArea widget other than the fact that no one has written one yet? Todd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread [EMAIL PROTECTED]
As for impolite, personally I have a bigger problem with subjects changing back and forth, but that's me... Anyway, Naco, you're in the ballpark. If it were me, I'd do something like: class Photo(models.Model): image= ImageField(upload_to="photos/") title= CharField(maxlength=10

Mimicking, generalizing a paper application process

2007-07-06 Thread stv
I'm looking for some information about existing applications that do ... applications. I tried googling this, but you can see where the difficult comes in. Basically, we have a number of paper applications that we want to automate. Some portion of each application will be the same basic contact i

function to generate choices list

2007-07-06 Thread David Reynolds
Hi, I'm trying to pre-populate a choices list for a CharField from some folders on the file system, I was doing this by calling a function within the models.py which assigned the list of folders to a variable which was then used in the charfield. This all worked perfectly using the develo

Abstracting the low level API

2007-07-06 Thread Henrik Lied
Hi there! The cache middleware didn't quite suit my needs, so I threw up a small function to reset the cache key whenever the object is updated. The functions look like this: http://dpaste.com/hold/13712/ Sample usage would be >>> entry = cache_key(request, 'blog', Entry.objects.get(id=1)) The

Database caching, querysets not evaluating?

2007-07-06 Thread ejot
Im really banging my head against a wall trying to get my threaded application to play nice with djangos ORM... this is what my thread does for each iteration.. def run(self): while self.keepRunning: print repr(Topic.objects.get(id=1).content_set.order_by("- id")[0])

Re: Feeds don't work with Unicode URLs

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 07:25 -0700, web-junkie wrote: > Thanks for your reply. I'll give more information: > > # c:\django_src\django\core\handlers\base.py in get_response > > 77. response = callback(request, *callback_args, > **callback_kwargs) ... > > # c:\django_src\django\contrib\syndicat

Django books application i18n

2007-07-06 Thread Gianluca
Hello, I'm following the Django tutorial about books application. How can I internationalize this application? For example, how can I internationalize a field name of insert book form? Thanks Gianluca --~--~-~--~~~---~--~~ You received this message because you ar

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread Jason F. McBrayer
Naco <[EMAIL PROTECTED]> writes: > Well im looking for tutorials on building a simple photo app to start > with Have a look at stockphoto (http://www.carcosa.net/jason/software/django/stockphoto/). It is a bit out of date, and has a few bugs and so forth that are on my to-fix list, but it is ba

Re: Feeds don't work with Unicode URLs

2007-07-06 Thread web-junkie
Thanks for your reply. I'll give more information: # c:\django_src\django\core\handlers\base.py in get_response 77. response = callback(request, *callback_args, **callback_kwargs) ... # c:\django_src\django\contrib\syndication\views.py in feed 19. feedgen = f(slug, request.path).get_feed(

Re: ubuntu 6.06 deployment issues

2007-07-06 Thread Vincent Nijs
Maybe an example would be useful as well: == Apache conf file === ServerName site.com ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/user/django/site SetHandler python-program PythonPath "['/home/user/django'] + sys.path" PythonHandler django.

Re: problem with django dev server and subprocess.Popen

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 07:18 -0700, Filippo Santovito wrote: > Hi all, > I'm having a strange problem with a view. > Its code runs well if I test if in the shell but seems to block the > dev server: > > #django 0.96 > def html2pdf(request, url = None ): > from django.http import HttpResponse >

problem with django dev server and subprocess.Popen

2007-07-06 Thread Filippo Santovito
Hi all, I'm having a strange problem with a view. Its code runs well if I test if in the shell but seems to block the dev server: #django 0.96 def html2pdf(request, url = None ): from django.http import HttpResponse import subprocess response = HttpResponse(mimetype='application/pdf'

Re: Redirecting within custom template tags

2007-07-06 Thread Jason F. McBrayer
neebone <[EMAIL PROTECTED]> writes: > Just to update, I'm getting the form to post to a different url which > handles the logic of creating the comment then redirects back to the > article page on success. All good. My only problem is what to do if > the form contains missing fields - I need to g

Re: psycopg/psycopg2 - error at the loading

2007-07-06 Thread Thomas Guettler
Am Freitag, 6. Juli 2007 15:43 schrieb uxmal: > hello, > I know it isn't directly related to django, but well my django depends > on it... > > yesterday I installed postgresql, mxBase, and psycopg 1.1 on openSUSE > 10.2, > and it worked fine until today (Django is really cool!). > > > > using psyc

Re: Feeds don't work with Unicode URLs

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 06:51 -0700, web-junkie wrote: > Hi, I have a problem of getting my feeds to work with unicode URLs. > > File "/usr/local/lib/python2.4/site-packages/django/contrib/ > syndication/feeds.py", line 12, in add_domain >url = u'http://%s%s' % (domain, url) > > UnicodeDecode

Feeds don't work with Unicode URLs

2007-07-06 Thread web-junkie
Hi, I have a problem of getting my feeds to work with unicode URLs. File "/usr/local/lib/python2.4/site-packages/django/contrib/ syndication/feeds.py", line 12, in add_domain url = u'http://%s%s' % (domain, url) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19: ordinal

psycopg/psycopg2 - error at the loading

2007-07-06 Thread uxmal
hello, I know it isn't directly related to django, but well my django depends on it... yesterday I installed postgresql, mxBase, and psycopg 1.1 on openSUSE 10.2, and it worked fine until today (Django is really cool!). But after upgrading it mysteriously decided to stop working... using psyco

Re: No module named _md5

2007-07-06 Thread Roboto
i'm not great at this, but a shot in the dark - turn off mod_php On Jul 5, 2:59 pm, e-gor <[EMAIL PROTECTED]> wrote: > I have python 2.5.1, django report errors: > > Mod_python error: "PythonHandler django.core.handlers.modpython" > > Traceback (most recent call last): > > File "/usr/local/lib/

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread Kai Kuehne
To avoid confusion: Class names *start* with an uppercase letter. :-) --~--~-~--~~~---~--~~ 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 unsubs

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-06 Thread Kai Kuehne
Hi Naco, On 7/6/07, Naco <[EMAIL PROTECTED]> wrote: > > sorry didnt mean to Do you have a concrete problem or error message? I don't know what you mean with Photo-App. One tip: Class names are upper-case. There is a snippet on djangosnippets.org to display thumbnails of ImageField in the admin

Re: Slug (w/o using SlugField) Problems

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 11:41 +, Bryan Veloso wrote: > Alright, well let me get the information out of the way first: > > models.py > -- > char_id = models.IntegerField('Character ID', > primary_key=True) > name= models

Re: newforms: I18N (Date und Decimal)

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 13:25 +0200, Thomas Güttler wrote: > Hi, > > I read the source of the newforms module, but there > seems no easy way to get i18n for dates and decimals. [...] > > The constructor of models.DecimalField could take the > decimal separator as keyword argument and give his Inpu

Slug (w/o using SlugField) Problems

2007-07-06 Thread Bryan Veloso
Alright, well let me get the information out of the way first: models.py -- char_id = models.IntegerField('Character ID', primary_key=True) name= models.CharField('Name', maxlength=90) def get_absolute_url(self): ret

newforms: I18N (Date und Decimal)

2007-07-06 Thread Thomas Güttler
Hi, I read the source of the newforms module, but there seems no easy way to get i18n for dates and decimals. widget.py: -- class Input(Widget): def render(self, name, value, attrs=None): if value is None: value = '' final_attrs = self.build_attrs(attr

Re: Redirecting within custom template tags

2007-07-06 Thread neebone
On Jul 6, 9:57 am, neebone <[EMAIL PROTECTED]> wrote: > On Jul 6, 9:46 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > > > On Fri, 2007-07-06 at 08:26 +, neebone wrote: > > > [...] > > > > Ok, I've got a page which uses a generic view to load the article into > > > the template. Al

Re: Checkout with Tortoise SVN

2007-07-06 Thread Daniel S. Reichenbach
Hi, > I'm on Windows and using Tortoise SVN, which has worked nice so far > for other projects, but not for django. I dont even get an error > message. http://code.djangoproject.com/svn/django/trunk/django is the > right source? If you are behind a Squid proxy, or any other proxy that restricts H

Re: Checkout with Tortoise SVN

2007-07-06 Thread Horst Gutmann
It might be a problem with your proxy server. This error looks like Tortoise sends a REPORT command to the SVN server that the proxy server doesn't understand. You can find some details about this in the SVN FAQ [1]. [1] http://subversion.tigris.org/faq.html#proxy - Horst Gary Doades wrote: > I

Re: Checkout with Tortoise SVN

2007-07-06 Thread Gary Doades
I can't say I've used Tortoise SVN through a proxy before and I've never seen that error. You might be better off asking the guys over at Tortoise SVN what that error means. Regards, Gary. tsc wrote: > Sorry, but I've forgotten to set the proxy server in Tortoise. Now it > worked a little bett

Re: Running fast cgi server

2007-07-06 Thread KpoH
look is an example http://www.djangoproject.com/documentation/fastcgi/#running-django-on-a-shared-hosting-provider-with-apache [EMAIL PROTECTED] пишет: > Hi, > Instead of using "python manage.py " to start fast cgi > server. How to start a server using a single python script. > > Tha

caching and authentication

2007-07-06 Thread patrickk
when having a header where the username and a logout-button is displayed, how do you cache this page/view? when using the per-view cache, the authentication doesn´t work anymore (that means that my username is still displayed in the header, although I´m already logged out). when using the l

Re: CharField vs. CharField

2007-07-06 Thread Thomas Güttler
Am Freitag, 6. Juli 2007 10:41 schrieb Malcolm Tredinnick: > On Fri, 2007-07-06 at 10:35 +0200, Thomas Güttler wrote: > > Hi, > > > > I think it is bad, that there are two CharField classes. ... > Any particular reason you only want to change CharField? Or any > technical reason why you think the

Running fast cgi server

2007-07-06 Thread meledictas
Hi, Instead of using "python manage.py " to start fast cgi server. How to start a server using a single python script. Thank Chatchai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Attributes for ManyToMany

2007-07-06 Thread patrick k.
here it is: http://code.djangoproject.com/browser/django/trunk/tests/modeltests/ m2m_intermediary/models.py Am 06.07.2007 um 11:03 schrieb Thomas Güttler: > > Hi, > > How can you add attributes to ManyToMany Relations? > > Given the example: > http://www.djangoproject.com/documentation/models/m

Re: Checkout with Tortoise SVN

2007-07-06 Thread tsc
Sorry, but I've forgotten to set the proxy server in Tortoise. Now it worked a little better. But other repositories work witout the proxy settings too, hmm strange. Now I get another error: REPORT request failed on '/svn/!svn/vcc/default' REPORT of '/svn/!svn/vcc/default': 400 Bad Request (http:/

Re: Attributes for ManyToMany

2007-07-06 Thread patrick k.
usually, if you want to have additional fields with a m2m-relation you have to use an intermediary table with a foreignkey (e.g. with edit-inline). if this page is working, there´s an example: http://www.djangoproject.com/documentation/models/ howerver, if you want to have the page-number for

Attributes for ManyToMany

2007-07-06 Thread Thomas Güttler
Hi, How can you add attributes to ManyToMany Relations? Given the example: http://www.djangoproject.com/documentation/models/many_to_many/ Publication -- N:M -- Article How can you store the page number of the published article? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorf

Re: Redirecting within custom template tags

2007-07-06 Thread neebone
On Jul 6, 9:46 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-06 at 08:26 +, neebone wrote: > > [...] > > > > > Ok, I've got a page which uses a generic view to load the article into > > the template. All good so far. I've then created two template tags, > > list_comment

Re: Checkout with Tortoise SVN

2007-07-06 Thread Gary Doades
I use Tortoise SVN for windows XP without any problems. I update from trunk almost daily. It's certainly the right url that you have. What version of Tortoise SVN are you using? Can you browse the repository? The other way to get it would be to use the Subversion command line tools themselves

Re: Redirecting within custom template tags

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 08:26 +, neebone wrote: [...] > Ok, I've got a page which uses a generic view to load the article into > the template. All good so far. I've then created two template tags, > list_comments and comment_form. > list_comments is displayed first. The tag grabs the comments >

Checkout with Tortoise SVN

2007-07-06 Thread tsc
Hello, I'm on Windows and using Tortoise SVN, which has worked nice so far for other projects, but not for django. I dont even get an error message. http://code.djangoproject.com/svn/django/trunk/django is the right source? So are there other ways to get the latest version? Thanks, tsc --~--~-

Re: CharField vs. CharField

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 10:35 +0200, Thomas Güttler wrote: > Hi, > > I think it is bad, that there are two CharField classes. > > One for OR-Mapping and one for HTML (new)forms. > > Why not change the HTML classes to ...InputField? There are lots of names that are used in both model.fields and

CharField vs. CharField

2007-07-06 Thread Thomas Güttler
Hi, I think it is bad, that there are two CharField classes. One for OR-Mapping and one for HTML (new)forms. Why not change the HTML classes to ...InputField? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 TBZ-PARIV GmbH G

Re: Redirecting within custom template tags

2007-07-06 Thread neebone
On Jul 6, 9:13 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-06 at 08:04 +, neebone wrote: > > Hi, > > > I'm trying to roll my own comments custom template tag and need to > > action a browser redirect on successful comment posting. My problem is > > that you can't just

Re: Redirecting within custom template tags

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 08:04 +, neebone wrote: > Hi, > > I'm trying to roll my own comments custom template tag and need to > action a browser redirect on successful comment posting. My problem is > that you can't just return HttpResponseRedirect and expect it to be > executed. Is there an "of

Redirecting within custom template tags

2007-07-06 Thread neebone
Hi, I'm trying to roll my own comments custom template tag and need to action a browser redirect on successful comment posting. My problem is that you can't just return HttpResponseRedirect and expect it to be executed. Is there an "official" way to get the middleware to action the redirect from

Pickle model fields with cache...

2007-07-06 Thread Jens Diemer
I have insert a small cache mechanism. So pickle.loads() would only used for the first _get_value(): - class Preference(models.Model): def __init__(self, *args, **kwargs): self._cache = {} super(Preference, self)._