Re: Cloudfiles Storage Backend
YOu can implement a virtual directory, we do it for our cloud files. http://www.rackspace.com/cloud/blog/2010/01/26/nested-folders-in-rackspace-cloud-files/, It's clearly documented on a number of sites, if you just serach for it in google. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Getting a count of a RawQuerySet object
If you're writing your own queries, can't you just write a count query?? or when you're iterating over your results just keep the count??? -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: request.method not working as expected
Fabio in your dev server output is it saying the type of request is get? ARe you accessing "/method/" through your form or are you just directing your webserver to http://192.168.0.2:8000/method/??? On Sep 20, 11:46 am, Fabio Nataliwrote: > Hi everybody! > > I have a very simple view which is supposed to print out GET or POST, > depending which has been used to send data. The problem is I always get > "GET" even when sending data via POST. > > ### views.py: > def method(request): > return HttpResponse(request.method) > > ### urls.py: > (r'^method/$', method) > > ### php script to send data to the Django page: > http://192.168.0.2:8000/method/;> > > > > > I am running Django version 1.2.5, development server. > > Am I missing something? Any hint? > > Thanks, Fabio. > > -- > Fabio Natali FNstudio -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Virtualenv and Django in Production
Virtualenv provides you with more control over your production environments. We run apache/virtualenv on 10 of our production servers. There very well might be more overhead running through a virtualenv. For us it is too negligible to make a difference. We use fabric to deploy our django apps, and automatically initiate virtualenvs, or update virtualenvs on remote servers. I think virtual env is great on production because it keeps all of our environments on the same page. ie. If we update a python package to a newer version, or roll it back to an older version. All we have to do is make the appropriate changes in our code, change the package version entry in our bootstrap.py file and deploy through fabric, no manually managing packages on our production servers, nice and simple -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: access fields value in template
You can access just the values by the values property, {% for value in object.values %} {{ value }} {% endfor %} On Sep 17, 4:33 am, Phang Muliantowrote: > hi .. > > i have a pagination objects : > > in my view i got query and paginate it using this : > > objects = paginator.page(page) > > then the objects goes into the view template. > i can populate the field value using this template : > > {% for object in objects.object_list %} > > {{ object.title }} > {{ object.content }} > {{ object.slug }} > {{ object.is_publish }} > {{ object.created_at }} > {{ object.updated_at }} > {% endfor %} > > This solution give the field values of know field name, like title, content, > slug, etc... > > what i want to aim is to access the field value which is unknow, like say it > is different model . > i want to use this template in any model i give the to the object_list > variable. > > how to achieve this. > i try this one : > {% for x in object.items %} > {{ x }} > {% endfor %} > > The html result are in table like this : > ('is_publish', True)('title', u'first day with django')('created_at', > datetime.datetime(2011, 7, 10, 18, 6, 18))('updated_at', > datetime.datetime(2011, 8, 23, 0, 26, 42))('content', u'Great > start...progressing now...')('pk', 1L)('slug', u'first-day-django') > > but it show the field name and the field value. how i access the value of > the field. > > i want to create a record list, but not a view template for each model, but > 1 template for every model. > > i hear the django table, but i want to do it my own way.. > > anyone have suggestion. > > Thanks. > Mulianto -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
error: [Errno 104] Connection reset by peer - dev server IE 9
When I am testing my applications using django 1.2 and 1.3 dev server on IE 9. Every other requests gives me: Traceback (most recent call last): File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 281, in run self.finish_response() File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 321, in finish_response self.write(data) File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 400, in write self.send_headers() File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 464, in send_headers self.send_preamble() File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 379, in send_preamble self._write('HTTP/%s %s\r\n' % (self.http_version,self.status)) File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 508, in _write self.stdout.write(data) File "/usr/lib/python2.6/socket.py", line 297, in write self.flush() File "/usr/lib/python2.6/socket.py", line 284, in flush self._sock.sendall(buffer) error: [Errno 104] Connection reset by peer This is mainly when I am requesting static media, but not exclusively. This error can happen on any request. It is happening way too frequently (every other request) for it to be a coincidence. On chrome and firefox I hardly ever see these errors. Before I dig into it has anyone had a similar experience??? It makes IE9 un-testable. Thank you -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Development environment
Ubuntu, VIM, mercurial, DebugToolbar(sometimes) Sqlite3 for many projects. On Aug 22, 6:07 pm, Stephen Jacksonwrote: > I am new to the world of Django. I would like to hear from other django > developers describe their dev environment (tools, os, editors, etc.). -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Newbe DateTimeField Question
you can set default=None, that way you don't have to explicityly save that value as none every time you save an object. On Aug 21, 7:33 am, Torstenwrote: > Hi > > I simply want the DateTime to be set to null. > > payed_at = models.DateTimeField(null=True) > > but always get this as an error: > > IntegrityError at /admin/invoice/invoice/add/ > invoice_invoice.payed_at may not be NULL > > Thanks for help. > > Torsten -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: View-Voodoo: Calling functions in a view does weird things
I think you're 'call_my_other_function' is returning to the 'myview' function -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: login auth issue - beginner
Hi, Your traceback is from a 'login' function buy you're posting to base '/' Could that be an issue?? The traceback clearly explains what the problem is, no data is arriving at your login function -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Test Corrupted Test Data
I have a test class that subclasses django.test.TestCase which has about 5 different tests in it. When I run my full test suite (using nose, and specifying sqlite as backend) there are a series of failures. When I go to debug the tests, running them individually, they pass fine. http://stackoverflow.com/questions/7126172/django-testrunner-incorrect-query-counts-corrupted-data-general-mayhem -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.