Re: Limiting the entry that loaded in django admin.
On 12/04/2012 12:08 PM, Chris Cogdon wrote: raw_id_fields is the first step. also look at django-ajax-selects, which gives you a lot of interesting abilities.] Thanks Chris for the tips. Will try it! On Monday, December 3, 2012 8:13:02 PM UTC-8, Bo Lang wrote: Hi all, need some input here. I have a site with > 15000 images, using django photologue. When we create a Post (that has Images field in it) from django admin, all of the images will be loaded in a dropdown. Before this, it was not create any problem. Now, after the number of images getting bigger, big chance we got timeout when try to create/edit Post. I think it is possible to limit the loaded images (although i don't know how to do it). But, which images that should be loaded? Any advice? Thanks before. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/R9y_b6rbt3wJ. 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. -- 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: Limiting the entry that loaded in django admin.
On 12/04/2012 11:24 AM, Andrew Macgregor wrote: Try using raw_id_fields: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.raw_id_fields Cheers, Andrew. It works! Thanks Andrew, -- 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.
Limiting the entry that loaded in django admin.
Hi all, need some input here. I have a site with > 15000 images, using django photologue. When we create a Post (that has Images field in it) from django admin, all of the images will be loaded in a dropdown. Before this, it was not create any problem. Now, after the number of images getting bigger, big chance we got timeout when try to create/edit Post. I think it is possible to limit the loaded images (although i don't know how to do it). But, which images that should be loaded? Any advice? Thanks before. -- 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.
virtualization that suitable for django & mysql server
Hi, I want to deploy my django app to VPS. So far, i use KVM and it works great without problem. Now, i want to split my mysql server to another VPS. The VPS provider have both openvz & KVM VPS. Which virtualization type that recomended for django? And which virtualization type that recommended for mysql/postgresql. AFAIK, KVM will have less performance than openvz but will have more guaranted/stable performance. Thanks -- 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: two versions of django onsame machine .. django and django-norel
On 05/17/2012 12:42 AM, vijay shanker wrote: i have installed django 1.4 previously and want to install django- norel now.. should i unisntall django 1.4 first .. is it necessary If you use virtualenv, you can install many numbers of django version in the same time. -- 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 1.4 : gunicorn can't find static files. settings option
On 05/16/2012 01:08 PM, huseyin yilmaz wrote: For development, you could add this to main urls.py like this. (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), Thanks, It solves the problem! But for production use your web server to serve static files. At least this is how I solved it. I hope that helps. On May 16, 5:56 am, Bolang<boo.l...@gmail.com> wrote: Hi, I just started to using django 1.4 with gunicorn 0.14.3 With ./manage.py runserver , i can start django properly and django can find my files in static directory. Then i use gunicorn and then gunicorn can't find my files in static directory. I have tried these combination gunicorn myproject.wsgi:application --settings myproject.settings gunicorn myproject.wsgi:application --settings /absolute/path/to/settings.py ./manage.py run_gunicorn --settings=myproject.settings All of the commands can start django, but can't find my files in static directory I also found this issuehttps://github.com/benoitc/gunicorn/issues/322 But, i can't find the solution from that page. Any kind of help will be appreciated Thanks -- 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 1.4 : gunicorn can't find static files. settings option
Hi, I just started to using django 1.4 with gunicorn 0.14.3 With ./manage.py runserver , i can start django properly and django can find my files in static directory. Then i use gunicorn and then gunicorn can't find my files in static directory. I have tried these combination gunicorn myproject.wsgi:application --settings myproject.settings gunicorn myproject.wsgi:application --settings /absolute/path/to/settings.py ./manage.py run_gunicorn --settings=myproject.settings All of the commands can start django, but can't find my files in static directory I also found this issue https://github.com/benoitc/gunicorn/issues/322 But, i can't find the solution from that page. Any kind of help will be appreciated Thanks -- 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: Upload files without form
On 05/08/2012 06:19 AM, kooliah wrote: Does someone already done it WITHOUT USING FORMS, or can help me... Hi, I use this method http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file Thanks to all Alkatron -- 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.
tagging with django
Hi, I wanna add tagging in my web. So far, i found django-tagging[1] and django-taggit[2]. From quick look, and by reading this blog post[3], i think i will choose django-taggit. Before using django-taggit, is there any other alternatives? Thanks [1]http://code.google.com/p/django-tagging/ [2]https://github.com/alex/django-taggit [3]http://davidfischer.name/2010/09/django-taggit-vs-django-tagging/ -- 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: New way to run your Django projects
On 03/19/2012 08:28 PM, Alexander wrote: Hi Bolang, I'm not sure what you meant by "simply using nginx" since as far as I know it doesn't have standard WSGI module. I hope you're not talking about running WSGI application as CGI script, do you? Hi Alexander, Thanks for your long response, really apreciate it. Actually, i'm just django & python beginner, although already have a few simple sites in production. And actually i'm not really understand wsgi, uwsgi, etc. I use nginx because AFAIK it great on serving static files and as a proxy. I use gunicorn when i need multiple process. When will i need your gevent-fastcgi? Or which types of applications that really need your gevent-fastcgi. From your answer, one of them is long-polling webapp and webapp with thousand of simultaneous connections. As a newbie, i think i will not build that kind of advanced apps now. Thanks As to comparing Gunicorn to gevent-fastcgi Gunocorn is HTTP server and gevent-fastcg is FastCGI one. FastCGI can run over UNIX domain sockets, it can multiplex requests using single connection. That could be deal-breaker when application is using long-polling requests and there are thousands of clients that can be accessing it simultaneously. Beside HTTP is not well suited for communication between frontend and backend (just recall famous need to fix hostname:port in backend server responses because backend server has no way to get access to original HTTP-request and it might not even know that there is something that makes request on behalf of client browser). There is no such problems in FastCGI protocol because it was specifically designed for frontend/backend communication. Gevent-fastcgi is not well suited for any type of applications. The application should not block since everything is run in the same thread (there are greenlets that are used in place of thread to avoid GIL). Not all databases and other external resources can be used in non-blocking mode. Luckily PostgreSQL, MySQL, Memcache are those that have adapters/hooks for making them work well in non-blocking manner. Alex Bolang wrote: Hi Alexander, What is the advantage of using gevent-fastcgi instead of simply using nginx and maybe with gunicorn? -- 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: New way to run your Django projects
Hi Alexander, What is the advantage of using gevent-fastcgi instead of simply using nginx and maybe with gunicorn? On 03/18/2012 12:59 PM, Alexander wrote: Hello everybody, I'm working on gevent coroutine based library FastCGI server implementation and I's ready for testing. It most likely contains lots of bugs and it would be great if you help to catch some of them. Just install gevent-fastcgi package: $ easy_install gevent-fastcgi Then include gevent_fastcgi.adapters.django into INSTALLED_APPS list of your settings.py. Then run: $ python manage.py run_gevent_fastcgi host:port Run "python manage.py run_gevent_fastcgi --help" to find out more about run_gevent_fastcgi command. Alex -- 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: password_reset email template issue
You need to configure your 'sites'. You can configure it in admin page On 03/12/2012 05:30 AM, Scott Macri wrote: I'm having an issue with my email template for the password_reset view. For some reason I keep getting the following instead of my template text: You're receiving this e-mail because you requested a password reset for your user account at example.com. Please go to the following page and choose a new password: http://example.com/myapp/reset/1-35j-56ec87rt0bb5d7d60ed17/ Your username, in case you've forgotten: coolapp Thanks for using our site! The example.com team Where is the example.com stuff coming from? I've created the following template registration/password_reset_email.html Here is the template code, which I got from another site: {% load i18n %}{% autoescape off %} {% trans "You're receiving this e-mail because you requested a password reset" %} {% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. {% trans "Please go to the following page and choose a new password:" %} {% block reset_link %} {{ protocol }}://{{ domain }}{% url django.contrib.auth.views.password_reset_confirm uidb36=uid, token=token %} {% endblock %} {% trans "Your username, in case you've forgotten:" %} {{ user.username }} {% trans "Thanks for using our site!" %} {% blocktrans %}The {{ site_name }} team{% endblocktrans %} {% endautoescape %} I guess I need to set the site_name and domain somewhere, is this supposed to go into the settings.py or something? Thanks. Here is the info in my urls.py: url(r'^password_reset/$', 'django.contrib.auth.views.password_reset', name='password_reset'), url(r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done', name='password_reset_done'), url(r'^reset/(?P[0-9A-Za-z]{1,13})-(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', 'django.contrib.auth.views.password_reset_confirm', name='password_reset_confirm'), url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete', name='password_reset_complete'), -- 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.
send binary(pdf) file to server
Hi, I have a need to send pdf file from several worker server to main server. The main server will then save the file to DB(MySQL). I have read somewhere that json rpc with base64 encoding is not efficient to send binary file. Any suggestions? For my current load, non efficient solution (e.g. json rpc) will not be a problem. But i'm looking for a better alternative. Thanks -- 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.
equivalent of flask's flash() in django
Hi all, What is the equivalent of flask's flash()[1] in django? Thanks [1]http://flask.pocoo.org/docs/patterns/flashing/ -- 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: ANN: Mezzanine 1.0 released
On 03/04/2012 06:51 AM, Stephen McDonald wrote: In conjunction with the Mezzanine 1.0 release, I've also released Cartridge 0.4. As I mentioned, Cartridge provides a full ecommerce package for Mezzanine. While Mezzanine is more of a framework for building sites with any type of content you need to, Cartridge is much more opinionated in its function, namely how a store should be set up, and is more of a standard Django app that implements the most common features you'd find in an online store. Like Mezzanine, Cartridge has been under development for a couple of years now. Since I haven't posted to django-users about either Mezzanine or Cartridge before, here's an overview of Cartridge's features as well: - Hierarchical shop categories. These are just Mezzanine content types and hook into your site's navigation. - Single interface for setting up a product, with 0 to N variations. - Arbitrary product options (colours, sizes, etc). - Hooks for shipping calculations and payment gateway. - Sale pricing. - Promotional discount codes. - PDF invoice generation (for packing slips). - Stock control. - Dynamic categories (by price range, colour, etc). - Registered or anonymous checkout. - Configurable nunber of checkout steps. Very interesting. Can you share pros & cons between cartridge & satchmo? Can it support multishop? (i.e. one cartrdge installation for multiple shops) -- 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 profile
On 03/03/2012 03:33 AM, Denis Darii wrote: 1. http://pinaxproject.com/ 2. http://django-userena.org/ Thanks Denis, Django userena looks very interesting. On Fri, Mar 2, 2012 at 9:26 PM, Bolang <boo.l...@gmail.com <mailto:boo.l...@gmail.com>> wrote: Can someone suggest me an application for adding user profile to django? I have found http://code.google.com/p/__django-profile/ <http://code.google.com/p/django-profile/> and https://bitbucket.org/__ubernostrum/django-profiles <https://bitbucket.org/ubernostrum/django-profiles> but those 2 projects don't receive update recently. Thanks -- 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 profile
Can someone suggest me an application for adding user profile to django? I have found http://code.google.com/p/django-profile/ and https://bitbucket.org/ubernostrum/django-profiles but those 2 projects don't receive update recently. Thanks -- 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.