Title stringlengths 11 150 | A_Id int64 518 72.5M | Users Score int64 -42 283 | Q_Score int64 0 1.39k | ViewCount int64 17 1.71M | Database and SQL int64 0 1 | Tags stringlengths 6 105 | Answer stringlengths 14 4.78k | GUI and Desktop Applications int64 0 1 | System Administration and DevOps int64 0 1 | Networking and APIs int64 0 1 | Other int64 0 1 | CreationDate stringlengths 23 23 | AnswerCount int64 1 55 | Score float64 -1 1.2 | is_accepted bool 2
classes | Q_Id int64 469 42.4M | Python Basics and Environment int64 0 1 | Data Science and Machine Learning int64 0 1 | Web Development int64 1 1 | Available Count int64 1 15 | Question stringlengths 17 21k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Permission to view, but not to change! - Django | 3,069,023 | 3 | 27 | 25,793 | 0 | python,django,django-admin | One workaround would be to have an additional "save" permission on your model and check in the modeladmin's save_model method if the user has this permissions, if he has not, that would mean he can do everything in this modeladmin, except saving edited data! | 0 | 0 | 0 | 0 | 2010-06-18T10:30:00.000 | 12 | 0.049958 | false | 3,068,843 | 0 | 0 | 1 | 3 | is it possible to give users the permission to view, but not to change or delete.
currently in the only permissions I see are "add", "change" and "delete"... but there is no "read/view" in there.
I really need this as some users will only be able to consult the admin panel, in order to see what has been added in. |
Permission to view, but not to change! - Django | 3,180,399 | 2 | 27 | 25,793 | 0 | python,django,django-admin | You can do this by following way:
1)You can make the fields read only if the object has been created.But doing this noone will be able to change the fields
2)You can use databrowse
3)You can use form validation ,if user is not in the selected list throw validation error if any field is changed
4)you can create a view ,... | 0 | 0 | 0 | 0 | 2010-06-18T10:30:00.000 | 12 | 0.033321 | false | 3,068,843 | 0 | 0 | 1 | 3 | is it possible to give users the permission to view, but not to change or delete.
currently in the only permissions I see are "add", "change" and "delete"... but there is no "read/view" in there.
I really need this as some users will only be able to consult the admin panel, in order to see what has been added in. |
Permission to view, but not to change! - Django | 5,363,776 | 0 | 27 | 25,793 | 0 | python,django,django-admin | You may also override ModelAdmin.change_view (as stated in the Django docs). Just make sure you also override save_model to make sure the user can't update the data | 0 | 0 | 0 | 0 | 2010-06-18T10:30:00.000 | 12 | 0 | false | 3,068,843 | 0 | 0 | 1 | 3 | is it possible to give users the permission to view, but not to change or delete.
currently in the only permissions I see are "add", "change" and "delete"... but there is no "read/view" in there.
I really need this as some users will only be able to consult the admin panel, in order to see what has been added in. |
Some kind of event functionality in Django? | 3,069,642 | 0 | 0 | 79 | 0 | python,django | Personnaly, I use the exception mechanism for this kind of stuff and I don't really see why I shouldn't | 0 | 0 | 0 | 0 | 2010-06-18T12:34:00.000 | 2 | 1.2 | true | 3,069,583 | 0 | 0 | 1 | 2 | I have a view my Django application which when invoked calls my backend. My backend logic sometimes reaches a point when it needs user input to continue. When this happens, I pickle dump my backend data into the session so that i can resume it later on.
Currently i have defined the scenario when user input is required ... |
Some kind of event functionality in Django? | 3,070,920 | 0 | 0 | 79 | 0 | python,django | I'd say there are two ways: You assume that data should be present and if they are not, custom exception should be raised as mentioned.
However, if it's part of expected workflow and it may just be present in a state, I'd handle it accordingly, i.e. by checking results from view calls.
(And I'd say that continuations f... | 0 | 0 | 0 | 0 | 2010-06-18T12:34:00.000 | 2 | 0 | false | 3,069,583 | 0 | 0 | 1 | 2 | I have a view my Django application which when invoked calls my backend. My backend logic sometimes reaches a point when it needs user input to continue. When this happens, I pickle dump my backend data into the session so that i can resume it later on.
Currently i have defined the scenario when user input is required ... |
From the web to games | 3,074,113 | 0 | 6 | 471 | 0 | php,javascript,python | Looking at your tags, web games are mostly client side, and since you aren't going to use flash, i would say JavaScript would work for 2D. With all the libraries and plug-ins out there, JavaScript can actually handle it. | 0 | 0 | 0 | 1 | 2010-06-19T02:38:00.000 | 6 | 0 | false | 3,074,103 | 0 | 0 | 1 | 4 | I'm a basic web developer. I know PHP, a little bit of Python and Ruby. JavaScript as well [some stuff]. I'm not a hardcore developer. I know what it takes do develop most of web cases.
Now, I have this desire to go deeper and start developing games. I know it sounds a huge leap, but that is why I'm asking here. I alre... |
From the web to games | 3,074,138 | 0 | 6 | 471 | 0 | php,javascript,python | Taking a look at OpenGL may not be a terrible idea. You can use the library in many languages, and is supported with in HTML5 (WebGL). There are several excellent tutorials out there. | 0 | 0 | 0 | 1 | 2010-06-19T02:38:00.000 | 6 | 0 | false | 3,074,103 | 0 | 0 | 1 | 4 | I'm a basic web developer. I know PHP, a little bit of Python and Ruby. JavaScript as well [some stuff]. I'm not a hardcore developer. I know what it takes do develop most of web cases.
Now, I have this desire to go deeper and start developing games. I know it sounds a huge leap, but that is why I'm asking here. I alre... |
From the web to games | 3,074,736 | 0 | 6 | 471 | 0 | php,javascript,python | If you want to learn more Python while doing so, you may want to take PyGame or an equivalent program. PHP, Ruby and JavaScript aren't going to help you in the video game section, though. They're all related to the internet.
If you want to start of real easy, try out Genesis3D. you can make awesome 3D FPS games, and i... | 0 | 0 | 0 | 1 | 2010-06-19T02:38:00.000 | 6 | 0 | false | 3,074,103 | 0 | 0 | 1 | 4 | I'm a basic web developer. I know PHP, a little bit of Python and Ruby. JavaScript as well [some stuff]. I'm not a hardcore developer. I know what it takes do develop most of web cases.
Now, I have this desire to go deeper and start developing games. I know it sounds a huge leap, but that is why I'm asking here. I alre... |
From the web to games | 3,075,334 | 3 | 6 | 471 | 0 | php,javascript,python | Python's Pygame is certainly a good choice as others have said. If you want to get in to deep video game programming though.. move on to something like C++ or another lower level language.. from experience, most higher level languages tend to put artificial hurdles up in regards to decent video games. Though for a simp... | 0 | 0 | 0 | 1 | 2010-06-19T02:38:00.000 | 6 | 0.099668 | false | 3,074,103 | 0 | 0 | 1 | 4 | I'm a basic web developer. I know PHP, a little bit of Python and Ruby. JavaScript as well [some stuff]. I'm not a hardcore developer. I know what it takes do develop most of web cases.
Now, I have this desire to go deeper and start developing games. I know it sounds a huge leap, but that is why I'm asking here. I alre... |
How to make django messages StackOverflow style? | 3,076,590 | 2 | 11 | 4,960 | 0 | python,ajax,django,django-users | Django messages might seem like a good starting point, but require contortions to get to where you want to go, and I wouldn't trust that future release of Django wouldn't break your hacks.
Implementing your own UserMessage model will probably serve you better in the long run. That gives you complete, unambiguous contro... | 0 | 0 | 0 | 0 | 2010-06-19T16:52:00.000 | 4 | 0.099668 | false | 3,076,365 | 0 | 0 | 1 | 2 | I'd like to use Django's Messages module, however, I would like my messages to persist until the user clicks an X next to the message as opposed to having messages disappear as soon as the user reloads the page.
I am stumped with two issues:
How do I make the messages' context processor not delete the messages once the... |
How to make django messages StackOverflow style? | 3,084,273 | 8 | 11 | 4,960 | 0 | python,ajax,django,django-users | In your case django.contrib.messages won't bring you anywhere good. It's a message system inspired by RoR flash system, where messages aren't supposed to stay around
You should create your own messaging system (django-persistent-messages maybe?) that would save messages for registered users in database.
It's a fairly ... | 0 | 0 | 0 | 0 | 2010-06-19T16:52:00.000 | 4 | 1.2 | true | 3,076,365 | 0 | 0 | 1 | 2 | I'd like to use Django's Messages module, however, I would like my messages to persist until the user clicks an X next to the message as opposed to having messages disappear as soon as the user reloads the page.
I am stumped with two issues:
How do I make the messages' context processor not delete the messages once the... |
Does GQL automatically add an "ID" Property | 3,078,018 | 4 | 1 | 282 | 1 | python,google-app-engine,gql | An object has a Key, part of which is either an automatically-generated numeric ID, or an assigned key name. IDs are not guaranteed to be increasing, and they're almost never going to be consecutive because they're allocated to an instance in big chunks, and IDs unused by the instance to which they're allocated will n... | 0 | 1 | 0 | 0 | 2010-06-19T20:38:00.000 | 3 | 0.26052 | false | 3,077,156 | 0 | 0 | 1 | 2 | I currently work with Google's AppEngine and I could not find out, whether a Google DataStorage Object Entry has an ID by default, and if not, how I add such a field and let it increase automatically?
regards, |
Does GQL automatically add an "ID" Property | 3,077,170 | 3 | 1 | 282 | 1 | python,google-app-engine,gql | Yes, they have id's by default, and it is named ID as you mentioned. | 0 | 1 | 0 | 0 | 2010-06-19T20:38:00.000 | 3 | 1.2 | true | 3,077,156 | 0 | 0 | 1 | 2 | I currently work with Google's AppEngine and I could not find out, whether a Google DataStorage Object Entry has an ID by default, and if not, how I add such a field and let it increase automatically?
regards, |
OpenSSL for HTTPS without a certificate | 3,078,518 | 2 | 1 | 703 | 0 | python,ssl,openssl,m2crypto | You will need a SSL cert, and let the web server handle the HTTPS. | 0 | 0 | 1 | 0 | 2010-06-20T07:17:00.000 | 2 | 0.197375 | false | 3,078,487 | 0 | 0 | 1 | 1 | I'm looking to create an application in Django which will allow for each client to point their domain to my server. At this point, I would want their domain to be accessed via https protocol and have a valid SSL connection. With OpenSSL, more specifically M2Crypto, can I do this right out the gate? Or, do I still need ... |
Ruby HAML with Django? | 3,144,408 | 0 | 19 | 3,831 | 0 | python,ruby,django,haml | While this could end up being more trouble than it is worth, it is PROBABLY possible to leverage the Java or .NET platform and still run your Django application in Jython or IronPython (with some minor adjustments I'm sure) and also be able to leverage Ruby's HAML gem via jRuby or IronRuby.
I'm sure there will be some ... | 0 | 0 | 0 | 0 | 2010-06-20T13:24:00.000 | 4 | 0 | false | 3,079,368 | 0 | 0 | 1 | 2 | Ok, so I really love HAML. Particularly, I love the integration with RedCloth and BlueCloth, so I can use Markdown and Textile intermixed with my HAML.
I also love Python and Django.
So, I would like to use HAML with Django. Now, I already understand that there are some attempts at cloning HAML-like syntax in Python ... |
Ruby HAML with Django? | 7,147,104 | 1 | 19 | 3,831 | 0 | python,ruby,django,haml | I strongly recommend that you do not fork any processes out of your django views, because the overhead is significant.
You should have a persistent ruby process to serve your templates for you, and invoke it from your django code. I leave the IPC technology to you, but the obvious choices would either be some kind of ... | 0 | 0 | 0 | 0 | 2010-06-20T13:24:00.000 | 4 | 0.049958 | false | 3,079,368 | 0 | 0 | 1 | 2 | Ok, so I really love HAML. Particularly, I love the integration with RedCloth and BlueCloth, so I can use Markdown and Textile intermixed with my HAML.
I also love Python and Django.
So, I would like to use HAML with Django. Now, I already understand that there are some attempts at cloning HAML-like syntax in Python ... |
Can I use Ruby and Python together? | 3,079,547 | 8 | 8 | 662 | 0 | python,ruby | If you develop for the .NET Framework Version 4.0, you can write code in IronRuby that calls methods that were written in IronPython and vice versa. | 0 | 0 | 0 | 1 | 2010-06-20T14:15:00.000 | 4 | 1.2 | true | 3,079,531 | 0 | 0 | 1 | 1 | Is there something like JRuby but for Ruby and Python?
Not that it would actually be useful to me, but just wondering. |
What methods and tools do you use to design and analyze the workflow in a web application (for a tiny team) | 3,081,567 | 1 | 5 | 141 | 0 | python | +1 for a good question.
Web development is not much different to any other development.
P.20 of that venerable classic breaks a typical project down into 1/3 planning, 1/6 coding, 1/4 component test and 1/4 system test. I might catch some flak for that, YMMV and all, but that looks about right to me.
Whether or not you... | 0 | 0 | 0 | 0 | 2010-06-20T23:58:00.000 | 3 | 0.066568 | false | 3,081,412 | 0 | 0 | 1 | 2 | Note: I use TRAC integrated with SVN, framework testing tools, an excellent mixture of staging servers, development servers, and other tools to speed development and keep track of tasks.
I am asking about the specific process of design, and even more specifically, the design of functionality and flow in a web applicati... |
What methods and tools do you use to design and analyze the workflow in a web application (for a tiny team) | 3,097,921 | 1 | 5 | 141 | 0 | python | Pencils!
Seriously, we use JIRA to track work/issue, Confluence to track requirements before they're baked enough to put in JIRA.. Anything to scratch together wire-frames, etc. (Including OmniGraffle, and Pencils).
I find the combination of JIRA and Confluence for tracking chunks of work and longer-lived concepts and ... | 0 | 0 | 0 | 0 | 2010-06-20T23:58:00.000 | 3 | 1.2 | true | 3,081,412 | 0 | 0 | 1 | 2 | Note: I use TRAC integrated with SVN, framework testing tools, an excellent mixture of staging servers, development servers, and other tools to speed development and keep track of tasks.
I am asking about the specific process of design, and even more specifically, the design of functionality and flow in a web applicati... |
What's a good document standard to use programmatically? | 3,082,556 | 0 | 3 | 581 | 0 | python,pyqt,document | Creating XML documents, transforming them to XSL/fo and rendering with Fop or RenderX. If you use docbook as the primary input, there are toolchains freely available for converting that to PDF, RTF, HTML and so forth.
It is rather quirky to use and not my idea of fun, but is does deliver and can be embedded in an appl... | 0 | 0 | 0 | 0 | 2010-06-21T06:25:00.000 | 5 | 0 | false | 3,082,502 | 0 | 0 | 1 | 1 | I'm writing a program that requires input in the form of a document, it needs to replace a few values, insert a table, and convert it to PDF. It's written in Python + Qt (PyQt). Is there any well known document standard which can be easily used programmatically? It must be cross platform, and preferably open.
I have l... |
Using Crypto by placing folder in python path? - Python | 3,085,685 | 1 | 0 | 317 | 0 | python,django,aes,pycrypto | You'll need to build pycrypto before you upload it. This will need to be done on a machine with as similar an environment to your server as possible.
To build, run python setup.py build from inside the pycrypto-2.1.0 directory. This will create build\lib.win32-2.6\Crypto (the name of the libxxx directory might be a lit... | 0 | 0 | 0 | 0 | 2010-06-21T09:16:00.000 | 1 | 0.197375 | false | 3,083,366 | 0 | 0 | 1 | 1 | I'm using Django in order to serve a web service. I have only access to FTP and code refresh at the moment. No access to command-line or executing any kind of executable.
I am using a Windows Server 2005 machine.
Would I be able to use Crypto just by placing the folder within my Django project?
Are there any good alter... |
How do I get tags/keywords from a webpage/feed? | 3,250,807 | 0 | 1 | 226 | 0 | python,tags,visualization,keyword | What you have is a rough 1st order approximation. I think if you then go back through the data and search for frequency of 2-word phrases, then 3 word phrases, up till the total number of words that can be considered a tag, you'll get a better representation of keyword frequency.
You can refine this rough search patter... | 0 | 0 | 1 | 0 | 2010-06-21T10:17:00.000 | 1 | 0 | false | 3,083,784 | 0 | 0 | 1 | 1 | I have to build a tag cloud out of a webpage/feed. Once you get the word frequency table of tags, it's easy to build the tagcloud. But my doubt is how do I retrieve the tags/keywords from the webpage/feed?
This is what I'm doing now:
Get the content -> strip HTML -> split them with \s\n\t(space,newline,tab) -> Keyword... |
How to click and verify the existence of a pop up (alert) | 3,103,295 | 1 | 2 | 3,169 | 0 | python,selenium | as far as I know you have to use always in alerts
selenium.get_confirmation()
from python doc:
If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail. | 0 | 0 | 1 | 0 | 2010-06-21T13:01:00.000 | 3 | 0.066568 | false | 3,084,850 | 0 | 0 | 1 | 1 | I'm working with selenium.
while trying to click a button it creates a pop up (alert) and doesn’t return a page object.
Because of that I can’t use “click” alone as this method expects a page object and eventually fails because of a timeout.
I can use the “chooseOkOnNextConfirmation()” but this will click the pop up an... |
Pros and cons for different configuration formats? | 3,086,515 | 6 | 52 | 21,947 | 0 | python,json,xml,google-app-engine,configuration-files | Note, this is pure opinion and speculation on my part but I suspect that the single biggest reason for the plethora of formats is likely due to the lack of a readily available, omnipresent configuration file parsing library. Lacking that, most programs have to write their own parsers so it would often come down to bala... | 0 | 0 | 0 | 0 | 2010-06-21T13:26:00.000 | 4 | 1 | false | 3,085,029 | 0 | 0 | 1 | 4 | I've seen people using *.cfg (Python Buildout), *.xml (Gnome), *.json (Chrome extension), *.yaml (Google App Engine), *.ini and even *.py for app configuration files (like Django).
My question is: why there are so many different configuration file formats? I can see an advantage from a xml vs json approach (much less v... |
Pros and cons for different configuration formats? | 3,086,617 | 32 | 52 | 21,947 | 0 | python,json,xml,google-app-engine,configuration-files | It's mostly personal preference, purpose, and available libraries. Personally I think xml is way too verbose for config files, but it is popular and has great libraries.
.cfg, .ini are legacy formats that work well and many languages have an included library that reads them. I've used it in Java, Python, C++ without is... | 0 | 0 | 0 | 0 | 2010-06-21T13:26:00.000 | 4 | 1.2 | true | 3,085,029 | 0 | 0 | 1 | 4 | I've seen people using *.cfg (Python Buildout), *.xml (Gnome), *.json (Chrome extension), *.yaml (Google App Engine), *.ini and even *.py for app configuration files (like Django).
My question is: why there are so many different configuration file formats? I can see an advantage from a xml vs json approach (much less v... |
Pros and cons for different configuration formats? | 59,535,927 | 1 | 52 | 21,947 | 0 | python,json,xml,google-app-engine,configuration-files | It really depends on whether the reader/writer of the configuration file is, or can be, a non-programmer human or if it has strictly programmatic access.
XML, JSON, etc., are totally unsuitable for human consumption, while the INI format is half-way reasonable for humans.
If the configuration file has only programmatic... | 0 | 0 | 0 | 0 | 2010-06-21T13:26:00.000 | 4 | 0.049958 | false | 3,085,029 | 0 | 0 | 1 | 4 | I've seen people using *.cfg (Python Buildout), *.xml (Gnome), *.json (Chrome extension), *.yaml (Google App Engine), *.ini and even *.py for app configuration files (like Django).
My question is: why there are so many different configuration file formats? I can see an advantage from a xml vs json approach (much less v... |
Pros and cons for different configuration formats? | 62,036,718 | 0 | 52 | 21,947 | 0 | python,json,xml,google-app-engine,configuration-files | According to Python official docs, 'future enhancements to configuration functionality will
be added to dictConfig()'.
So any config file which can be used with dictconfig() should be fine. | 0 | 0 | 0 | 0 | 2010-06-21T13:26:00.000 | 4 | 0 | false | 3,085,029 | 0 | 0 | 1 | 4 | I've seen people using *.cfg (Python Buildout), *.xml (Gnome), *.json (Chrome extension), *.yaml (Google App Engine), *.ini and even *.py for app configuration files (like Django).
My question is: why there are so many different configuration file formats? I can see an advantage from a xml vs json approach (much less v... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,088,843 | 17 | 61 | 37,252 | 0 | java,python,ruby,multithreading | A confused question with a lot of confused answers...
First, threading and concurrent execution are different things. Python supports threads just fine; it doesn't support concurrent execution in any real-world implementation. (In all serious implementations, only one VM thread can execute at a time; the many attempt... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 1 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,520 | 6 | 61 | 37,252 | 0 | java,python,ruby,multithreading | Certainly the webserver will have a pool of threads. That's only outside the control of your program. Those threads are used to handle HTTP requests. Each HTTP request is handled in a separate thread and the thread is released back to pool when the associated HTTP response is finished. If the webserver doesn't have suc... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 1 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,582 | 60 | 61 | 37,252 | 0 | java,python,ruby,multithreading | Both Python and Ruby have full support for multi-threading. There are some implementations (e.g. CPython, MRI, YARV) which cannot actually run threads in parallel, but that's a limitation of those specific implementations, not the language. This is similar to Java, where there are also some implementations which cannot... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 1.2 | true | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,550 | 4 | 61 | 37,252 | 0 | java,python,ruby,multithreading | Most languages don't define single or multithreading. Usually, that is left up to the libraries to implement.
That being said, some languages are better at it than others. CPython, for instance, has issues with interpreter locking during multithreading, Jython (python running on the JVM) does not.
Some of the real powe... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0.061461 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,571 | 0 | 61 | 37,252 | 0 | java,python,ruby,multithreading | How to untangle the knots in al those threads...
Clojure did not invent threading, however it has particularly strong support for it with Software Transactional Memory, Atoms, Agents, parallel map operations, ...
All other have accumulated threading support. Ruby is a special case as it has green threads in some implem... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,584 | 5 | 61 | 37,252 | 0 | java,python,ruby,multithreading | The short answer is yes, they are single threaded.
The long answer is it depends.
JRuby is multithreaded and can be run in tomcat like other java code. MRI (default ruby) and Python both have a GIL (Global Interpreter Lock) and are thus single threaded.
The way it works for web servers is further complicated by the ... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0.076772 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,086,920 | 0 | 61 | 37,252 | 0 | java,python,ruby,multithreading | Reading these answers here... A lot of them try to sound smarter than they really are imho (im mostly talking about Ruby related stuff as thats the one i'm most familiar with).
In fact, JRuby is currently the only Ruby implementation that supports true concurrency. On JVM Ruby threads are mapped to OS native threads, w... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 3,087,997 | 0 | 61 | 37,252 | 0 | java,python,ruby,multithreading | Yes Ruby and Python can handle multi-threading, but for many cases (web) is better to rely on the threads generated by the http requests from the client to the server. Even if you generate many threads on a same application to low the runtime cost or to handle many task at time, in a web application case that's usually... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
Confused, are languages like python, ruby single threaded? unlike say java? (for web apps) | 60,181,609 | 1 | 61 | 37,252 | 0 | java,python,ruby,multithreading | keeping this very short..
Python supports Multi Threading.
Python does NOT support parallel execution of its Threads.
Exception:
Above statement may vary with implementations of Python not using GIL (Global Interpreter Locking).
If a particular implementation is not using GIL, then, that would be Multi Threaded as we... | 0 | 0 | 0 | 0 | 2010-06-21T16:29:00.000 | 13 | 0.015383 | false | 3,086,467 | 1 | 0 | 1 | 9 | I was reading how Clojure is 'cool' because of its syntax + it runs on the JVM so it is multithreaded etc. etc.
Are languages like ruby and python single threaded in nature then? (when running as a web app).
What are the underlying differences between python/ruby and say java running on tomcat?
Doesn't the web server h... |
SimpleDB query performance improvement using boto | 9,012,699 | 0 | 2 | 1,743 | 1 | python,amazon-simpledb,boto | I have had the same issue as you Charlie. After profiling the code, I have narrowed the performance problem down to SSL. It seems like that is where it is spending most of it's time and hence CPU cycles.
I have read of a problem in the httplib library (which boto uses for SSL) where the performance doesn't increase unl... | 0 | 0 | 0 | 0 | 2010-06-23T15:38:00.000 | 3 | 0 | false | 3,103,145 | 0 | 0 | 1 | 1 | I am trying to use the SimpleDB in following way.
I want to keep 48 hrs worth data at anytime into simpledb and query it for different purposes.
Each domain has 1 hr worth data, so at any time there are 48 domains present in the simpledb.
As the new data is constantly uploaded, I delete the oldest domain and create a... |
Finding images with pure colours | 3,106,854 | 1 | 1 | 381 | 0 | python,image,image-processing,colors | How about doing this?
Blur the image using some fast blurring algorithm. (Search for stack blur or box blur)
Compute standard deviation of the pixels in RGB domain, once for each color.
Discard the image if the standard deviation is beyond a certain threshold. | 0 | 0 | 0 | 0 | 2010-06-24T02:02:00.000 | 2 | 1.2 | true | 3,106,788 | 0 | 1 | 1 | 1 | I've read a number of questions on finding the colour palette of an image, but my problem is slightly different. I'm looking for images made up of pure colours: pictures of the open sky, colourful photo backgrounds, red brick walls etc.
So far I've used the App Engine Image.histogram() function to produce a histogram, ... |
Django Template Ternary Operator | 3,110,234 | 5 | 70 | 35,699 | 0 | python,django,templates,ternary-operator | You don't. The Django {% if %} templatetag has only just started supporting ==, and, etc. {% if cond %}{% else %}{% endif %} is as compact as it gets for now. | 0 | 0 | 0 | 0 | 2010-06-24T13:05:00.000 | 6 | 0.16514 | false | 3,110,166 | 0 | 0 | 1 | 1 | I was wondering if there was a ternary operator (condition ? true-value : false-value) that could be used in a Django template. I see there is a python one (true-value if condition else false-value) but I'm unsure how to use that inside a Django template to display the html given by one of the values. Any ideas? |
PHP vs. Other Languages in Hadoop/MapReduce implementations, and in the Cloud generally | 3,113,643 | 10 | 3 | 906 | 0 | java,php,python,hadoop,mapreduce | PHP is designed primarily as a language for displaying output to a browser. Most jobs being run on MapReduce/Hadoop clusters have nothing to do with displaying output.
They instead tend to lean much more heavily towards data processing. PHP is not the most commonly supported language for data processing, by far. Thus, ... | 0 | 1 | 0 | 1 | 2010-06-24T20:18:00.000 | 3 | 1.2 | true | 3,113,573 | 0 | 0 | 1 | 2 | I'm beginning to learn some Hadoop/MapReduce, coming mostly from a PHP background, with a little bit of Java and Python.
But, it seems like most implementations of MapReduce out there are in Java, Ruby, C++ or Python.
I've looked, and it looks like there are some Hadoop/MapReduce in PHP, but the overwhelming body of ... |
PHP vs. Other Languages in Hadoop/MapReduce implementations, and in the Cloud generally | 3,113,644 | 1 | 3 | 906 | 0 | java,php,python,hadoop,mapreduce | The reason is PHP lack of support for multi-threading and process communication. | 0 | 1 | 0 | 1 | 2010-06-24T20:18:00.000 | 3 | 0.066568 | false | 3,113,573 | 0 | 0 | 1 | 2 | I'm beginning to learn some Hadoop/MapReduce, coming mostly from a PHP background, with a little bit of Java and Python.
But, it seems like most implementations of MapReduce out there are in Java, Ruby, C++ or Python.
I've looked, and it looks like there are some Hadoop/MapReduce in PHP, but the overwhelming body of ... |
Update datastore in Google App Engine from the iPhone | 3,113,823 | 5 | 2 | 411 | 0 | java,iphone,python,google-app-engine,google-cloud-datastore | Why not have the iPhone application communicate this information to app engine by making a simple HTTP request?
Specifically, I would do an HTTP POST to the server and include the relevant fields. Then your app engine request handler would simply store the information in the datastore. | 0 | 1 | 0 | 0 | 2010-06-24T20:44:00.000 | 1 | 1.2 | true | 3,113,734 | 0 | 0 | 1 | 1 | I'm working on an app that communicates with Google App Engine to update and retrieve user information, but I can't think of a way to modify elements in the datastore.
For example, every user for my app is represented by a User object in the datastore. If this user inputs things like email, phone number, etc into field... |
What's a good swiss-army framework for the next 5 years? | 3,114,814 | 0 | 0 | 385 | 0 | python,ruby-on-rails,ruby,frameworks | Rails will still be around in 5 years. So will C# (.net), silverlight etc. The Microsoft stack is too widely used to vanish. | 0 | 0 | 0 | 0 | 2010-06-25T00:12:00.000 | 3 | 0 | false | 3,114,788 | 0 | 0 | 1 | 2 | Basically, we want to use no flash, and eschew php where possible (for marketing reasons).
Right now, I'm looking at Ruby on Rails and like what I see... but I'm not really a programmer, having working primarily with Wordpress, Drupal, and Joomla for the past 10 years.
Our sites need to have a lot of custom apps built ... |
What's a good swiss-army framework for the next 5 years? | 3,114,824 | 1 | 0 | 385 | 0 | python,ruby-on-rails,ruby,frameworks | I'd say python/Django over RoR.
If you weren't avoiding PHP, Zend would be a safe(ish) bet for the next 5 years (probably).
Mind you, you're by your own admission not a programmer and you're at least partially basing an engineering/technical decision on marketing (OMFG), so I'd be more worried about you lasting 5 yea... | 0 | 0 | 0 | 0 | 2010-06-25T00:12:00.000 | 3 | 0.066568 | false | 3,114,788 | 0 | 0 | 1 | 2 | Basically, we want to use no flash, and eschew php where possible (for marketing reasons).
Right now, I'm looking at Ruby on Rails and like what I see... but I'm not really a programmer, having working primarily with Wordpress, Drupal, and Joomla for the past 10 years.
Our sites need to have a lot of custom apps built ... |
Django to do its own NTLM Authentication (HTTP Headers & all) | 3,787,434 | 1 | 0 | 1,765 | 0 | python,django,active-directory,ldap,ntlm | Partial answer:
You can (and should) pass the NTLM auth off to an external helper. Basically, install Samba on the machine, configure it, join the domain, enable winbind, then use the "ntlm_auth" helper binary, probably in "pipe" mode.
Authenticating an NTLM session requires a secure pipe to the domain controller, whic... | 0 | 0 | 0 | 0 | 2010-06-25T19:47:00.000 | 1 | 1.2 | true | 3,120,956 | 0 | 0 | 1 | 1 | I'm considering moving from Apache to Lighttpd for an internal web application, written with python. The problem is that I'm relying on libapache2-mod-auth-ntlm-winbind ... which doesn't actually seem to be a well support & updated package (though that could be because it really does work well).
I'm looking for sugges... |
Django: vibrant community and future? | 3,123,190 | 0 | 0 | 1,687 | 0 | python,ruby-on-rails,ruby,django | From what I have seen neither one looks like it will become a niche any time soon, both have active communities and dedicated developers. Ruby and python are both great languages, and both are being actively developed as well. At some point Django will have to migrate from python 2.x to 3.y, which may be a little bit... | 0 | 0 | 0 | 0 | 2010-06-26T06:10:00.000 | 3 | 0 | false | 3,122,923 | 0 | 0 | 1 | 2 | I'm in that horrible questioning state. I'm trying to decide between Django and Rails.
From what I've read, Django probably fits my needs better, both from a "cultural" and goal point of view. The baked-in admin interface pretty much sells me alone. However, I have one critical concern: it looks like the Rails commun... |
Django: vibrant community and future? | 3,122,993 | 0 | 0 | 1,687 | 0 | python,ruby-on-rails,ruby,django | What about Pylons? | 0 | 0 | 0 | 0 | 2010-06-26T06:10:00.000 | 3 | 0 | false | 3,122,923 | 0 | 0 | 1 | 2 | I'm in that horrible questioning state. I'm trying to decide between Django and Rails.
From what I've read, Django probably fits my needs better, both from a "cultural" and goal point of view. The baked-in admin interface pretty much sells me alone. However, I have one critical concern: it looks like the Rails commun... |
Django for a simple web application | 3,123,705 | 0 | 3 | 2,020 | 0 | python,django | You definitely don't have to use a database with Django. Whether it fits your needs, only you can tell. There are other Python web frameworks that you can use. | 0 | 0 | 0 | 0 | 2010-06-26T11:25:00.000 | 5 | 0 | false | 3,123,683 | 0 | 0 | 1 | 1 | I'm developing an app (an API) in python and I would like to offer some of its functionality through a web interface (like web services do).
I've been looking at django, but I don't know if really fits well in my idea. I only want to create a web page that invokes to my API methods in order to acomplish the functiona... |
Remote execution of commands using the Django ORM | 3,125,012 | 1 | 0 | 121 | 1 | python,django,orm | If you can connect to the database remotely, then you can simply specify its host/port in settings.py exactly as you would a local one. | 0 | 0 | 0 | 0 | 2010-06-26T12:05:00.000 | 1 | 0.197375 | false | 3,123,801 | 0 | 0 | 1 | 1 | Can I somehow work with remote databases (if they can do it) with the Django ORM?
It is understood that the sitting has spelled out the local database. And periodically to make connection to various external databases and perform any sort of commands such as load dump. |
Terminating android ASE shell from within the script | 3,125,831 | 1 | 2 | 329 | 0 | python,android,ase | You should use android.exit(). | 0 | 1 | 0 | 0 | 2010-06-26T19:56:00.000 | 2 | 0.099668 | false | 3,125,325 | 0 | 0 | 1 | 2 | I'm using android scripting environment with python (ASE), and I'd like to terminate the shell executing the script when the script terminates.
Is there a good way to do this?
I have tried executing on the last line:
os.system( 'kill %d' % os.getppid() )
but to no avail. |
Terminating android ASE shell from within the script | 3,304,337 | 0 | 2 | 329 | 0 | python,android,ase | My guess is that the above answer ought to be android.Android().exit() | 0 | 1 | 0 | 0 | 2010-06-26T19:56:00.000 | 2 | 0 | false | 3,125,325 | 0 | 0 | 1 | 2 | I'm using android scripting environment with python (ASE), and I'd like to terminate the shell executing the script when the script terminates.
Is there a good way to do this?
I have tried executing on the last line:
os.system( 'kill %d' % os.getppid() )
but to no avail. |
What should I use for the backend of a 'social' website? | 3,126,208 | 2 | 4 | 749 | 1 | python,sql,mysql,database | MySQL is really your best choice for the database unless you want to go proprietary.
As for the actual language, pick whatever you are familiar with. While Youtube and Reddit are written in python, many of the other large sites use Ruby (Hulu, Twitter, Techcrunch) or C++ (Google) or PHP (Facebook, Yahoo, etc). | 0 | 0 | 0 | 0 | 2010-06-27T02:19:00.000 | 4 | 0.099668 | false | 3,126,155 | 0 | 0 | 1 | 1 | My two main requirements for the site are related to degrees of separation and graph matching (given two graphs, return some kind of similarity score).
My first thought was to use MySql to do it, which would probably work out okay for storing how I want to manage 'friends' (similar to Twitter), but I'm thinking if I wa... |
URLs and side effects (Django) | 3,127,296 | 2 | 4 | 334 | 0 | python,django,url,post,django-views | A modified option #1 is the best approach. Consider this: suppose we weren't talking about a web app, but instead were just designing an inbox class. Which do you like better, a number of methods (delete_message(), mark_as_spam(), etc), or one big method (do_stuff(action))? Of course you would use the separate metho... | 0 | 0 | 0 | 0 | 2010-06-27T09:36:00.000 | 4 | 1.2 | true | 3,126,969 | 0 | 0 | 1 | 4 | I'm wondering if it's considered okay (particularly, in Django) to have a URL that's only intended for actions with side effects, that's only intended to be accessed by POST, and that is basically invisible to the user. Let's say, for the sake of making this concrete, I have a little messaging system on my site, and fr... |
URLs and side effects (Django) | 3,127,290 | 1 | 4 | 334 | 0 | python,django,url,post,django-views | If you're writing a web 2.0 messaging app, you would be using AJAX calls and wouldn't be loading a new page at all. The process would proceed like so:
User clicks [delete] for a message. This button has a javascript action bound to it. This action does the following:
i. Change the UI to indicate that something is happ... | 0 | 0 | 0 | 0 | 2010-06-27T09:36:00.000 | 4 | 0.049958 | false | 3,126,969 | 0 | 0 | 1 | 4 | I'm wondering if it's considered okay (particularly, in Django) to have a URL that's only intended for actions with side effects, that's only intended to be accessed by POST, and that is basically invisible to the user. Let's say, for the sake of making this concrete, I have a little messaging system on my site, and fr... |
URLs and side effects (Django) | 3,127,284 | 0 | 4 | 334 | 0 | python,django,url,post,django-views | I agree that #2 is a better approach.
But take care with overloading the submit <input /> with different methods -- if a user is using it with keyboard input and hits enter, it won't necessarily submit the <input /> you're expecting. Either disable auto-submit-on-enter, or code things up so that if there is more than ... | 0 | 0 | 0 | 0 | 2010-06-27T09:36:00.000 | 4 | 0 | false | 3,126,969 | 0 | 0 | 1 | 4 | I'm wondering if it's considered okay (particularly, in Django) to have a URL that's only intended for actions with side effects, that's only intended to be accessed by POST, and that is basically invisible to the user. Let's say, for the sake of making this concrete, I have a little messaging system on my site, and fr... |
URLs and side effects (Django) | 3,127,022 | 1 | 4 | 334 | 0 | python,django,url,post,django-views | I don't think there's anything wrong with either option, but #2 is potentially better from a performance standpoint. After the action is posted you can render the inbox without a redirect, so it cuts down on the HTTP traffic. | 0 | 0 | 0 | 0 | 2010-06-27T09:36:00.000 | 4 | 0.049958 | false | 3,126,969 | 0 | 0 | 1 | 4 | I'm wondering if it's considered okay (particularly, in Django) to have a URL that's only intended for actions with side effects, that's only intended to be accessed by POST, and that is basically invisible to the user. Let's say, for the sake of making this concrete, I have a little messaging system on my site, and fr... |
Is it possible to run two versions of Python side-by-side? | 3,130,801 | 0 | 4 | 758 | 0 | python,google-app-engine | OK, I figured out the answer to my own question, partly with the help of Nicholas Knight who pointed out that you just install different Python version to different Python directories. I was left scratching my head on how to get Google App Engine to use Python 2.5 (the required version) instead of Python 2.6. This is... | 0 | 1 | 0 | 0 | 2010-06-27T16:07:00.000 | 3 | 0 | false | 3,127,915 | 1 | 0 | 1 | 2 | I've been learning Python for a couple of weeks, and although I've been successfully develop apps for Google App Engine with Python 2.6.5, it specifically requires Python 2.5.
Being mindful of compatibility issues when uploading apps (it's a situation I'd rather avoid while learning Python), I wonder if it's possible t... |
Is it possible to run two versions of Python side-by-side? | 3,127,950 | 5 | 4 | 758 | 0 | python,google-app-engine | Absolutely.
If you're on *nix, you'd usually just use make altinstall instead of make install, that way the "python" binary won't get installed/overwritten, but instead you'd have e.g. python2.5 or python2.6 installed. Using a separate --prefix with the configure script is also an option, of course.
Some Linux distribu... | 0 | 1 | 0 | 0 | 2010-06-27T16:07:00.000 | 3 | 0.321513 | false | 3,127,915 | 1 | 0 | 1 | 2 | I've been learning Python for a couple of weeks, and although I've been successfully develop apps for Google App Engine with Python 2.6.5, it specifically requires Python 2.5.
Being mindful of compatibility issues when uploading apps (it's a situation I'd rather avoid while learning Python), I wonder if it's possible t... |
When matching html or xml tags, should one worry about casing? | 3,127,997 | 5 | 1 | 98 | 0 | python,html,xml | XML (and XHTML) tags are case-sensitive ... so <this> and <tHis> would be different elements.
However a lot (rough estimate) of HTML (not XHTML) tags are random-case. | 0 | 0 | 1 | 0 | 2010-06-27T16:30:00.000 | 3 | 0.321513 | false | 3,127,984 | 0 | 0 | 1 | 3 | If you are parsing html or xml (with python), and looking for certain tags, it can hurt performance to lower or uppercase an entire document so that your comparisons are accurate. What percentage (estimated) of xml and html docs use any upper case characters in their tags? |
When matching html or xml tags, should one worry about casing? | 3,128,006 | 2 | 1 | 98 | 0 | python,html,xml | Only if you're using XHTML as this is case sensitive, whereas HTML is not so you can ignore case differences. Test for the doctype before worrying about checking for case. | 0 | 0 | 1 | 0 | 2010-06-27T16:30:00.000 | 3 | 0.132549 | false | 3,127,984 | 0 | 0 | 1 | 3 | If you are parsing html or xml (with python), and looking for certain tags, it can hurt performance to lower or uppercase an entire document so that your comparisons are accurate. What percentage (estimated) of xml and html docs use any upper case characters in their tags? |
When matching html or xml tags, should one worry about casing? | 3,128,078 | 1 | 1 | 98 | 0 | python,html,xml | I think you're overly concerned about performance. If you're talking about arbitrary web pages, 90% of them will be HTML, not XHTML, so you should do case-insensitive comparisons. Lowercasing a string is extremely fast, and should be less than 1% of the total time of your parser. If you're not sure, carefully time your... | 0 | 0 | 1 | 0 | 2010-06-27T16:30:00.000 | 3 | 1.2 | true | 3,127,984 | 0 | 0 | 1 | 3 | If you are parsing html or xml (with python), and looking for certain tags, it can hurt performance to lower or uppercase an entire document so that your comparisons are accurate. What percentage (estimated) of xml and html docs use any upper case characters in their tags? |
Model-View-Presenter and Three-Tier? | 3,136,965 | 0 | 2 | 1,009 | 0 | python,model,mvp,three-tier | I think the main differences is that in MVP/MVC, the view gets to reach into the model to get data, while in n-tier, there's a stricter separation, where each tier is only allowed to interface with the tier directly above/below it. | 0 | 0 | 0 | 0 | 2010-06-28T01:36:00.000 | 3 | 0 | false | 3,129,633 | 0 | 0 | 1 | 3 | What is the difference between the two architectures: Model-View-Presenter and Three-Tier?
I understand the definitions of each when read individually, but I can't readily see how they're different. Is it desktop vs web? I am currently developing a simple desktop application in Python to visualize a complicated data ... |
Model-View-Presenter and Three-Tier? | 3,137,005 | 4 | 2 | 1,009 | 0 | python,model,mvp,three-tier | MVC is an UI pattern, three tier is an application architecture pattern. That is you can design your application with 3 tiers - UI, BL, data. And than use MVC in the UI tier. | 0 | 0 | 0 | 0 | 2010-06-28T01:36:00.000 | 3 | 1.2 | true | 3,129,633 | 0 | 0 | 1 | 3 | What is the difference between the two architectures: Model-View-Presenter and Three-Tier?
I understand the definitions of each when read individually, but I can't readily see how they're different. Is it desktop vs web? I am currently developing a simple desktop application in Python to visualize a complicated data ... |
Model-View-Presenter and Three-Tier? | 8,291,398 | 1 | 2 | 1,009 | 0 | python,model,mvp,three-tier | MVC is a UI implementation pattern that attempts to simplify three tier architecture. MVC is just one of the ways you can implement three-tier. | 0 | 0 | 0 | 0 | 2010-06-28T01:36:00.000 | 3 | 0.066568 | false | 3,129,633 | 0 | 0 | 1 | 3 | What is the difference between the two architectures: Model-View-Presenter and Three-Tier?
I understand the definitions of each when read individually, but I can't readily see how they're different. Is it desktop vs web? I am currently developing a simple desktop application in Python to visualize a complicated data ... |
How do I tell django to not escape % and _ in a query | 3,135,033 | 1 | 1 | 1,005 | 0 | python,django | headline__contains='%' would mean headline is anything, no? In which case why include it in the query? | 0 | 0 | 0 | 0 | 2010-06-28T17:54:00.000 | 2 | 0.099668 | false | 3,134,850 | 0 | 0 | 1 | 1 | I want to be able to use wildcards in my django queries used for searching. However as the documentation says:
Entry.objects.filter(headline__contains='%')
Will result in SQL that looks something like this:
SELECT ... WHERE headline LIKE '%\%%';
How do I tell django to not escape % and _ in a query. Or is there ano... |
Is Python (Django) experience professionaly comparable to Ruby on Rails? | 3,136,189 | 0 | 3 | 458 | 0 | python,ruby-on-rails,django | I interviewed for a Rails job once. I had almost no experience in Rails, although I had a fair amount of experience with Python and Django. I told the interviewer this up front, and I still got through several rounds of interviews, since the technical guys figured I could pick up the Rails stuff easily enough. (Ultimat... | 0 | 0 | 0 | 0 | 2010-06-28T21:07:00.000 | 3 | 0 | false | 3,136,131 | 0 | 0 | 1 | 2 | I ask this because there seems to be a few more jobs available (at least by telecommute) in RoR. If an employer sees significant Python/Django experience on a resume, would it be plausible to believe that the developer would be able quickly learn Rails? |
Is Python (Django) experience professionaly comparable to Ruby on Rails? | 3,136,175 | 0 | 3 | 458 | 0 | python,ruby-on-rails,django | I can't speak for all organizations, but as a hiring manager where I work, yes. I am really interested in experience with MVC in general. The specific technology / framework doesn't concern me as much as the fact that you understand what a model/view/controller framework is good for, and when to use it.
That said, ... | 0 | 0 | 0 | 0 | 2010-06-28T21:07:00.000 | 3 | 0 | false | 3,136,131 | 0 | 0 | 1 | 2 | I ask this because there seems to be a few more jobs available (at least by telecommute) in RoR. If an employer sees significant Python/Django experience on a resume, would it be plausible to believe that the developer would be able quickly learn Rails? |
Trying to install Django via Macports on Leopard | 3,139,071 | 0 | 2 | 936 | 0 | python,django | Just "throw" the django tarball within the site-packages (dist-packages in py2.6+) and you are done. What for do you need macports etc, with a pure python library? | 0 | 0 | 0 | 0 | 2010-06-28T21:52:00.000 | 3 | 0 | false | 3,136,423 | 1 | 0 | 1 | 1 | I have Python 2.6 & 3.1 installed on Leopard via mac ports with no problems. I want to install Django 1.2 via mac ports for Python 2.6, but a google search of how to do it seems to point me in the wrong direction. Can anyone point me in the right direction? Thanks again..... |
Highlight selected Tab - Python webpage | 3,137,299 | 1 | 0 | 149 | 0 | python | I think the best way would be through CSS. You can handle it by adding the pseudoclass :active to the CSS.
Other way is serving the page with a new class added to the tab, which will change the background color, but I would not recommend that. | 0 | 0 | 1 | 0 | 2010-06-29T00:56:00.000 | 1 | 0.197375 | false | 3,137,167 | 0 | 0 | 1 | 1 | I am trying to develop my first python web project. It have multiple tabs (like apple.com have Store, iPhone, iPad etc tabs) and when user click on any tab, the page is served from server.
I want to make sure that the selected tab will have different background color when page is loaded.
Which is a best way to do it? J... |
Installing django with python 2.5 and not with the default version of python | 3,139,638 | 1 | 2 | 400 | 0 | python,django | Django is 100% compatible with Python 2.4. However if you really want to use 2.5 you would probably be best off using a virtualenv and installing Django and your project inside that.
Don't forget if you do try and install 2.5, you will also need to recompile mod_wsgi to use it, as the system packaged version will only ... | 0 | 0 | 0 | 0 | 2010-06-29T09:23:00.000 | 2 | 0.099668 | false | 3,139,372 | 1 | 0 | 1 | 1 | I have to install Django on my linux server where python 2.4 is available as the default installation. I have installed python 2.5 as a separate version. Now I have to install Django which I have to use with python 2.5. Is there any specific requirement, so that it is installed with the python 2.5 and not with the defa... |
python import depth | 3,143,143 | 1 | 2 | 1,549 | 0 | python,import,depth | Not really. A module imports stuff from other modules because it needs to use them in that module, otherwise it'll break. | 0 | 0 | 0 | 0 | 2010-06-29T17:17:00.000 | 3 | 0.066568 | false | 3,143,106 | 1 | 0 | 1 | 3 | I've noticed that importing a module will import its functions and methods, and the functions and methods of those as well. Is there a set rule for how many levels down python will import when you import an upper-level module?
edit
sorry, I think I've been misunderstood by the answers so far responding about multiple ... |
python import depth | 3,143,155 | 3 | 2 | 1,549 | 0 | python,import,depth | No, python will import what it needs to import. However, each module is only imported once. For example, if one module does import sys and another module does import sys, it will not physically do it twice. | 0 | 0 | 0 | 0 | 2010-06-29T17:17:00.000 | 3 | 0.197375 | false | 3,143,106 | 1 | 0 | 1 | 3 | I've noticed that importing a module will import its functions and methods, and the functions and methods of those as well. Is there a set rule for how many levels down python will import when you import an upper-level module?
edit
sorry, I think I've been misunderstood by the answers so far responding about multiple ... |
python import depth | 3,143,238 | 1 | 2 | 1,549 | 0 | python,import,depth | There is no pre-defined import depth level. Import statements are executed, just like any other python statement.
But, you may wonder, how are cycles avoided? Modules are added to sys.modules (i.e., cached) when they get imported for the first time, and that is the first location examined when an import statement is e... | 0 | 0 | 0 | 0 | 2010-06-29T17:17:00.000 | 3 | 0.066568 | false | 3,143,106 | 1 | 0 | 1 | 3 | I've noticed that importing a module will import its functions and methods, and the functions and methods of those as well. Is there a set rule for how many levels down python will import when you import an upper-level module?
edit
sorry, I think I've been misunderstood by the answers so far responding about multiple ... |
Architecting from scratch in Python: what to use? | 3,143,591 | 4 | 20 | 4,392 | 0 | python,orm,rest,frameworks | I'm new to python myself, and plan to get more in depth with it this year. I've had a few false starts at this, but always professional needs bring me back to PHP. The few times I've done some development, I've had really good experiences with web2py as a python framework. It's quite well done, and complete in features... | 0 | 0 | 0 | 1 | 2010-06-29T17:18:00.000 | 4 | 0.197375 | false | 3,143,115 | 0 | 0 | 1 | 1 | I'm lucky enough to have full control over the architecture of my company's app, and I've decided to scrap our prototype written in Ruby/Rails and start afresh in Python. This is for a few reasons: I want to learn Python, I prefer the syntax and I've basically said "F**k it, let's do it."
So, baring in mind this is goi... |
How can I use google app engine? | 3,143,745 | 0 | 0 | 171 | 0 | python,google-app-engine,web-applications,webstore | It is hard to say if App Engine is suited to your particular needs without more details about what functionality you want your web store to present. It also depends a little bit on your background and experience.
However, the "app like feel" and crafting a "completely unique feel" for your site is something you can ac... | 0 | 1 | 0 | 0 | 2010-06-29T18:38:00.000 | 2 | 0 | false | 3,143,703 | 0 | 0 | 1 | 2 | I've begun planning a kind of web store interface that I want to work on soon. I'm starting to import products from China and want to have a completely unique feel for my site. Now I'm kinda a google fanboy and have heard alot about google app engine. Mostly I like the hosting available with google more then anything t... |
How can I use google app engine? | 3,143,763 | 0 | 0 | 171 | 0 | python,google-app-engine,web-applications,webstore | You can build almost anything on GAE. As Monk would say that is a blessing and a curse. GAE is relatively new and so e commerce ventures are relatively rare. This means you would be responsible for every piece of the site. Other dedicated e commerce technologies trade some of the control and look and feel for ease of u... | 0 | 1 | 0 | 0 | 2010-06-29T18:38:00.000 | 2 | 1.2 | true | 3,143,703 | 0 | 0 | 1 | 2 | I've begun planning a kind of web store interface that I want to work on soon. I'm starting to import products from China and want to have a completely unique feel for my site. Now I'm kinda a google fanboy and have heard alot about google app engine. Mostly I like the hosting available with google more then anything t... |
how to detect bounce mail in google app engine? | 3,194,130 | 0 | 3 | 1,227 | 0 | python,google-app-engine,email | easiest is to encode an email address via base64 or simiar encoding and prefixed it to from address.
all address from something@myapp.appspotmail.com are valid email address for from in gae.
simply create a mail receive handler. decode the from string and get the email address to whom you send the email originally.
sa... | 0 | 1 | 0 | 1 | 2010-06-30T07:38:00.000 | 4 | 1.2 | true | 3,147,267 | 0 | 0 | 1 | 1 | sometime due to wrong input from user side, mail bounce and did not reach the recipient. ( sent from google app engine.)
How to detect such email ?
edit:
may be i was not clear in my question :
I want to know to which mail i have sent the mail which was return ( so that i may alert the user or delete the email id ). ... |
Global Exception Handling in Google App Engine | 3,154,925 | 0 | 2 | 1,028 | 0 | python,google-app-engine,exception-handling,global | You application probably has a main() function, put the try/except in that function, and it'll catch everything from your application. | 0 | 1 | 0 | 0 | 2010-07-01T03:26:00.000 | 3 | 0 | false | 3,154,900 | 0 | 0 | 1 | 2 | Instead of encapsulating my entire code in a try{} except{} block, is there someway of catching exceptions globally?
Basically I am looking for a way to have a global exception handler which will handle all unhandled exceptions in the my python application written for google app engine |
Global Exception Handling in Google App Engine | 3,154,924 | 0 | 2 | 1,028 | 0 | python,google-app-engine,exception-handling,global | Well, at the most basic level you could wrap all of your handler scripts referenced by app.yaml in a giant try-except block.
If you are using the webapp framework, consider overriding handle_exception() for each of your request handlers. If you want all of your request handlers to have some basic exception handling th... | 0 | 1 | 0 | 0 | 2010-07-01T03:26:00.000 | 3 | 0 | false | 3,154,900 | 0 | 0 | 1 | 2 | Instead of encapsulating my entire code in a try{} except{} block, is there someway of catching exceptions globally?
Basically I am looking for a way to have a global exception handler which will handle all unhandled exceptions in the my python application written for google app engine |
Is Django admin difficult to customize? | 33,733,949 | 1 | 25 | 21,336 | 0 | python,django,django-admin,customization | Django Admin is easy to customize if your requirements match what is customizable in Django. If you need fancy features that are not out-of-the-box functionality you either need to find a plugin that does it, or implement it yourself by subclassing the appropriate classes. Which can be difficult, and requires good unde... | 0 | 0 | 0 | 0 | 2010-07-01T06:52:00.000 | 4 | 0.049958 | false | 3,155,624 | 0 | 0 | 1 | 2 | I have been playing for a couple of days with Django Admin to explore it, but I am still clueless of how it can be customized in the way we need.
Every time I look for any help for the customization in the admin panel, what I find is, a bunch of articles on various communities and forums, explaining how to customize t... |
Is Django admin difficult to customize? | 11,705,960 | 3 | 25 | 21,336 | 0 | python,django,django-admin,customization | Personally, if you want a site to look like the admin, why not pull the templates and styles and use them, build your own views for what you need. Gobs of documentation and forum help is there for that. I like the idea of customizing the admin, but honestly, I have been doing it for awhile on a project and time and t... | 0 | 0 | 0 | 0 | 2010-07-01T06:52:00.000 | 4 | 0.148885 | false | 3,155,624 | 0 | 0 | 1 | 2 | I have been playing for a couple of days with Django Admin to explore it, but I am still clueless of how it can be customized in the way we need.
Every time I look for any help for the customization in the admin panel, what I find is, a bunch of articles on various communities and forums, explaining how to customize t... |
Logging activity on Django's admin - Django | 3,157,915 | 17 | 32 | 30,210 | 0 | python,django,logging,django-admin | Log is in django_admin_log table in database used by django. | 0 | 0 | 0 | 0 | 2010-07-01T12:45:00.000 | 3 | 1 | false | 3,157,875 | 0 | 0 | 1 | 1 | I need to track/log activity on the Django admin.
I know there are messages stored by admin somewhere, but I don't know how to access them in order to use them as a simple log.
I'm trying to track the following:
User performing the action
Action committed
Datetime of action
Thanks guys. |
Django Admin Intermittently Returning 404 On Model Edit | 7,615,435 | 4 | 4 | 1,528 | 0 | python,django,django-admin,http-status-code-404 | I had this same problem. The solution for me was to move my calls to admin.site.register() to admin.py. With DEBUG set to false, your models are lazily loaded, so the registration calls don't always get made. Apparently admin.py is always loaded at init time, however. | 0 | 0 | 0 | 0 | 2010-07-01T14:12:00.000 | 3 | 1.2 | true | 3,158,589 | 0 | 0 | 1 | 1 | We're using the Django Admin to maintain some data that's exported to a few of our sites. Sometimes when clicking through the standard changelist view to get a model edit form instead of being routed to the correct page we're getting the Django 404 page/template.
It was happening somewhat sporatically, and we could for... |
Google application engine, maximum number of static files? | 3,166,662 | 5 | 3 | 1,582 | 0 | python,django,google-app-engine | Welcome to Stack Overflow!
One of the limitations in App Engine is that you cannot write directly to the filesystem from your app. Static files would be things like HTML, CSS, javascript and images that are global to your application, and get uploaded manually when you deploy. They are uploaded to and served from diffe... | 0 | 1 | 0 | 0 | 2010-07-02T12:46:00.000 | 3 | 1.2 | true | 3,165,753 | 0 | 0 | 1 | 1 | I am developing an application in google application engine which would have a user profiles kind of feature. I was going through the Google App's online tutorial where I found that the maximum number of static files (app files and static files) should not exceed 3000. I am afraid whether the user's would be able to up... |
Complex HTML parsing with Python | 3,167,761 | 2 | 4 | 921 | 0 | python,html-parsing | BeautifulSoup is a nice library and provides a good way to parse HTML with some handy ways to parse the data very easily.
What you are trying to do, can easily be done using some simple regular expressions. You can write regular expressions to search for a particular pattern of data and extract the data you need. | 0 | 0 | 1 | 0 | 2010-07-02T17:00:00.000 | 3 | 0.132549 | false | 3,167,679 | 0 | 0 | 1 | 1 | I am already aware of tag based HTML parsing in Python using BeautifulSoup, htmllib etc.
However, I want a powerful engine which can do complex tasks like read html tables, lists etc. and present these as simple to use objects within code. Does python have such powerful libraries? |
What data type should my widgets accept/return? | 3,169,254 | 2 | 2 | 80 | 0 | python,design-patterns | While simply passing strings around seems like a useful idea, I think you're going to discover it doesn't work as well as you might hope.
Think about the date example—instead of passing around a date object, instead you pass around a str of the format "2010-01-01". In order to work with that data, every user of the cl... | 1 | 0 | 0 | 0 | 2010-07-02T21:04:00.000 | 2 | 1.2 | true | 3,169,096 | 1 | 0 | 1 | 2 | I'm building a form class in python for producing and validating HTML forms. Each field has an associated widget which defines how the field is rendered.
When the widget is created, it is passed in a (default) value so that it knows what to display the first time it is rendered. After the form is submitted, the widget ... |
What data type should my widgets accept/return? | 3,169,184 | 1 | 2 | 80 | 0 | python,design-patterns | This approach is quite generic and serializing to and from strings should always work fine. You could also save the state of a widget to a file or send it over a network for recreating another widget from it.
Some potential issues or aspects to consider:
Localization: how to interpret the string regarding the culture,... | 1 | 0 | 0 | 0 | 2010-07-02T21:04:00.000 | 2 | 0.099668 | false | 3,169,096 | 1 | 0 | 1 | 2 | I'm building a form class in python for producing and validating HTML forms. Each field has an associated widget which defines how the field is rendered.
When the widget is created, it is passed in a (default) value so that it knows what to display the first time it is rendered. After the form is submitted, the widget ... |
Is there any way to store cookies in django which is independent to browser? | 3,172,147 | 0 | 0 | 404 | 0 | python,django,flash,cookies | There is no way to set cookie, so that it would be available in all browsers on computer. You can do it in Flash, because it is external library (one for all browsers). | 0 | 0 | 0 | 0 | 2010-07-03T11:53:00.000 | 3 | 0 | false | 3,171,404 | 0 | 0 | 1 | 2 | Is there any way in django to store cookies which is independent to browser ?
is there any technique just like what flash SharedObject does ..? |
Is there any way to store cookies in django which is independent to browser? | 3,171,859 | 1 | 0 | 404 | 0 | python,django,flash,cookies | As it's explain in the link you give in your comment, Shared Objects are not stored as browser cookies, they are completely managed by the Flash Player. That's why they are independent of the browser.
So the answer is no, you can't store a cookie that is independent of the browser with Django (or any other web framewor... | 0 | 0 | 0 | 0 | 2010-07-03T11:53:00.000 | 3 | 0.066568 | false | 3,171,404 | 0 | 0 | 1 | 2 | Is there any way in django to store cookies which is independent to browser ?
is there any technique just like what flash SharedObject does ..? |
Setting variable values in JavaScript files | 3,171,774 | 1 | 1 | 2,283 | 0 | javascript,python,scripting | It is not possible, as Javascript usually runs on the client side, while Python runs on the server side.
If it is code that needs to run on the client side, have it send an AJAX request to a python script with the results you need. If it does not need to run on the client side, I suggest you rewrite it in Python. | 0 | 0 | 0 | 0 | 2010-07-03T14:21:00.000 | 4 | 0.049958 | false | 3,171,768 | 1 | 0 | 1 | 1 | I have a Python script and a JS on my server. In the python script, I want to set the value of a variable to be the output of one of the functions in my .js file.
Is this possible, and if so how wold one go about doing this?
Thanks! |
How to send SMS using Python/Django application? | 3,172,331 | 3 | 5 | 4,227 | 0 | python,django,sms | Typically you would use normal HTTP GET or POST requests against an SMS Gateway, such as Clickatell and many many others. | 0 | 0 | 0 | 1 | 2010-07-03T17:47:00.000 | 6 | 0.099668 | false | 3,172,291 | 0 | 0 | 1 | 1 | I have to develop an application where I need to send SMS to the users on a particular action by the users.
I have heard of kannel with PHP, is there some help for the same in Python as well or is there any other better open source sms gateway which I can use with my application?
Please suggest.
Thanks in advance. |
Python: Google App Engine source uses tab depth 2 | 3,172,928 | -6 | 3 | 468 | 0 | python,google-app-engine | It's miserably bad style. 2-space indentation is simply unreadable. Don't copy it. Never use less than 4 spaces to indent in any language.
(Don't assume that something is good simply because Google source is doing it. If you've ever spent some time looking through the Android source you'd know that there's as much ... | 0 | 1 | 0 | 0 | 2010-07-03T21:10:00.000 | 3 | -1 | false | 3,172,893 | 0 | 0 | 1 | 1 | Looking through the Google App Engine source, I noticed that the tab depth is 2 spaces instead of the conventional 4. Is there some wisdom behind this, or is it just someone's preference?
(Maybe it's trivial, or maybe Google knows something that isn't immediately obvious.)
UPDATE I wasn't suggesting that it ran differ... |
App Engine SDK: How do I view keys in a specific namespace using the Memcache Viewer? | 3,322,690 | 0 | 2 | 435 | 0 | python,google-app-engine,memcached | Not possible. In dev, check namespace'd memcache items programmatically, e.g. using a handler.
Credit: moraes on #appengine / freenode (validated by looking at source) | 0 | 1 | 0 | 0 | 2010-07-04T16:59:00.000 | 1 | 1.2 | true | 3,175,462 | 0 | 0 | 1 | 1 | I'm trying to use the Memcache Viewer in the App Engine Dev Console to view keys in a specific namespace. The obvious syntax of namespace.key is not working; I haven't been able to find documentation describing specific usage. Is this possible? |
best python lib to make the textarea safe in the web page when user submit | 3,176,415 | 0 | 2 | 124 | 0 | python,textarea,tags | You can try Web2py , it is a webframework for python with support for Wiki Markup , MarkDown , and many things + Server side Validation , XSS Prevention. If you want to use only it's Lib you can use gluon of web2py (which is lib of web2py framework)
www.web2py.com | 0 | 0 | 0 | 0 | 2010-07-04T19:21:00.000 | 2 | 0 | false | 3,175,925 | 0 | 0 | 1 | 1 | i want to clean some tag like : <script> and other,
so what python lib you are using to do this .
thanks |
How to add Google Analytics to reStructuredText? | 3,176,894 | 1 | 3 | 616 | 0 | python,restructuredtext,docutils | As a workaround to your problem, you could use a mass search/replace tool to add the Google Analytics code to the files after they have been through the translator. Just search for the </body> tag and replace it with <!--your tracking code--></body>.
I checked to see if you can include raw HTML in reStructuredText (and... | 0 | 0 | 0 | 0 | 2010-07-04T21:20:00.000 | 4 | 0.049958 | false | 3,176,258 | 0 | 0 | 1 | 1 | I am using reStructured text to create some easy websites.
So I have got a lot of *.rst files in which I want to add the Google Analytics code.
But as far as I know it is not possible to add something like this?!
I am using rst2html to convert the files to html. |
Is it possible, and/or advisable to develop Django web applications on OS X (10.6.4 and 10.5.8) using Python 2.6.5 64-bit? Why? | 3,223,404 | 1 | 0 | 73 | 0 | python,django,64-bit,x86-64,python-2.6 | It certainly is possible: I do it every day.
Some tips:
use virtualenv to sandbox your python packages between projects.
use mod_passenger (via Passenger.prefpane) to make VirtualHosts easier to deal with.
You may need to fiddle a bit harder with things if you run stuff under mod_python, as I recall having to work h... | 0 | 0 | 0 | 0 | 2010-07-05T00:30:00.000 | 2 | 0.099668 | false | 3,176,695 | 0 | 0 | 1 | 2 | I'm trying to decide on which architecture to choose for developing Django 1.0.x through Django 1.2.1. I've managed to get MySQL, MySQLdb, PIL, and Python 2.65 installed on Snow Leopard using x86 64-bit builds, but I'm curious as to whether or not there is a definitive answer to this question at the moment, and if so, ... |
Is it possible, and/or advisable to develop Django web applications on OS X (10.6.4 and 10.5.8) using Python 2.6.5 64-bit? Why? | 3,176,702 | 1 | 0 | 73 | 0 | python,django,64-bit,x86-64,python-2.6 | Of course it's possible. Advisable? You didn't mention httpd and mod_wsgi, or some other WSGI container. Get one installed and it should be fine. | 0 | 0 | 0 | 0 | 2010-07-05T00:30:00.000 | 2 | 1.2 | true | 3,176,695 | 0 | 0 | 1 | 2 | I'm trying to decide on which architecture to choose for developing Django 1.0.x through Django 1.2.1. I've managed to get MySQL, MySQLdb, PIL, and Python 2.65 installed on Snow Leopard using x86 64-bit builds, but I'm curious as to whether or not there is a definitive answer to this question at the moment, and if so, ... |
How do I print some python function output to console (for debugging purposes, while using manage.py runserver) from within a django template | 3,178,961 | 0 | 0 | 303 | 0 | python,django,django-templates | You could put pdb on the form field render surely?
If you really want to spit the field value out to some sort of log then I recommend using logging and putting the logger into the form field's unicode method (or str depending on what version of django). | 0 | 0 | 0 | 0 | 2010-07-05T07:28:00.000 | 2 | 0 | false | 3,177,759 | 1 | 0 | 1 | 2 | I am working on a custom Django form field and accompanying widget. While rendering the template, i would like to inspect the form.field as a python object.
How do I do that, because anything in a Django template outside of template tags and filters is rendered as text. |
How do I print some python function output to console (for debugging purposes, while using manage.py runserver) from within a django template | 3,177,791 | 1 | 0 | 303 | 0 | python,django,django-templates | You'll need to write and install a custom tag (or filter... though that might considered be somewhat bizarre, it may help you fit in more places) that, as a side effect, performs the logging calls you desire (or print>>sys.stderr or whatever). | 0 | 0 | 0 | 0 | 2010-07-05T07:28:00.000 | 2 | 1.2 | true | 3,177,759 | 1 | 0 | 1 | 2 | I am working on a custom Django form field and accompanying widget. While rendering the template, i would like to inspect the form.field as a python object.
How do I do that, because anything in a Django template outside of template tags and filters is rendered as text. |
Django apps equivalent to Drupal's CCK and Views modules? | 3,177,922 | 1 | 5 | 1,026 | 0 | python,django,drupal,drupal-views,django-apps | I don't think there is something similar and for a good reason. Django is a framework, while Drupal is a full scale CMS. One of the powerful things about Drupal, is how it handles content. Every piece of content is a node, and it lets developers make modules that can add to a node's functionality.
Django is a great too... | 0 | 0 | 0 | 0 | 2010-07-05T07:31:00.000 | 4 | 0.049958 | false | 3,177,772 | 0 | 0 | 1 | 3 | Are there any Django apps equivalent to Drupal's Views and CCK modules?
I find Django much more flexible and logically organized than Drupal. But I think Drupal's Views and CCK modules are killer apps. They let the webmaster very rapidly to build new data models and queries through GUI without touching the code. These ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.