Re: request.POST.getlist('fieldname') / repeated rows of fields
On Jun 11, 1:10 pm, David Priest <[EMAIL PROTECTED]> wrote: > The Admin interface does it. I haven't been able to figure out where > it does it, so I can steal its method... Check out django.utils.datastructures.DotExpandedDict --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
SSL Redirect causing Firefox Connection Reset
I've got a really strange problem here. I've tried and tried to work it out, and have gotten nowhere. I copied a customer's site as-is to a new server for development. Everything works as expected on the existing (production) server. On the new development server, the site works as expected under IE, but under Firefox, I get a "The connection to (ip) was interrupted while the page was loading". Using various http sniffers, it appears that there is no proper status code being returned. The operation of the page is such that http requests are redirected to SSL using the SSLMiddleware module. Django 0.95, Firefox 2.0.0.1 Relevant code in the views is: h = HttpResponse(start + s3 + end) h["Content-Type"] = "text/html" return h where start, s3, and end are rendered html pages. I'm at my wits' end, and I'm not familiar enough with django (although I'm pretty fluent in python) to know where to start looking. Thanks *very* much in advance for any assistance that can be given. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: tutorial 4, generic views won't load from db?
I'm sorry, but what am I supposed to do with the downloaded sql file? Run it angainst my database? On Jun 10, 10:11 pm, "Michael Trier" <[EMAIL PROTECTED]> wrote: > I found that a couple of the changes required stopping and restarting > the server to be picked up correctly. Also, if you want I have the > polls app working as a demo for an EC2 image I'm using. You can > download the code here for a comparison: > > http://s3.amazonaws.com/eminent-ami/mysite.sql.gz > > Michael > > On 6/10/07, deerchao <[EMAIL PROTECTED]> wrote: > > > > > I'm new to django, and I'm following tutorials on djangoproject.com. > > Everything worked fine before I start using generic views. After > > modifying polls/urls.py, the /polls/ page can't get any polls, and / > > polls/1/ can't get any choices(there isn't a 404 error, but /polls/5/ > > raises one), either. > > Is there anything I should do before switching to generic views that > > the tutorial didn't mention? > > Thanks! > > By the way, I'm using PostgreSql 8.2, django 0.96, if this helps. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
request.POST.getlist('fieldname') / repeated rows of fields
request.POST returns a QueryDict object for those fields that have the same key. The key appears to be assigned by Django when it magics the form and template into an http response. It seems difficult to get Django to deal with multiple lines on a form, ie. as when creating almost any business form where there's a single header (names, addresses) and many lines (SKUs, descriptions, costs, quantities, etc). One of the easier ways of dealing with this is to simply use two forms, one for the header and one for the line item, and then to repeat the line item a number of times over. Unfortunately, Django doesn't provide an easy way to differentiate between these lines; the field ids will all be the same. Munging the field names doesn't work; that just makes it impossible to refer to them on the template (variable names aren't dynamic). So we seem to be stuck getting lists back. Question is, *is the order of the list guaranteed*? Which is to say that will the first items in SKU, Description, and Cost all refer to the same object; the second items to the second object; and so on? And if not, how does one deal with this situation? The Admin interface does it. I haven't been able to figure out where it does it, so I can steal its method... --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django DbMigration 0.03 released
Whoops, sorry about that! The download was a .tar.gz instead of a .tgz - all fixed now :) Cheers, Mike Kent Johnson wrote: > Mike H wrote: > >> Hi all, >> >> We've just released an update to the django dbmigration project. This >> release cleans up the code a little and improves the parsing of SQL >> migrations. >> >> Homepage and downloads at: >> http://www.aswmc.com/dbmigration/ >> > > The download link is not working (404). > > Kent > > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django DbMigration 0.03 released
Mike H wrote: > Hi all, > > We've just released an update to the django dbmigration project. This > release cleans up the code a little and improves the parsing of SQL > migrations. > > Homepage and downloads at: > http://www.aswmc.com/dbmigration/ The download link is not working (404). Kent --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sleep for 30 minutes?
MartinWinkler wrote: > Hi again, > > On Jun 10, 10:37 pm, Florian Apolloner <[EMAIL PROTECTED]> wrote: > >> Why don't you display the image dynamically with django, without >> saving it? >> Example:http://django-captcha.googlecode.com/svn/trunk/djaptcha/views.py > > I already took a look at django-captcha, and what I do not like in > this solution is the amount of additional work a programmer has to > invest here. > With my approach there is just a CaptchaField for the website > developer and nothing more. No urls.py changes, no new settings, > nothing. It 'just works'. > > I'll make my little solution available soon and will use Phil's > proposal of deleting old images just before creating a new captcha. > Although it's not as elegant as I would like, because it scans the > captcha-directory whenever a new captcha image is about to be made. I sense a race condition: browser 1 hits server: delete *.png/create a.png send img=a.png to browser 1 browser 2 hits server: delete *.png/create b.png send img=b.png to browser 2 browser 1 requestss a.png 404. Also, file IO is 'expensive.' Granted most sites don't get hammered, so for many it will not be an issue, but there should only be one way to do things. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: newforms: setting a field to a value in clean( )
Bram - Smartelectronix schrieb: > in clean( ) we would like to set a field value. In particular: if there > are errors in a signup form, we'd like to delete the passwords to user > gave before as to not send unencrypted passwords back... clean() is a field method, but I guess, you want to change the behaviour of your widget, so the entered value does not show up when the form submission was not successful and the form is being rendered again. The PasswordInput widget already has such functionality: Maybe you can take a look at django/newforms/widgets.py and search for the class definition of "PasswordInput", and change your own widget if necessary? Hope that helps, Martin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sleep for 30 minutes?
Hi again, On Jun 10, 10:37 pm, Florian Apolloner <[EMAIL PROTECTED]> wrote: > Why don't you display the image dynamically with django, without > saving it? > Example:http://django-captcha.googlecode.com/svn/trunk/djaptcha/views.py I already took a look at django-captcha, and what I do not like in this solution is the amount of additional work a programmer has to invest here. With my approach there is just a CaptchaField for the website developer and nothing more. No urls.py changes, no new settings, nothing. It 'just works'. I'll make my little solution available soon and will use Phil's proposal of deleting old images just before creating a new captcha. Although it's not as elegant as I would like, because it scans the captcha-directory whenever a new captcha image is about to be made. Maybe tomorrow or the day after tomorrow I can post my files on some public server. Thank you all for your replies! Martin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sleep for 30 minutes?
On 10 Jun., 20:03, MartinWinkler <[EMAIL PROTECTED]> wrote: > Hi all, > > I have implemented a captcha solution for django (because the already > available approaches did not fit my needs), and came to this problem: > > An image is created for every captcha-enabled form that is being > displayed. Wen the user submits the form, the image is being deleted > automatically. BUT: If the user does not send the form back, there is > no obvious way for me to delete the picture. I had the following > ideas: --- ideas follow --- Why don't you display the image dynamically with django, without saving it? Example: http://django-captcha.googlecode.com/svn/trunk/djaptcha/views.py --- Florian --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sleep for 30 minutes?
On Sun, 2007-06-10 at 18:03 +, MartinWinkler wrote: > Hi all, > > I have implemented a captcha solution for django (because the already > available approaches did not fit my needs), and came to this problem: > > An image is created for every captcha-enabled form that is being > displayed. Wen the user submits the form, the image is being deleted > automatically. Why actually create a file for the image? Just create the image in memory and send the stream to the client instead of linking to a real file on the filesystem. You could also encrypt the response you expect from the user and include it as a hidden field in the form and then you're basically stateless (at least as far as the form is concerned). Todd --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
MySql Workbench
I use MySql Workbench for data modeling. It might be a good idea to have it create django's model.py. Has anyone done anything like this? Carl K --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
sqlite3: odd slice behavior
Hi, Using the sqlite3 backend, any slice operation on a QuerySet for which the slice does not start at 0, a list is returned instead of a QuerySet, and the slice is not performed in the database, but in Python. Is this expected behavior? The sqlite3 docs indicate that offsets can be given, so I see no reason this shouldn't be performed at the DB level. Any ideas? thanks, Forest signature.asc Description: Digital signature
Newforms: 'Decimal' object has no attribute 'strip' ?
I can't seem to print a form in a template using the {{form}} shortcut, if the form is bound and contains a DecimalField. I get the error "'Decimal' object has no attribute 'strip'". What am I doing wrong? Here's a barebones command-line example (note: for some reason, I can't create a model on the command line, so the data I'm feeding turns out to be a float instead of a decimal, but it's basically the same error): >>> import django.newforms as forms >>> >>> class MyForm(forms.Form): ... amount = forms.DecimalField(max_digits=8, decimal_places=2) ... >>> data = {'amount': 25.00, } >>> f = MyForm(data) >>> f <__console__.MyForm object at 0x144c370> >>> for field in f: ... print field ... >>> print f Traceback (most recent call last): File "", line 1, in ? File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/utils/encoding.py", line 31, in __str__ return self.__unicode__().encode(settings.DEFAULT_CHARSET) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 76, in __unicode__ return self.as_table() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 154, in as_table return self._html_output(u'%(label)s%(errors)s% (field)s%(help_text)s', u'%s', '', u'%s', False) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 115, in _html_output top_errors = self.non_field_errors() # Errors that should be displayed above all fields. File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 170, in non_field_errors return self.errors.get(NON_FIELD_ERRORS, ErrorList()) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 93, in _get_errors self.full_clean() File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/forms.py", line 187, in full_clean value = field.clean(value) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/ lib/python2.4/site-packages/django/newforms/fields.py", line 183, in clean value = value.strip() AttributeError: 'float' object has no attribute 'strip' --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sleep for 30 minutes?
On 10/06/07, MartinWinkler <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have implemented a captcha solution for django (because the already > available approaches did not fit my needs), and came to this problem: > > An image is created for every captcha-enabled form that is being > displayed. Wen the user submits the form, the image is being deleted > automatically. BUT: If the user does not send the form back, there is > no obvious way for me to delete the picture. I had the following > ideas: > Why not just scan the image directory prior to creating the image and delete any images over 30 minutes old? This should be a fast operation since there are not likely to be that many images. -- Phil --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
sleep for 30 minutes?
Hi all, I have implemented a captcha solution for django (because the already available approaches did not fit my needs), and came to this problem: An image is created for every captcha-enabled form that is being displayed. Wen the user submits the form, the image is being deleted automatically. BUT: If the user does not send the form back, there is no obvious way for me to delete the picture. I had the following ideas: A) run a cronjob in the background that deletes all images older than 30 minutes. Disadvantage: needs an external cronscript, which I do not really want. It also has to run once a minute, which is ugly in my opinion. B) use django signals somehow... unfortunately there are no signals for forms - just for models, and I'm also not sure how to do that with signals, so this idea was quite worthless. C) start a new thread immediately after image creation which sleeps for about 30 minutes and after that deletes the image, in case it is still sitting on the server. Disadvantage: I'm not sure... Is it safe to have a separate thread (created with python's threading module) that idles around for such a long time? FastCGI issues? mod_python issues? development-server issues? Hopefully you can answer my question - or even come up with a better idea? Of course I will make the finished code available to everyone - maybe on djangosnippets.org, or (which I'd LOVE to do) in django.contrib.captcha. Martin --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
newforms: setting a field to a value in clean( )
Hi all, in clean( ) we would like to set a field value. In particular: if there are errors in a signup form, we'd like to delete the passwords to user gave before as to not send unencrypted passwords back... How can we do this? Thanks! - bram --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Including [django-users] in subject line?
You should install this plugin for Firefox. It'll help you with your myriad GMail accounts: https://addons.mozilla.org/en-US/firefox/addon/1320 Of course it may be that you only use IE, so you may need to join that project's mailing list and request them to rewrite it to support your browser of choice. Seriously, though, I saw this discussion with 30 replies and had to see what all the fuss was about. Very entertaining in a train wreck sort of way. BTW, I use the Google web interface for this list. I find that, as a web developer I'm often using a browser and clicking on a bookmark, or better yet typing Ctrl-L djangousers (my Firefox shortcut for this list) is not that taxing. It's certainly not one of those hard to remember things like turning in my timesheet Thursday mornings. And I would argue emphatically against adding [django-users] or any other redundant text to the subject line when there are perfectly viable alternatives. I would also never ask an entire list to change their ways because my email client wasn't able to keep up with me. :-) On Jun 10, 12:21 am, Mike Schinkel <[EMAIL PROTECTED]> wrote: > Chris Moffitt wrote: > > Not to pile on but if you'd like a google mail account for list > > purposes, > > that's always an option. It has a very nice way of allowing you to tag > messages and file them accordingly. You can also use pop if you want > to consolidate with your other mail boxes. Procmail is also a handy > option.. > > Here's what I did (it's a nasty hack, but we'll see if it works.) I > create a user account for my personal domain ([EMAIL PROTECTED]) > and their mail server let me modify the subject like tagging it with > [django] and it works. Of course now I have another account at Google > I have to keep track of, and I have to login and logout between > multiple Google accounts if I want to interact with the Django-users. > > Sigh, this stuff shouldn't be this convoluted. > > -- > -Mike > Schinkelhttp://www.mikeschinkel.com/blogs/http://www.welldesignedurls.orghttp://atlanta-web.org-http://t.oolicio.us --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Pickle model fields
Ok, turns out my code doesn't work. What gets called to convert the data as soon as you get it back from the database? I've got it pickling on the way in, but it doesn't unpickle on the way out unless I call validate manually. --Aaron On May 16, 4:50 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-05-16 at 09:42 -0700, [EMAIL PROTECTED] wrote: > > *sigh* posted to quickly. The solution was to define get_internal_type > > to return TextField.__name__ > > > On May 16, 12:40 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Turns out I decided to go with the Field class since I'll be needing > > > them in a few different models. The issue I'm running into now is that > > > the new field name isn't defined in the data_types list (from db/ > > > backends/*/creation.py). > > > > Obviously I can just add an entry for the backend I'm using, but that > > > seems wrong. I inherit from TextField, is there anyway to tell it to > > > just use that type? > > Remember how I said there were a few pieces of machinery missing to make > subclassing Fields easy? You just found one of them. :-) > > Yes, it has a solution, but it should be automatic in a perfect > solution. > > Malcolm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
I need to Increasing Link Popularity WITHOUT Exchanging Links
Mr.Bill Gates says, Google, Alexa, and Yahoo should be worried about agloco and their business techniques, Get Paid to surf the viewbar and get upto U$.30 Dollar per referral. THE TOPPEST WORLD NO.1 MONEY MAKING ONLINE : http://www.aglocodesign.blogspot.com part time jobs, indian online jobs, money india online, making money online, jobs online, india, home based business opportunity, opportunity, fanchise opportunity, work from home, work at home, agloco traffic, INDIAN JOBS, PART TIME JOBS IN INDIA : http://www.parttimejobs.blogspot.com BOLLYWOOD GALLERY, KOLLYWOOD GALLERY, : http://www.indianonlinejob.blogspot.com INDIAN ONLINE JOBS, HOME BASED BUSINESS OPPORTUNITY : http://www.indiaonlinejobs.blogspot.com ONLINE FREE GAMES, VIDEO GAMES, HINDI, TAMIL, KANNADA, MALAYALAM, TELUGU, ENGLISH MOVIE REVIEW AND PREVIEW, PHOTO ALBUM , INDIAN COOKING RECIPES, INTERNATIONAL FORUM DISCUSSIONS : http://www.damdhoom.blogspot.com ONLINE FREE GAMES, VIDEO GAMES, HINDI, TAMIL, KANNADA, MALAYALAM, TELUGU, ENGLISH MOVIE REVIEW AND PREVIEW,DAMDHOOM AND DHOOM2, PHOTO ALBUM , INDIAN COOKING RECIPES, INTERNATIONAL FORUM DISCUSSIONS : http://www.damdhoom.com INDIAN HINDU LAW AND MARRIAGE LAW : http://www.indianhindulaw.blogspot.com CHRISTIAN BASIC LAW : http://www.christianbasiclaw.blogspot.com MOHAMMADAN MARRIAGE LAW AND BASIC LAW : http://www.mohammadanlaw.blogspot.com DATANDO E CHATTING, GALERIA QUENTE DAS FOTOS, BUSCA DAS MENINAS http://www.datardebrasil.blogspot.com DATANDO E CHATTING : http://brazildating.googlepages.com DATING AND CHATING : http://www.chatfordating.blogspot.com BRAZIL GIRLS SEARCH : http://www.chattingsingles.blogspot.com AGLOCO=OWN THE INTERNET : http://www.brazilagloco.blogspot.com AGLOCO = SURF THE VIEWBAR : http://www.brasilviewbar.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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: remove inline item
You need to provide some view and template code so we can see what you are trying to do. Michael On 6/9/07, Manuel Meyer <[EMAIL PROTECTED]> wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hey, > > to a model Event i attach some images. But how can I delete images > from an Event? > If I use something like > > http://localhost:8000/moor/admin/doccms/eventimage/2/delete/ > > manually, the Image's sql entry will be removed, but a Error follows: > > AttributeError at /moor/admin/doccms/eventimage/ > 'NoneType' object has no attribute 'manager' > > How can I put a link/buttom for every EventImage on the Event admin > site to remove it's entry? > > > > Thanks, Manuel > > > > class EventImage(models.Model): > """ > """ > item = models.ForeignKey(Event, edit_inline=models.TABULAR, > num_in_admin=1) > picture = models.ImageField(null=True, upload_to='./images/', > blank=True,core=True) > caption = models.CharField(_("Optional > caption"),maxlength=100,null=True, blank=True) > sort = models.IntegerField(_("Sort Order"), help_text=_("Leave > blank to delete"), core=True) > > def __str__(self): > return "Picture of %s" % self.item.short_name > > def get_image_url(self): > return self.picture > > def get_image_path(self): > return "/media/"+self.picture > > class Meta: > ordering = ['sort'] > verbose_name = _("Event Image") > verbose_name_plural = _("Event Images") > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (Darwin) > > iQEVAwUBRmq+ljOKNHIOcnYMAQi+RQgAlys7Jyo5SgauX5mhKVA48yqZZyl6ejwx > wMRXghFJnuqf3cEJghaV7qbF+qNi2CZOWCBghOG4qyo2v9mWetIcXNinaldSYn6A > oXr/zcWdhSr3y4mLmGXNn+LdJt3t8sTon4gIC0t/2swSObHRsoc20+yIrF5enH9N > +gb0Jj+h3uZyY4B1RNN+lVtRDG/8Q63jNupGKUBhnfErxksJ37CSEPbQfWJSL5FZ > mctfrcKaSWuPJ0WU37hN82zLsyM0beE2brQJMd/Mda06rrRN1YMr9zTA0NypMJk5 > wk5d/Zrje2J0tdNKMXOquNohQdb1s2WQ/c7ZnJxnzRwBgyYkESp2rw== > =GUDP > -END PGP SIGNATURE- > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: how to update a translation message in django
Thanks you and kg. I have not used gettext before. Now I fixed the problem. I found the Chinese translation contained many fuzzy entries. Some translations were even wrong. Is this file is actively maintained? If so, I should contact the maintainer (who is <[EMAIL PROTECTED]>, according to the po header) directly. Otherwise, maybe it is easier to translate the po file from scratch. -- Gilbert On Jun 8, 8:07 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-06-08 at 04:32 -0700,Gilbert Finewrote: > > Oh, the missing msgid is "Ensure this value has at least %d > > characters". It appears in the po file only after I update the po file > > by running make-message.py > > Notice that the message in question is marked as "fuzzy". That means the > translation does not quite match the source string. I cannot read > Chinese well enough to know if the string is at all close, but one > obvious difference is that the source string contains a "%d" format > marker whilst the translation contains a "%s" marker. > > By default, fuzzy translations are not included in the output. A > translator has to check each one, verify it is correct (or correct it) > and remove the fuzzy comment. Then the result will be include in the MO > file. > > You may wish to update the file and submit a diff of the changes to Trac > so that it can be committed. > > > > > On Jun 8, 7:24 pm,Gilbert Fine<[EMAIL PROTECTED]> wrote: > > > I am a Chinese user. I found some message is displayed as English in > > > my site. So I check the django.po under zh_CN. I found that the msgid > > > is already in django.po, but not in django.mo. Why? > > > > I had try to update the mo using compile-message or just run msgfmt > > > directly. The result is the same, some messages appearing in django.po > > > disappear in djang.mo. > > > > What should I do now? > > Regards, > Malcolm --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Including [django-users] in subject line?
Michael, I'd be happy to send you a gmail invite. It's really a good choice when subscribing to newsgroups like these. Let me know. Michael On 6/10/07, Nimrod A. Abing <[EMAIL PROTECTED]> wrote: > > Hello, > > Prior to switching to GMail exclusively, I used to use Outlook or > Outlook Express. I had the same problem that you have now, so I > understand where you're coming from. I used to use a modified > spambayes filter that would modify the Subject field and add a prefix > to it (e.g., SPAM, [LISTNAME]). Sadly, I lost that modification a long > time ago when I switched to Linux and began using procmail for the > same purpose. > > Anyway, just want to point out that there is another solution to your > problem and a Pythonic one at that :) > > See here: > > http://spambayes.sourceforge.net/applications.html > > Note that this plugin requires Outlook 2000 and above and will not > work on Outlook Express. > > IIRC, I modified it so that it skipped the bayesian filter > (consequently bypassing storage of the bayesian stats for the message > body) whenever spambayes is given an email from a mailing list and > just modified the subject line and sent it on its merry way to my > inbox where it got filtered to the correct folder. > > HTH. > > On 6/10/07, Mike Schinkel <[EMAIL PROTECTED]> wrote: > > > > Chris Moffitt wrote: > > > Not to pile on but if you'd like a google mail account for list > > > purposes, > > that's always an option. It has a very nice way of allowing you to tag > > messages and file them accordingly. You can also use pop if you want > > to consolidate with your other mail boxes. Procmail is also a handy > > option.. > > > > Here's what I did (it's a nasty hack, but we'll see if it works.) I > > create a user account for my personal domain ([EMAIL PROTECTED]) > > and their mail server let me modify the subject like tagging it with > > [django] and it works. Of course now I have another account at Google > > I have to keep track of, and I have to login and logout between > > multiple Google accounts if I want to interact with the Django-users. > > > > Sigh, this stuff shouldn't be this convoluted. > > > > -- > > -Mike Schinkel > > http://www.mikeschinkel.com/blogs/ > > http://www.welldesignedurls.org > > http://atlanta-web.org - http://t.oolicio.us > > > > > > > > > > > > -- > _nimrod_a_abing_ > > http://abing.gotdns.com/ > http://www.preownedcar.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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Including [django-users] in subject line?
Hello, Prior to switching to GMail exclusively, I used to use Outlook or Outlook Express. I had the same problem that you have now, so I understand where you're coming from. I used to use a modified spambayes filter that would modify the Subject field and add a prefix to it (e.g., SPAM, [LISTNAME]). Sadly, I lost that modification a long time ago when I switched to Linux and began using procmail for the same purpose. Anyway, just want to point out that there is another solution to your problem and a Pythonic one at that :) See here: http://spambayes.sourceforge.net/applications.html Note that this plugin requires Outlook 2000 and above and will not work on Outlook Express. IIRC, I modified it so that it skipped the bayesian filter (consequently bypassing storage of the bayesian stats for the message body) whenever spambayes is given an email from a mailing list and just modified the subject line and sent it on its merry way to my inbox where it got filtered to the correct folder. HTH. On 6/10/07, Mike Schinkel <[EMAIL PROTECTED]> wrote: > > Chris Moffitt wrote: > > Not to pile on but if you'd like a google mail account for list > > purposes, > that's always an option. It has a very nice way of allowing you to tag > messages and file them accordingly. You can also use pop if you want > to consolidate with your other mail boxes. Procmail is also a handy > option.. > > Here's what I did (it's a nasty hack, but we'll see if it works.) I > create a user account for my personal domain ([EMAIL PROTECTED]) > and their mail server let me modify the subject like tagging it with > [django] and it works. Of course now I have another account at Google > I have to keep track of, and I have to login and logout between > multiple Google accounts if I want to interact with the Django-users. > > Sigh, this stuff shouldn't be this convoluted. > > -- > -Mike Schinkel > http://www.mikeschinkel.com/blogs/ > http://www.welldesignedurls.org > http://atlanta-web.org - http://t.oolicio.us > > > > > -- _nimrod_a_abing_ http://abing.gotdns.com/ http://www.preownedcar.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 to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: applying patch
cesco skrev: > Hi, > > I'm trying to apply the patch given in > http://code.djangoproject.com/ticket/3297 > using tortoiseSVN on windows but I get the following error message: > > The line "Index: " was not found > Either this is not a diff file or the diff is empty. > > The file I downloaded and used as patch is: > http://code.djangoproject.com/attachment/ticket/3297/filefield.diff > I believe you should use http://code.djangoproject.com/attachment/ticket/3297/filefield.diff?format=raw which is the plain-text version of the patch. /Nis --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
applying patch
Hi, I'm trying to apply the patch given in http://code.djangoproject.com/ticket/3297 using tortoiseSVN on windows but I get the following error message: The line "Index: " was not found Either this is not a diff file or the diff is empty. The file I downloaded and used as patch is: http://code.djangoproject.com/attachment/ticket/3297/filefield.diff It is the last in the list of files related to that ticket and it has been added by russellm on 06/07/07 06:23:16. Does anyone know what I'm doing wrong? thanks Francesco --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
implementing admin filters in my own views
Hi, I'd like to implement in my own views the filter functionality that is available in the admin by setting class Admin: list_filter = ('field_name1', 'field_name2',) I went through the html of the admin and I kind of understand that it's related to the generation of hidden input fields when one of the field is clicked. I also kind of understand that is related to the inclusion_tag from the django.template.Library class but I can't figure out how everything fits together in order to implement such a functionality in my own view. Could anyone give some indications? Also, is javascript needed for this task? Any help would be highly appreciated. Thanks Francesco --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Event based caching
So there's simply no way around this? If I'm sticking with the time based cache, it will probably only be activated for non-authorized users. The problem is that most of the site is restricted to logged in users, so the server load will probably be a bit too high. Has this subject never been touched before? I feel that that's strange. If you look at Facebook, for instance. They use memcached all over the place, but they're still able to show you the updated information (when it's updated). Should it really be so difficult to allow event based caching? Doesn't the framework know the name of the keys that needs to be updated on POST? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: FileBrowser v 2.0
image-editing with picnik is also possible now. see the installation-guide for more details: http://trac.dedhost- sil-076.sil.at/trac/filebrowser/wiki that´s it for this version of the filebrowser - there´ll probably be some minor changes due to user-feedback within the next couple of weeks. patrick Am 08.06.2007 um 08:38 schrieb patrick k.: > > integration of basic image-editing with SNIPSHOT is done. > just set USE_SNIPSHOT to True in fb_settings and change the > SNIPSHOT_CALLBACK_URL and you´re ready to go. > > NOTES: > ### be aware that it´s not possible to edit pictures in the popup- > window. > ### security issue: because of snipshots callback_agent, it´s not > possible to set staff_member_required. > ### right now, it´s a very simple integration which will probably > change in the future. > > patrick > > Am 07.06.2007 um 18:52 schrieb patrickk: > >> >> I´ve just released a new version of the filebrowser: >> http://trac.dedhost-sil-076.sil.at/trac/filebrowser/wiki >> >> I´ve tested it and it works fine with my settings (OSX with firefox >> 2, safari 2, opera 9) - however, additional testing is never >> senseless. >> so, if you find the time to do some testing, please give me some >> feedback ... >> >> list of updates/improvements: >> ### better coding (well, ...) and improved readability of the code >> ### renaming files is now possible >> ### thumbnails are clickable (also when using the FileBrowseField) >> ### make thumbs for a whole directory >> ### seperate settings-file (fb_settings.py) - maybe the settings will >> be stored in the database with the next version >> ### set thumbnail size >> ### improved thumbnail quality >> ### improved error handling with multiple file upload >> ### and some other minor updates/improvements >> >> notes: >> ### the filebrowser is prepared for i18n, although it´s not fully >> integrated yet >> >> things to come: >> ### i18n >> ### integration of snipshot and picnik for basic image-editing >> (already working on that one) >> >> where the community could help: >> ### check the english phrases before i18n is done (since english is >> not my first language, that´d be very helpful) >> ### testing with different browsers (esp. the js-section with the >> FileBrowseField and TinyMCE) >> ### if someone is able to do a FileBrowseField that´d be great (so we >> can get rid of the javascript-hooks) - unfortunately, I don´t have >> the time and knowledge doing that >> ### integrating patch for large streaming uploads resp. upload >> progress bar >> ### don´t know if it makes sens to use newforms for multiple file- >> upload >> >> thanks, >> patrick. >> >>> > > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Uploading Image, Marking a Field as True
> I think you need to work on your workflow a little more. You will > definitely need to play with views; I'm not sure what you think > signals will acheive. > > You need to think in terms of "what HTML pages can I present to the > user, in what order; and what conditions must be met to move from page > 1 to page 2". > > The other red flag that is waving to me is the 'baseball_approved' > attribute. From the description of your workflow, it isn't obvious > that you actually want to/need to store unapproved objects in the > database. If you don't need to, drop that flag, and just refrain from > saving the model until you have an 'approvable' set of data. Alright, let me explain it a little better without being so catious about the nature of the app. This app will be storing scores from the Wii game Wii Sports. So I essentially had thought that all 5 sports would be on one page and people could input their scores and upload a screenshot. Now, the reason the approved attribute is there is so if a person's score is reported as fake (e.g., no screenshot or fake screenshot), then I could it in the admin and the score would then be taken out off the rankings page and marked to the user accordingly. So it isn't so much a step 1, step 2, so much as each sport will have it's own line with two fields, score and screenshot upload. This is really the only way I could think of doing it (not being a programmer by trade mind you). Thanks for the help so far though Russ. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
tutorial 4, generic views won't load from db?
I'm new to django, and I'm following tutorials on djangoproject.com. Everything worked fine before I start using generic views. After modifying polls/urls.py, the /polls/ page can't get any polls, and / polls/1/ can't get any choices(there isn't a 404 error, but /polls/5/ raises one), either. Is there anything I should do before switching to generic views that the tutorial didn't mention? Thanks! By the way, I'm using PostgreSql 8.2, django 0.96, if this helps. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---