Re: what is the best IDE to use for Python / Django
And what exact feature makes PyCharm an IDE that emacs hasnt? SCNR ;) Am 23.01.2012 13:41, schrieb Leandro Ostera Villalva: That's because PyCharm is an actual IDE while gedit, st2, emacs, vi and forth are text editors. El 23 de enero de 2012 04:35, Mario Gudelj <mailto:mario.gud...@gmail.com>> escribió: I've used gedit, sublime text 2, emacs, vi, but the best Django IDE by far is PyCharm. I'm seriously amazed at how awesome it is. It's worth every cent. On 23 January 2012 22:20, Sandro Dutra mailto:hexo...@gmail.com>> wrote: The best IDE is that you fell comfortable using it. 2012/1/21 goosfancito mailto:goosfanc...@gmail.com>>: > El 21/01/12 08:52, kenneth gonsalves escribió: > >> On Sat, 2012-01-21 at 03:34 -0800, John Yeukhon Wong wrote: >>> >>> While it has been asked a trillion times already, let me say TRY UT >>> YOURSELF. >> >> you were requested not to feed this thread. If the OP cannot search, >> here it is: >> >> http://duckduckgo.com/?q=site%3Agroups.google.com%2Fgroup%2Fdjango-users >> +python+IDE > > i used gedit only. > > > -- > 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 <mailto:django-users@googlegroups.com>. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@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 <mailto:django-users@googlegroups.com>. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com <mailto:django-users%2bunsubscr...@googlegroups.com>. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- Regards, Leandro Ostera, /BLOG - Check what I'm doing now <http://imakeapps.alwaysdata.net> EMAIL - Write me an email <mailto:leost...@gmail.com> SHOWCASE - Check my latest projects <http://ishowcase.alwaysdata.net>/ -- 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. -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: what is the best IDE to use for Python / Django
Hey thats a cool list and I feel like I must answer on it :) Am 01.02.2012 17:43, schrieb Masklinn: On 2012-02-01, at 17:00 , Bastian Ballmann wrote: And what exact feature makes PyCharm an IDE that emacs hasnt? * Semantics navigation (not via tags, it knows to find a class when you want a class) I heard ECB can do this, but I dont use it * Better static analysis and language knowledge (the type inference is still pretty limited, but if you instantiate an object and call a method on it it knows and only proposes the available methods) - virtualenv-aware, knows to restrict its libraries search to the project's virtualenv You can do this with setenv or virtualenv.el too - errors and warnings are faster to display than via flymake in my experience For me flymake is faster *g* - also intentions and quickfixes, PyCharm can improve or simplify code for known bad or sub-par patterns, and can fix a limited number of errors (PyCharm will suggest importing a module you reference without you having to go to the module top and doing so manually) Autoimport can be done with rope-auto-import - finds all references to an object And this one with rope-find-occurrences * Much, much better (faster, more expansive and with less bullet holes) refactoring support than Rope& ropemacs (I use both) * Good support of various template languages (Django, Jinja2 and Mako as of 2.0) with autocompletion, basic static analysis, syntax highlighting, etc… Yeah that's something I miss, but auto-completion for Django template code is available in django-mode * Semantic knowledge of Django projects - jumping between a view and its template This can also be done with django-mode * Much better debugging story - Pretty good visual debugger with watches and conditional breakpoints - Remote debugger (via a specific agent) Therefore I use pddb outside of Emacs - Django templates debugging Yep that's also something I miss. Can partly be done with Werkzeug in the browser For me Emacs has the far better editing features than the Eclipse editor with stuff like rectangle edit, macros and the like and it's very good extensible and therefore can perfectly adapted to one's needs. Greets Basti -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Is it secure to have IDs show up in URLs?
Hi Bastien, it's the task of the backend to manage the authorization including users and permissions. If the view and permission system allows all users to see everything and you dont want it that way than you have to check permission in your views. See https://docs.djangoproject.com/en/1.3/topics/auth/ This has nothing to do with having the id in the url or not cause hiding the id wont help you get a more secure system if your auth backend is crappy. Security by obscurity doesnt work. HTH && Greets Basti Am Fri, 23 Mar 2012 04:06:45 -0700 (PDT) schrieb Bastien : > I am concerned about seeing the IDs of objects appearing in the URL > and in a totally predictable manner. It is very convenient and clean > to do all sorts of things but can be abused very easily to retrieve > all the content of the site, ie: photos... > Is it a good idea to try to change this behavior? Maybe with some > sort of middleware? Is there any project doing it already? For > instance the urls in Instagram seem to be encoded at least. > -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Is it secure to have IDs show up in URLs?
I dont get it. You want to make all your stuff publicly available, but complain about the matter that everyone can access everything? Anyway for on any reason you want not so easy guessable links why not use md5 or sha1 checksum in hex of the photo as link? Greets Basti Am Fri, 23 Mar 2012 04:38:43 -0700 (PDT) schrieb Bastien : > Sorry maybe my post was not very clear, I am talking about public > content here, that should be accessed by anyone, even anonymous users > not logged in. For instance if we talk about photos, publicly > available, the url would look something > like /photos/1, /photos/2 1 and 2 being the pk of the object in > the db. If someone wants to download or link to these photos in a > totally uncontrollable way (without using an API), with that system > we are making it very easy to do mass content leakage. I don't want > to promote security by obscurity here, just want to know what people > in the group think about it and what solutions can be implemented, or > if it is relevant at all. > > The idea of slug could do the trick, but wouldn't it require some > sort of date or title or a combination of both in the url? Not the > most convenient in this case. > > On Friday, March 23, 2012 12:17:02 PM UTC+1, Bastian Ballmann wrote: > > > > Hi Bastien, > > > > it's the task of the backend to manage the authorization including > > users and permissions. > > > > If the view and permission system allows all users to see everything > > and you dont want it that way than you have to check permission in > > your views. > > See > > https://docs.djangoproject.com/en/1.3/topics/auth/<https://docs.djangoproject.com/en/1.3/topics/auth/> > > > > This has nothing to do with having the id in the url or not cause > > hiding the id wont help you get a more secure system if your auth > > backend is crappy. Security by obscurity doesnt work. > > > > HTH && Greets > > > > Basti > > > > > > Am Fri, 23 Mar 2012 04:06:45 -0700 (PDT) > > schrieb Bastien <>: > > > > > I am concerned about seeing the IDs of objects appearing in the > > > URL and in a totally predictable manner. It is very convenient > > > and clean to do all sorts of things but can be abused very easily > > > to retrieve all the content of the site, ie: photos... > > > Is it a good idea to try to change this behavior? Maybe with some > > > sort of middleware? Is there any project doing it already? For > > > instance the urls in Instagram seem to be encoded at least. > > > > > > > -- > > Bastian Ballmann / Web Developer > > Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich > > Phone +41 43 818 20 91 / www.notch-interactive.com > > > > > -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Chuck - Your powerful project punch button
Hi Django lovers out there, for all who didnt attend DjangoCon Europe virtually or physically we want to announce our project Django Chuck. Here's what's all about: Django Chuck is a modular, open source, command-based project build system developed by Notch Interactive GmbH, that gives you the power to create new projects as fast as pushing on a button. In the Django Chuck world, everything is organized within so-called modules, which incrementally get compiled into a project. There is really nothing that you can't configure or adjust and guess what, writing and adjusting your modules is totally easy. On top of that, Django Chuck comes with an already impressive amount of built-in modules and a bullet proof project structure. But Chuck cannot be just used to create a project. It can also checkout the source for you and setup everything until the dev server is up and running and you're ready to do your development work. Just leave all the annoying stuff to Chuck and if there is some task Chuck can't do for you at the moment you can add your own command to let Chuck configure your continuous integration system, setup your hosting or do whatever you might imagine! URLs are: http://pypi.python.org/pypi/Django%20Chuck/ http://django-chuck.readthedocs.org https://github.com/notch-interactive/django-chuck We advice you to use either the pip releases or the github tagged downloads otherwise you will use our unstable version an weird things might happen ;) If you like Django Chuck we are happy to hear from you either on github, stackoverflow (with tag django-chuck) or by email (ch...@notch-interactive.com). Wish you an awesome day The Django Chuck team -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone Phone +41 44 297 17 17 / www.notch-interactive.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 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
Arch Linux, GNU/Emacs with emacs-for-python extension, pylint, virtualenv, fabric, pudb, winpdb and firebug, postgresql, django-extensions, git Am 23.08.2011 00:07, schrieb Stephen Jackson: 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 view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Fq-jCVxrK7AJ. 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. -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Generic relation content_type does not exist
Hi all django lovers, I've got the problem that I want to check a model using the clean() method on the model class. My model has a generic relationship and i have to access the content_type property within the clean() method to get the job done. Now content_type is _sometimes_ defined and sometimes not, which leads to a DoesNotExist exception. The root of the problem seems to be in django/db/models/fields/related.py at cache_name = self.field.get_cache_name() try: return getattr(instance, cache_name) except AttributeError: val = getattr(instance, self.field.attname) if val is None: # If NULL is an allowed value, return it. if self.field.null: return None raise self.field.rel.to.DoesNotExist My models properties have a _prop_cache field on instance, but content_type does not and that raises the exception. I cannot really reproduce the error, but I know that it has something to do with the database, because changing or rebuilding it sometimes lead to the problem described. Can anyone tell me what that cache does or how it's build or how to solve my problem in another way? Any hint is appreciated! Thx && have a nice day! :) Basti -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Generic relation content_type does not exist
Hi again, maybe I get an answer if I ask the other way round. I've got an inline admin model with a generic foreignkey and I want to validate a set of it's properties in the models clean() method. If I add a new model neither content_type nor object_id is set in the clean() method, but if I try to change an existing model of course I can access the content_type property. Is there any work-around to get the content_type when I first add a new model? Any hint or url is appreciated :) TIA && greets Basti -- 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.
Unicode in unit tests
Hi all, I try to use a utf8 string in a Django unit test and have included # -*- coding: utf-8 -*- but django-admin.py still complaints there is no encoding. Traceback (most recent call last): File "/home/basti/work/virtualenv/bin/django-admin.py", line 5, in management.execute_from_command_line() File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 429, in execute_from_command_line utility.execute() File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/south/management/commands/test.py", line 8, in handle super(Command, self).handle(*args, **kwargs) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/core/management/commands/test.py", line 37, in handle failures = test_runner.run_tests(test_labels) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/test/simple.py", line 358, in run_tests suite = self.build_suite(test_labels, extra_tests) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/test/simple.py", line 248, in build_suite suite.addTest(build_suite(app)) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/test/simple.py", line 77, in build_suite test_module = get_tests(app_module) File "/home/basti/work/virtualenv/lib/python2.7/site-packages/django/test/simple.py", line 35, in get_tests test_module = __import__('.'.join(app_path + [TEST_MODULE]), {}, {}, TEST_MODULE) SyntaxError: Non-ASCII character '\xc3' in file tests.py on line 242, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details The string it's complaining about is also declared as unicode string using u"" and I've tried to set TEST_CHARSET and TEST_DATABASE_CHARSET to utf8, but still no luck. Any hints on how to solve that? TIA && have a nice day! Basti -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Second coming of Java?
Hey ho, I think it's funny, because Java's uglyness isn't only depending on it's slowliness in runtime, but also on it's horrible slowliness in development and in mastering the art to code and design as complex as possible. Why should I code the same functionality in 2 years if I can have it in 2 months in a simpler and more readable code? Greets Basti Am Mittwoch, den 12.10.2011, 13:52 -0700 schrieb ydjango: > What do you think? > > http://www.cringely.com/2011/10/the-second-coming-of-java/ > > "When SSDs gain enough capacity there will be a shift from the Ruby > world back to the Java world. Not for prototyping, because, well, it’s > prototyping. But simply because the statement “Ruby is incredibly slow > but I don’t care because my database is slower” will no longer be > true. At that point Ruby (Python, Groovy, you name it) becomes the > bottleneck." - from the above article > -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Unicode in unit tests
Am 13.10.2011 11:02, schrieb Tom Evans: # -*- coding: utf-8 -*- Is that on the first or second line of your file? If not, python will ignore it, as mentioned in the linked PEP. It's on the very first line of the tests.py Greets Basti -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Second coming of Java?
Am 13.10.2011 15:05, schrieb Tom Evans: Only people who are brought up on Java EE/.NET believe SOAP is useful/good. The rest of the world (yes, even us Enterprise with a big E) prefer simpler REST interfaces. Full ack! :) -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
PYTHONPATH and Django
Hi Django lovers, I am developing Django under Arch Linux with virtualenv and Python 2.7 and I've got a strange problem with PYTHONPATH. First I construct virtualenv with virtualenv2 --no-site-packages test than I switch to it using source test/bin/activate and install latest Django version using pip install django Now I start a new project and app, configure Django and last but not least I have to set the PYTHONPATH variable to my Django project dir in order to let Django find my apps. After setting PYTHONPATH django-admin.py looses commands like startproject and collectstatic and cannot find some Python modules I installed. When doing an unset PYTHONPATH the missing django-admin.py commands reappear. Asking the shell where django-admin.py lives with and without PYTHONPATH set always reveals the path in my virtualenv. Any hint what could be wrong here? Or can anyone share his or her virtualenv / Django config with me? TIA && have a nice day Basti -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: PYTHONPATH and Django
Hi, no seems that i got it wrong the problem was not my PYTHONPATH setting but my DJANGO_SETTINGS_MODULE setting. I imported another package that was absent and therefore django lost only some commands... Still strange at least for me, but the problem seems to be solved. Thx && Greets Basti Am Thu, 11 Aug 2011 15:20:16 +0200 schrieb Reinout van Rees : > On 11-08-11 09:37, Bastian Ballmann wrote: > > Now I start a new project and app, configure Django and last but not > > least I have to set the PYTHONPATH variable to my Django project > > dir in order to let Django find my apps. > > > > After setting PYTHONPATH django-admin.py looses commands like > > startproject and collectstatic and cannot find some Python modules I > > installed. When doing an unset PYTHONPATH the missing > > django-admin.py commands reappear. > > Setting PYTHONPATH probably puts those directories first in the > search path when python searches for modules. So some .py file of > yours might shadow one that django needs. That's what I guess is the > problem. Is there one filename in your project that strikes you as a > potential problem? > > For proper debugging, try to import one of those missing management > commands in your python prompt with and without the PYTHONPATH. > > > > Best solution, btw: turn your code into a python package. Which means > "add a setup.py". Then install that package with pip, too, and you > don't have to do anything with your python path manually. > > > Reinout > -- Bastian Ballmann / Web Developer Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich Phone +41 43 818 20 91 / www.notch-interactive.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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.