Asia comic: Long hu men, the saint, twins, budha plam, etc
Well another site about asia comic and adult magazine Asia comic Such as: Budha Palm (last volume 085), Twins (last volume 177), Long hu men (last volume 313), Dragon of tang dynasty (last volume 252) the saint etc etc Adut magazine such as: Playboy, xxx, etc,etc You can find them and download them at http://www.cybertyros.info --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Seekpire search engine, earn $0,01 for each search
Seekpire earn money searching Earn $0.01 for each search !!! How can I make money searching? Want to make easy money? Well this is how. Seekpire pays you to search! For each search that you do you get 1 cent. This may not seem like much. But think of all the times you search a day! If you use this site enough, you can make some money doing something you already do everyday. So sign up, and start searching. What is the catch? None! We can provide these services by having one small advertisement on the top bar. It is a win, win for both of us! Plans for the future We have some big plans for this front page. We are going to make a personalized home. So it will be easier to keep this page as your homepage, and earn money at the same time. You will be able to add bookmarks, rss feeds, check the weather, and more! We are also looking into adding a message board so our member cant interact with each other. Join now http://www.seekpire.com/refer.php?id=128 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Generically reference an app?
On 6/19/06, berto <[EMAIL PROTECTED]> wrote: > > Awesome, thanks! Here's the relevant bit for anyone else that stumbles > upon this entry: > > from django.db.models.loading import get_app > desired_app = get_app('desired_app') > from desired_app.models import SomeModel > good, and you can also: from django.db.models.loading import get_model model = get_model('desired_app', 'SomeModel') -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having many of one application.
On 6/19/06, Frankie Robertson <[EMAIL PROTECTED]> wrote: > > The following is used mainly as an example for something I've been > wondering about. > > Say I'm a blog host and want to use django. I need all my views to > know which blog (so as to know what information to get) they're using. > I also need all my templates to have access to the blog object (so > they can display the name and use the stylesheet of the current blog). > How, while remaining DRY, that is not having each view take the blog > slug and then pass the blog object to the template, can I do this? I > think the sites framework might do something simelar. > > Thanks, > Frankie. > I think the right way is setting use_id in url, just like: /user_id(or user_name)/blog_id that's ok. -- I like python! My Blog: http://www.donews.net/limodou My Django Site: http://www.djangocn.org NewEdit Maillist: http://groups.google.com/group/NewEdit --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Having many of one application.
On Sun, 2006-06-18 at 19:46 +0100, Frankie Robertson wrote: > The following is used mainly as an example for something I've been > wondering about. > > Say I'm a blog host and want to use django. I need all my views to > know which blog (so as to know what information to get) they're using. > I also need all my templates to have access to the blog object (so > they can display the name and use the stylesheet of the current blog). > How, while remaining DRY, that is not having each view take the blog > slug and then pass the blog object to the template, can I do this? I > think the sites framework might do something simelar. So, assuming you have read the sites documentation, why do you think that is not what you are after? It looks to me like that should work for you. Can you clarify what you problem is a bit? 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 -~--~~~~--~~--~--~---
Re: Generically reference an app?
Awesome, thanks! Here's the relevant bit for anyone else that stumbles upon this entry: from django.db.models.loading import get_app desired_app = get_app('desired_app') from desired_app.models import SomeModel --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Template: nested for and ManyToMany field problem - MySQL
Adam Hoscilo wrote: > I get this error: len() of unsized object > while doing nested for loops in the template: > {% for entry in object_list %} > {% for category in entry.categories %} > {{ category.name }} > {% endfor %} > {{ entry.get_absolute_url }} > {% endfor %} > > entry.categries is ManyToManyField Then you want entry.categories.all in your template. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Template: nested for and ManyToMany field problem - MySQL
I get this error: len() of unsized object while doing nested for loops in the template: {% for entry in object_list %} {% for category in entry.categories %} {{ category.name }} {% endfor %} {{ entry.get_absolute_url }} {% endfor %} entry.categries is ManyToManyField If i remove the nested for everything works fine. I tried to fetch entries with .select_related() and without - no difference. Database backend is MySQL 5 Anyone had a problem like this one? -- Adam Hoscilo --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Generically reference an app?
On Jun 18, 2006, at 2:03 PM, berto wrote: > > Hello, > > I've created an app with some models and I want to make foreign > keys to > those models in another app. I can do something like this: > > from myproject.apps.some_app import SomeModel > > but then my project name is hard coded into that app. Is there some > way to generically reference the current project? Something like: Check Google's archive. A similar question was answered two days ago in a thread titled "Relations across multiple apps". Don --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Generically reference an app?
Hello, I've created an app with some models and I want to make foreign keys to those models in another app. I can do something like this: from myproject.apps.some_app import SomeModel but then my project name is hard coded into that app. Is there some way to generically reference the current project? Something like: from django.thisproject.apps.some_app import SomeModel This would be very similar to the way one accesses the settings.py stuff using: from django.conf.settings import FOO Thanks! -berto. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Recursive delete problem
This can be a bug, or I'm doing something terrible wrong... This is how my model looks like: class Score(models.Model): . . . class Round(models.Model): . . . class Game(models.Model): round = models.ForeignKey(Round) . . . def save(self): """ Recompute the scores in the Score table """ def delete(self): """ Recompute the scores in the Score table """ When I delete a game, with game.delete() (or through the admin, generic_view...), delete method is called and the Score table is updated. But when I delete a round, with round.delete(), all games conected with that round are also deleted, but the Score table isn't updated, that is, the delete method from the game objects is not called?!?! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Hosting a Django project in Bluehost
Grigory Fateyev wrote: > Somebody use FastCGI on your own server? I do. I have mostly done it using this instruction: https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/DjangoFcgi > Can you help me how to setup this? > You can contact me personally if that instruction will not suffice. I'll try to help. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Cutting output of flup's FastCGI server
Ivan Sagalaev wrote: > I'm using well-known flup's FastCGI server. The app serves large files > (mp3 albums, 100 MB typically) that users download with download > managers that often drop connections on client side and start new ones. > The strange thing is that when a client drops connection flup's FastCGI > server seems to not notice it and keeps feeding output (somewhere?). > This results in two bad things form me: server overload because of many > working processes that work for nothing and my app thinking that the > download went OK and registering it for the user even if the download > went to nowhere. > Answering ror anyone who has similar problem. I have contacted Allan Saddi, flup's author, and he has found the place where this is happening. It's in flup.server.fcgi_base.py around line 508: except socket.error, e: if e[0] == errno.EPIPE: return # Don't bother raising an exception. Just ignore. elif e[0] == errno.EAGAIN: select.select([], [sock], []) continue The code in the first condition suppresses the exception that happens when client quits. Removing this part makes an exception to break the output process which is what should happen. P.S. Looks like Allan considers this as a bug and is going to fix it. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Free Comments Documented
I agree, the docs are better than many, but still aren't where they need to be at the moment. Thanks for your contribution, I hope you keep them coming! --Nick --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Is there a cms like Ellinton?
> try the django admin-interface: > http://www.djangoproject.com/documentation/tutorial2/ and flatpages: http://www.djangoproject.com/documentation/flatpages/ ...and other nice apps from contrib (: --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Hosting a Django project in Bluehost
Grigory Fateyev wrote: > > Somebody use FastCGI on your own server? Can you help me how to setup > this? Unfortunately I don't use FastCGI on my own servers. If you looking for how to set up Apache with mod_fastcgi, I am the wrong guy. Thanks, Eugene --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Problem with get_or_create
In your listing line 24 is not aligned properly. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Hosting a Django project in Bluehost
Hello Eugene Lazutkin! On Sat, 17 Jun 2006 13:44:12 -0500 you wrote: > I don't use Bluehost, but I think the setup will be similar to Django > on DreamHost, which supports FastCGI only. "Official" DreamHost Wiki: > http://wiki.dreamhost.com/index.php/Django. Jeff Croft wrote an > excellent how-to: > http://www2.jeffcroft.com/2006/may/11/django-dreamhost/. My setup is > described here: http://lazutkin.com/blog/2006/jun/4/setting-tools-2/. > I hope it'll help you to get strated. > > Thanks, > > Eugene Somebody use FastCGI on your own server? Can you help me how to setup this? -- ÷ÓÅÇÏ ÎÁÉÌÕÞÛÅÇÏ! greg [at] anastasia [dot] ru çÒÉÇÏÒÉÊ. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Changing Sites Framework
On 6/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am working on a cms that would involve several sites. I am wanting > to filter several things by site, but the domain names are sometimes > too long and run off the side of the filter box. I was wondering if it > would break anything if I canged the site framework to return the > display name instead of the domain name. So far I have not run into > any problems. No, it shouldn't break anything. Adrian -- Adrian Holovaty holovaty.com | djangoproject.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 -~--~~~~--~~--~--~---
Is there a cms like Ellinton?
Hi everyone: I knew about Django recently, and there is a great CMS---Ellinton . But unfortunatly, it's not opensource. This type of CMS is what i am looking for. Is there another cms like Ellinton? thanks for reading and reply --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Changing Sites Framework
On Jun 18, 2006, at 8:08 AM, [EMAIL PROTECTED] wrote: > > I was wondering if it would break anything if I canged the site > framework to return the > display name instead of the domain name. Do you mean in __str__? That is for display purposes only so it should not hurt to have it return a different value. Don --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Changing Sites Framework
Hello, I am working on a cms that would involve several sites. I am wanting to filter several things by site, but the domain names are sometimes too long and run off the side of the filter box. I was wondering if it would break anything if I canged the site framework to return the display name instead of the domain name. So far I have not run into any problems. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
model import in inclusion_tag not working?
hi, i wrote a simple inclusion_tag that's supposed to fetch some data from on of my apps models. code looks like: #myproject/myapp/templatetags/mytesttags.py from django import template register = template.Library() def mytest(): from myproject.myapp.models import xyz return { 'test': xyz.objects.all() } mytest = register.inclusion_tag('test.html')(mytest) in one of my templates i do: {% load mytesttags %} {% mytest %} this will raise an error "unknown module myapp.models" on both, development and production server. now if i change the import-statement in my mytest() to 'from myapp.models import xyz', the code will run fine on the development server, but won't in my production environment. i am a little clueless. imports from django.* work fine in my template-tag. can anyone help? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Is there a cms like Ellinton?
A quick look around reveals http://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/CmsProject. It's nowhere as good as Ellington but Ellington is a for rich media companies. If you're a rich media company, buy it, otherwise you probably don't need anything near the functionality it uses. (by the way, upon purchasing Ellington the source code is avaliable, so it's open source to those who can afford, not free would be a better way to describe it.) HTH, Frankie On 18/06/06, rockone <[EMAIL PROTECTED]> wrote: > > Hi everyone: >I knew about Django recently, and there is a great CMS---Ellinton . > But unfortunatly, it's not opensource. This type of CMS is what i am > looking for. > Is there another cms like Ellinton? thanks for reading and reply > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Is there a cms like Ellinton?
try the django admin-interface: http://www.djangoproject.com/documentation/tutorial2/ patrick Am 18.06.2006 um 14:16 schrieb rockone: > > Hi everyone: >I knew about Django recently, and there is a great CMS---Ellinton . > But unfortunatly, it's not opensource. This type of CMS is what i am > looking for. > Is there another cms like Ellinton? thanks for reading and reply > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Using Pyscripter with Django
On 16/06/06, Filipe <[EMAIL PROTECTED]> wrote: *snip* > What IDEs are Django developers using out there? Embarrassingly, I'm using Bluefish. Bluefish is a syntax editor with broken highlighting. I use it mainly because I've never found the need for anything more complicated. In general I find it to be quicker to have a quick read of the documentation, or, as a last resort, ask on IRC than to debug when using django (javascript is a different story (mainly since dojo has no documentation). Good luck finding something that works for you, Frankie. > > Thanks in advance, > Filipe > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: "tuple' object has no attribute 'get'"
On 16/06/06, Don Arbow <[EMAIL PROTECTED]> wrote: > > On Jun 16, 2006, at 2:02 PM, Tyson Tate wrote: > > > > > Starting with the latest SVN, a fresh DB, and the following Model: > > > > http://django.pastebin.com/713796 > > > > I get a "tuple' object has no attribute 'get'" error whenever I try > > to add a new Post. > > > > Stack trace here: http://django.pastebin.com/713819 > > > > Any ideas? > > http://django.pastebin.com/713796 seems to have expired, why not just paste the code here? This ain't IRC. > > > Just a hunch. You have a comma at the end of the fields tuple in your > Admin inner class (line 36 according to the pastebin). Maybe that's it? One of the nice things about python is that trailing commas are completely legal. > > Don > > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: POST to view loses POST data
I have to agree that it should return false if there is no data. Otherwise how are you going to tell the difference between a POST with no data and a POST with data. Another alternative is maybe request.method.POST and request.method.GET for testing the method. On 18/06/2006, at 9:20 PM, Bill de hÓra wrote: > > Luke Plant wrote: >> >> Long version: >> request.POST is (essentially) a dictionary of post variables. As >> such, >> if it is empty, it evaluates to False, even if the request method is >> 'POST'. > > That's a bug, imo. > > cheers > Bill > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: POST to view loses POST data
Adrian Holovaty wrote: > On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote: >> I'm not convinced that it'd be a good thing to have request.POST >> evaluate to True in these cases, but the reasoning is somewhat >> pedantic. >> >> First and foremost, there's a logical difference between the request >> method and the request parameters, so it makes sense that a test for >> the method could evaluate to True while a test for the parameters >> could evaluate to False. >> >> Second, since request.POST is supposed to be a "dictionary-like" >> object, this would be unintuitive and, dare I say, "magical" behavior >> -- an empty dictionary is False. > > I agree 100% with James on this one. Having request.POST be an empty > dictionary evaluating to True -- that's just too odd. I think we ought > to bite the bullet and add request.method, which would be a shortcut > to a normalized (all caps?) version of request.META['REQUEST_METHOD'], > which is cumbersome to type and might not (?) always be upper case. > i think the problem here is that we're mixing two things: 1. the method 2. the sent data for GET requests it's simple, because the sent data is in the querystring, so for GET requests the GET dictionary will contain the relevant data. but a POST request is more complicated. here you can do something like: http://127.0.0.1:8000/foo/?query=string; method="post"> and django will get (correctly): POST GET and i think that people usually want do differentiate between GET and POST requests, not GET and POST data. so i'm also for request.method. maybe even is_get() and is_post(). i understand that even currently you can do it with request.META['REQUEST_METHOD'], but it's too long and ugly. and because of that it does not look like the recommended approach. gabor --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cutting output of flup's FastCGI server
Hello! I'm looking for help from someone who is familiar with how FastCGI works. I'm using well-known flup's FastCGI server. The app serves large files (mp3 albums, 100 MB typically) that users download with download managers that often drop connections on client side and start new ones. The strange thing is that when a client drops connection flup's FastCGI server seems to not notice it and keeps feeding output (somewhere?). This results in two bad things form me: server overload because of many working processes that work for nothing and my app thinking that the download went OK and registering it for the user even if the download went to nowhere. When I was running the same thing under Apache with mod_python dropping connection resulted in mod_python choking about "write error" immediately and my app knew that the download has stopped. So the question is where to start digging for the cause? I read some flup's code and found out that by default it should make unbuffered output right into its connection with the web server. And it looks like when the connection is dropped writing should fail. But it's not what's going... --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: POST to view loses POST data
Adrian Holovaty wrote: > I think we ought > to bite the bullet and add request.method, which would be a shortcut > to a normalized (all caps?) version of request.META['REQUEST_METHOD'], > which is cumbersome to type and might not (?) always be upper case. > Per HTTP all request methods are defined in exact case ('GET', 'POST', 'PUT', 'DELETE', ...). No browser will ever send it otherwise even if you have '' in HTML. So in a view method 'Post' is not HTTP's POST and should be treated as garbage. Luckily Django's pattern of doing: if request.POST: #post else: #get is safe since every unknown method will end up in 'GET' part which supposed to be idempotent anyway. And for better safety a user can list exact methods with @require_http_methods decorator (which is somewhat broken currently, I keep forgetting to file a ticket, will do now). --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---