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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
How to limit rate of requests to web services in Python? | 401,390 | 2 | 18 | 17,294 | 0 | python,web-services,rate-limiting | Queuing may be overly complicated. A simpler solution is to give your class a variable for the time the service was last called. Whenever the service is called (!1), set waitTime to delay - Now + lastcalltime. delay should be equal to the minimum allowable time between requests. If this number is positive, sleep fo... | 0 | 0 | 1 | 0 | 2008-12-30T19:30:00.000 | 6 | 0.066568 | false | 401,215 | 1 | 0 | 1 | 3 | I'm working on a Python library that interfaces with a web service API. Like many web services I've encountered, this one requests limiting the rate of requests. I would like to provide an optional parameter, limit, to the class instantiation that, if provided, will hold outgoing requests until the number of seconds sp... |
How to store a dictionary on a Django Model? | 402,387 | 2 | 66 | 73,533 | 0 | python,django,django-models,orm,persistence | Think it over, and find the commonalities of each data set... then define your model. It may require the use of subclasses or not. Foreign keys representing commonalities aren't to be avoided, but encouraged when they make sense.
Stuffing random data into a SQL table is not smart, unless it's truly non-relational dat... | 0 | 0 | 0 | 0 | 2008-12-31T03:18:00.000 | 14 | 0.028564 | false | 402,217 | 0 | 0 | 1 | 1 | I need to store some data in a Django model. These data are not equal to all instances of the model.
At first I thought about subclassing the model, but I’m trying to keep the application flexible. If I use subclasses, I’ll need to create a whole class each time I need a new kind of object, and that’s no good. I’ll als... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,577 | 0 | 21 | 5,716 | 0 | python,ruby,lisp | pick the most popular one for your domain so your work gets the most visibility. some might say ruby/rails for web, python for everything else. picking a language just because its like lisp is really not appropriate for a professional. | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 0 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,382 | 3 | 21 | 5,716 | 0 | python,ruby,lisp | I am a Pythonista; however, based on your requirements, especially the "cool hacks on the language level", I would suggest you work on Ruby. Ruby is more flexible in the Perl way and you can do a lot of hacks; Python is targeted towards readability, which is a very good thing, and generally language hacks are a little ... | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 0.049958 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,317 | 1 | 21 | 5,716 | 0 | python,ruby,lisp | If you need Unicode support, remember to check how well supported it is. AFAIK, Python's support for Unicode is better than Ruby's, especially since Python 3.0. On the other hand, Python 3 is still missing some popular packages and 3rd party libraries, so that might play against. | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 0.016665 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,474 | 0 | 21 | 5,716 | 0 | python,ruby,lisp | I'm a Rubyist who chose the language based on very similar criteria. Python is a good language and I enjoy working with it too, but I think Ruby is somewhat more Lispy in the degree of freedom it gives to the programmer. Python seems to impose its opinions a little bit more (which can be a good thing, but isn't accordi... | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 0 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,310 | 8 | 21 | 5,716 | 0 | python,ruby,lisp | Both Ruby and Python are fairly distant from the Lisp traditions of immutable data, programs as data, and macros. But Ruby is very nearly a clone of Smalltalk (and I hope will grow more like Smalltalk as the Perlish cruft is deprecated), and Smalltalk, like Lisp, is a language that takes one idea to extremes. Based o... | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 1 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Please advise on Ruby vs Python, for someone who likes LISP a lot | 405,228 | 12 | 21 | 5,716 | 0 | python,ruby,lisp | Speaking as a "Rubyist", I'd agree with Kiv. The two languages both grant a nice amount of leeway when it comes to programming paradigms, but are also have benefits/shortcomings. I think that the compromises you make either way are a lot about your own programming style and taste.
Personally, I think Ruby can read more... | 0 | 0 | 0 | 1 | 2009-01-01T17:12:00.000 | 12 | 1 | false | 405,165 | 0 | 0 | 1 | 6 | I am a C++ developer, slowly getting into web development. I like LISP a lot but don't like AllegroCL and web-frameworks available for LISP. I am looking for more freedom and ability to do cool hacks on language level. I don't consider tabs as a crime against nature.
Which one is closer to LISP: Python or Ruby?
I can'... |
Interested in Collective Programming for the web -- Ruby or Python or PHP? | 7,620,095 | 0 | 0 | 2,360 | 0 | php,python,ruby,artificial-intelligence,recommendation-engine | I happen to know a world-class expert in machine learning. He likes Prolog, especially for the higher level logic of the system. Hadn't even heard anyone mention that in a long time. Personally, I like Java. But if you're going to do intensive machine learning, you should be concerned about the speed of math processing... | 0 | 0 | 0 | 1 | 2009-01-04T00:49:00.000 | 5 | 0 | false | 410,183 | 0 | 0 | 1 | 4 | For something like a personal recommendation system, machine learning type of stuff on a website, what language would be best? |
Interested in Collective Programming for the web -- Ruby or Python or PHP? | 636,664 | -2 | 0 | 2,360 | 0 | php,python,ruby,artificial-intelligence,recommendation-engine | I recently did some research into this for a project at my day job. It was for a recommendation system and the options were php,perl or python.
PHP was out almost immediately, there were no good 3rd party open source libraries and the language itself is not as well suited to any kind of complex real programming.
Python... | 0 | 0 | 0 | 1 | 2009-01-04T00:49:00.000 | 5 | -0.07983 | false | 410,183 | 0 | 0 | 1 | 4 | For something like a personal recommendation system, machine learning type of stuff on a website, what language would be best? |
Interested in Collective Programming for the web -- Ruby or Python or PHP? | 636,639 | 0 | 0 | 2,360 | 0 | php,python,ruby,artificial-intelligence,recommendation-engine | All of the points that Bill Karwin have brought up are entirely valid: You should really operate in what you are most comfortable with.
If that isn't a factor, I would personally suggest Ruby. It's an incredibly powerful language that draws a lot of commonalities with Lisp and is probably just as good, if not better, f... | 0 | 0 | 0 | 1 | 2009-01-04T00:49:00.000 | 5 | 0 | false | 410,183 | 0 | 0 | 1 | 4 | For something like a personal recommendation system, machine learning type of stuff on a website, what language would be best? |
Interested in Collective Programming for the web -- Ruby or Python or PHP? | 410,193 | 16 | 0 | 2,360 | 0 | php,python,ruby,artificial-intelligence,recommendation-engine | The language you know best would be best.
I mean that half-seriously. Given the brief description of your project, there's no reason to believe any of the languages you list would be any better or worse than the others. Those three languages are adequate for approximately similar tasks, so you should pick the one you... | 0 | 0 | 0 | 1 | 2009-01-04T00:49:00.000 | 5 | 1 | false | 410,183 | 0 | 0 | 1 | 4 | For something like a personal recommendation system, machine learning type of stuff on a website, what language would be best? |
PyGreSQL vs psycopg2 | 413,259 | 5 | 13 | 15,364 | 1 | python,postgresql | For what it's worth, django uses psycopg2. | 0 | 0 | 0 | 0 | 2009-01-05T14:21:00.000 | 5 | 1.2 | true | 413,228 | 0 | 0 | 1 | 4 | What is the difference between these two apis?
Which one faster, reliable using Python DB API?
Upd:
I see two psql drivers for Django. The first one is psycopg2.
What is the second one? pygresql? |
PyGreSQL vs psycopg2 | 413,508 | 0 | 13 | 15,364 | 1 | python,postgresql | psycopg2 is partly written in C so you can expect a performance gain, but on the other hand, a bit harder to install. PyGreSQL is written in Python only, easy to deployed but slower. | 0 | 0 | 0 | 0 | 2009-01-05T14:21:00.000 | 5 | 0 | false | 413,228 | 0 | 0 | 1 | 4 | What is the difference between these two apis?
Which one faster, reliable using Python DB API?
Upd:
I see two psql drivers for Django. The first one is psycopg2.
What is the second one? pygresql? |
PyGreSQL vs psycopg2 | 592,846 | 4 | 13 | 15,364 | 1 | python,postgresql | "PyGreSQL is written in Python only, easy to deployed but slower."
PyGreSQL contains a C-coded module, too. I haven't done speed tests, but they're not likely to be much different, as the real work will happen inside the database server. | 0 | 0 | 0 | 0 | 2009-01-05T14:21:00.000 | 5 | 0.158649 | false | 413,228 | 0 | 0 | 1 | 4 | What is the difference between these two apis?
Which one faster, reliable using Python DB API?
Upd:
I see two psql drivers for Django. The first one is psycopg2.
What is the second one? pygresql? |
PyGreSQL vs psycopg2 | 413,537 | 2 | 13 | 15,364 | 1 | python,postgresql | Licensing may be an issue for you. PyGreSQL is MIT license. Psycopg2 is GPL license.
(as long as you are accessing psycopg2 in normal ways from Python, with no internal API, and no direct C calls, this shouldn't cause you any headaches, and you can release your code under whatever license you like - but I am not a lawy... | 0 | 0 | 0 | 0 | 2009-01-05T14:21:00.000 | 5 | 0.07983 | false | 413,228 | 0 | 0 | 1 | 4 | What is the difference between these two apis?
Which one faster, reliable using Python DB API?
Upd:
I see two psql drivers for Django. The first one is psycopg2.
What is the second one? pygresql? |
Django and units conversion | 413,549 | 1 | 1 | 3,399 | 0 | python,django | It depends on how you want to use it. Let's say you have length value and two possible units, cm and mm. If you want only to print the value later, you can always print it as [value] [unit].
However, if you want to do some calculations with the value, for instance, calculate the area, you need to convert the value... | 0 | 0 | 0 | 0 | 2009-01-05T15:27:00.000 | 3 | 0.066568 | false | 413,446 | 0 | 0 | 1 | 1 | I need to store some values in the database, distance, weight etc.
In my model, I have field that contains quantity of something and IntegerField with choices option, that determines what this quantity means (length, time duration etc).
Should I create a model for units and physical quantity or should I use IntegerFie... |
What does "|" sign mean in a Django template? | 417,273 | -3 | 8 | 4,913 | 0 | python,django,django-templates | It's a bitwise "or". It means escape if the property doesn't exist/is null. | 0 | 0 | 0 | 0 | 2009-01-06T16:44:00.000 | 3 | -0.197375 | false | 417,265 | 0 | 0 | 1 | 1 | I often see something like that:
something.property|escape
something is an object, property is it's string property. escape - i don't know :)
What does this mean? And what min python version it is used in?
EDIT: The question was asked wrongly, it said "What does | mean in Python", so the bitwise or answers are corre... |
How do you query the set of Users in Google App Domain within your Google App Engine project? | 426,287 | 0 | 1 | 1,636 | 0 | python,google-app-engine,google-apps,gql,gqlquery | Yeah, there's no way to get information about people who haven't logged into your application. | 0 | 1 | 0 | 0 | 2009-01-07T04:33:00.000 | 4 | 0 | false | 419,197 | 0 | 0 | 1 | 1 | If you have a Google App Engine project you can authenticate based on either a) anyone with a google account or b) a particular google app domain. Since you can connect these two entities I would assume there is some way to query the list of users that can be authenticated. The use case is outputting a roster of all me... |
Getting selected value from drop down box in a html form without submit | 7,284,763 | 0 | 1 | 13,168 | 0 | javascript,python,html,google-app-engine,drop-down-menu | The problem with using onchange is that not all users are using a mouse. If you have a combo-box and change the value with the keyboard, you'd never be able to get past the first value without the form submitting.
~Cyrix | 0 | 0 | 1 | 0 | 2009-01-07T11:05:00.000 | 4 | 0 | false | 419,908 | 0 | 0 | 1 | 1 | How to get the text of selected item from a drop down box element in html forms? (using python)
How can I store the value to a variable, when I select one item from the drop down box using mouse? (ie. without using a submit button)
This is for a application which I am doing in app engine which only supports Python. |
Which software for intranet CMS - Django or Joomla? | 1,062,921 | 0 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | Thanks for that.
The system has been chosen behind my back by higher management.
It's SilverStripe.
Slow Admin interface
No experienced programmer in the company knowing this product
Implemented by a graphic designer who's leaving in about two weeks, but "he can do consulting as he's going to be a freelancer"
I'm no... | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 0 | false | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
Which software for intranet CMS - Django or Joomla? | 428,028 | 0 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | Thank you for all the answers.
Plone option cancelled on today's meeting.
Using Joomla will involve quite a lot of coding to make it act as the rest of the intranet. I think that writing a CMS in Django (with "stealing" some code from existing cms solutions) will win. Newforms are very interesting and it shouldn't be t... | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 0 | false | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
Which software for intranet CMS - Django or Joomla? | 424,091 | 0 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | Django CMS way of work requires using a built-in ORM model and an admin interface. | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 0 | false | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
Which software for intranet CMS - Django or Joomla? | 424,377 | 2 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | Joomla! has authentication plugins; you can write your own without hacking the core. When someone attempts to log into your site, it will go through all published authentication plugins (in the order you set) until one returns true. If you only want to use one method, unpublish all of the other plugins except for your ... | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 0.044415 | false | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
Which software for intranet CMS - Django or Joomla? | 2,631,681 | 1 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | If you use FLEXIcontent and FLEXiaccess you can get granular level permissions on Joomla | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 0.022219 | false | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
Which software for intranet CMS - Django or Joomla? | 423,947 | 8 | 3 | 14,680 | 0 | python,django,content-management-system,joomla | Django isn't a CMS. If you want to build an application then you'd use Django (by the sound of your post you understand that though). If you just want to be able to edit/store content and have permissions for your users - a CMS would be the way to go. I really don't know anything about Joomla though. It should be easy ... | 0 | 0 | 0 | 0 | 2009-01-08T11:12:00.000 | 9 | 1.2 | true | 423,916 | 0 | 0 | 1 | 6 | In my company we are thinking of moving from wiki style
intranet to a more bespoke CMS solution. Natural choice
would be Joomla, but we have a specific architecture. There
is a few hundred people who will use the system. System
should be self explainable (easier than wiki).
We use a lot of tools web, applications and i... |
PyObjc vs RubyCocoa for Mac development: Which is more mature? | 426,733 | 3 | 8 | 2,518 | 0 | python,ruby,cocoa,pyobjc,ruby-cocoa | Both are roughly equal, I'd say. Better in some places, worse in others. But I wouldn't recommend learning Cocoa with either. Like Chris said, Cocoa requires some understanding of Objective-C. I like Ruby better than Objective-C, but I still don't recommend using it to learn Cocoa. Once you have a solid foundation (no ... | 0 | 0 | 0 | 1 | 2009-01-09T00:16:00.000 | 5 | 0.119427 | false | 426,607 | 0 | 0 | 1 | 3 | I've been wanting to have a play with either Ruby or Python while at the same time I've been wanting to do a bit of Cocoa programming.
So I thought the best way to achieve both these goals is to develop something using either a Ruby or Python to Objective-C bridge (PyObjc or RubyCocoa).
I know that ideally to get the ... |
PyObjc vs RubyCocoa for Mac development: Which is more mature? | 426,703 | 12 | 8 | 2,518 | 0 | python,ruby,cocoa,pyobjc,ruby-cocoa | While you say you "don't have time" to learn technologies independently the fastest route to learning Cocoa will still be to learn it in its native language: Objective-C. Once you understand Objective-C and have gotten over the initial learning curve of the Cocoa frameworks you'll have a much easier time picking up ei... | 0 | 0 | 0 | 1 | 2009-01-09T00:16:00.000 | 5 | 1 | false | 426,607 | 0 | 0 | 1 | 3 | I've been wanting to have a play with either Ruby or Python while at the same time I've been wanting to do a bit of Cocoa programming.
So I thought the best way to achieve both these goals is to develop something using either a Ruby or Python to Objective-C bridge (PyObjc or RubyCocoa).
I know that ideally to get the ... |
PyObjc vs RubyCocoa for Mac development: Which is more mature? | 3,930,584 | 1 | 8 | 2,518 | 0 | python,ruby,cocoa,pyobjc,ruby-cocoa | ObjectiveC is nowhere near as much fun or as productive as either Python or Ruby. That is why people want to pick a python or ruby with good Objective C access. Advising them to learn Objective C first misses the point imo. I have really good things to say about pyobjc. Its ability to interoperate painlessly with ... | 0 | 0 | 0 | 1 | 2009-01-09T00:16:00.000 | 5 | 0.039979 | false | 426,607 | 0 | 0 | 1 | 3 | I've been wanting to have a play with either Ruby or Python while at the same time I've been wanting to do a bit of Cocoa programming.
So I thought the best way to achieve both these goals is to develop something using either a Ruby or Python to Objective-C bridge (PyObjc or RubyCocoa).
I know that ideally to get the ... |
Measure load time for python cgi script? | 428,832 | 1 | 2 | 653 | 0 | python,html,css,browser,cgi | with that much html to render I would also consider the speed of the computer. you can test this by saving the html file and opening it from your local hard drive :) | 0 | 0 | 0 | 1 | 2009-01-09T16:19:00.000 | 2 | 0.099668 | false | 428,704 | 0 | 0 | 1 | 2 | I use python cgi for our intranet application.
When I measure time, the script takes 4s to finish. But after that, it still takes another 11s to show the screen in the browser.
The screen is build with tables (size: 10 KB, 91 KB uncompressed) and has a large css file (5 KB, 58 KB uncompressed).
I used YSlow and did as... |
Measure load time for python cgi script? | 428,767 | 1 | 2 | 653 | 0 | python,html,css,browser,cgi | I think I'd grab a copy of Ethereal and watch the TCP connection between the browser and the script, if I were concerned about whether the server is not getting its job done in an acceptable amount of time. If you see the TCP socket close before that 11s gap, you know that your issue is entirely on the browser side. ... | 0 | 0 | 0 | 1 | 2009-01-09T16:19:00.000 | 2 | 0.099668 | false | 428,704 | 0 | 0 | 1 | 2 | I use python cgi for our intranet application.
When I measure time, the script takes 4s to finish. But after that, it still takes another 11s to show the screen in the browser.
The screen is build with tables (size: 10 KB, 91 KB uncompressed) and has a large css file (5 KB, 58 KB uncompressed).
I used YSlow and did as... |
Syncing Django users with Google Apps without monkeypatching | 605,174 | 1 | 1 | 428 | 0 | python,django,google-apps,monkeypatching | Have you considered subclassing the User model? This may create a different set of problems, and is only available with newer releases (not sure when the change went in, I'm on trunk). | 0 | 0 | 0 | 0 | 2009-01-09T19:49:00.000 | 4 | 0.049958 | false | 429,443 | 0 | 0 | 1 | 3 | I am writing a Django app, and I would like an account to be created on our Google Apps hosted email using the Provisioning API whenever an account is created locally.
I would solely use signals, but since I would like the passwords to be synchronized across sites, I have monkeypatched User.objects.create_user and User... |
Syncing Django users with Google Apps without monkeypatching | 959,044 | 0 | 1 | 428 | 0 | python,django,google-apps,monkeypatching | Monkeypatching is definitely bad. Hard to say anything since you've given so little code/information. But I assume you have the password in cleartext at some point (in a view, in a form) so why not sync manually then? | 0 | 0 | 0 | 0 | 2009-01-09T19:49:00.000 | 4 | 0 | false | 429,443 | 0 | 0 | 1 | 3 | I am writing a Django app, and I would like an account to be created on our Google Apps hosted email using the Provisioning API whenever an account is created locally.
I would solely use signals, but since I would like the passwords to be synchronized across sites, I have monkeypatched User.objects.create_user and User... |
Syncing Django users with Google Apps without monkeypatching | 749,860 | 0 | 1 | 428 | 0 | python,django,google-apps,monkeypatching | Subclassing seems the best route, as long as you can change all of your code to use the new class. I think that's supported in the latest release of Django. | 0 | 0 | 0 | 0 | 2009-01-09T19:49:00.000 | 4 | 0 | false | 429,443 | 0 | 0 | 1 | 3 | I am writing a Django app, and I would like an account to be created on our Google Apps hosted email using the Provisioning API whenever an account is created locally.
I would solely use signals, but since I would like the passwords to be synchronized across sites, I have monkeypatched User.objects.create_user and User... |
when to delete user's session | 432,200 | 1 | 1 | 988 | 0 | python,session | A cron job to clean up any expired session data in the database is a good thing. Depending on how long your sessions last, and how big your database is, you might want to cleanup more often than once per day. But one cleanup pass per day is usually fine. | 0 | 0 | 0 | 0 | 2009-01-11T01:23:00.000 | 3 | 0.066568 | false | 432,115 | 0 | 0 | 1 | 3 | I'm writing a webapp that will only be used by authenticated users. Some temporary databases and log files will be created during each user session. I'd like to erase all these temp files when the session is finished.
Obviously, a logout or window close event would be sufficient to close the session, but in some cases... |
when to delete user's session | 432,126 | 1 | 1 | 988 | 0 | python,session | User sessions should have a timeout value and should be closed when the timeout expires or the user logs out. Log out is an obvious time to do this and the time out needs to be there in case the user navigates away from your application without logging out. | 0 | 0 | 0 | 0 | 2009-01-11T01:23:00.000 | 3 | 1.2 | true | 432,115 | 0 | 0 | 1 | 3 | I'm writing a webapp that will only be used by authenticated users. Some temporary databases and log files will be created during each user session. I'd like to erase all these temp files when the session is finished.
Obviously, a logout or window close event would be sufficient to close the session, but in some cases... |
when to delete user's session | 432,170 | 0 | 1 | 988 | 0 | python,session | Delete User's Session during:
1) Logout
2) Automatic timeout (the length of the timeout can be set through the web.config)
3) As part of any other routine maintenance methods you already have running by deleting any session information which hasn't been accessed for some defined period of time (likely shorter than your... | 0 | 0 | 0 | 0 | 2009-01-11T01:23:00.000 | 3 | 0 | false | 432,115 | 0 | 0 | 1 | 3 | I'm writing a webapp that will only be used by authenticated users. Some temporary databases and log files will be created during each user session. I'd like to erase all these temp files when the session is finished.
Obviously, a logout or window close event would be sufficient to close the session, but in some cases... |
Installing certain packages using virtualenv | 436,427 | 0 | 2 | 3,218 | 0 | python,virtualenv,buildout | The other option (one I've used) is to easy_install Django after you've created the virtual environment. This is easily scripted. The penalty you pay is waiting for Django installation in each of your virtual environments.
I'm with Toby, though: Unless there's a compelling reason why you have to have a separate copy of... | 0 | 0 | 0 | 0 | 2009-01-12T04:05:00.000 | 5 | 0 | false | 434,407 | 1 | 0 | 1 | 2 | So, I want to start using virtualenv this year. I like the no-site-packages option, that is nice. However I was wondering how to install certain packages into each virtualenv. For example, lets say I want to install django into each virtualenv... is this possible, and if so, how? Does buildout address this?
Well i... |
Installing certain packages using virtualenv | 434,445 | 2 | 2 | 3,218 | 0 | python,virtualenv,buildout | If you want django to be installed on EACH virtualenv, you might as well install it in the site-packages directory? Just a thought. | 0 | 0 | 0 | 0 | 2009-01-12T04:05:00.000 | 5 | 0.07983 | false | 434,407 | 1 | 0 | 1 | 2 | So, I want to start using virtualenv this year. I like the no-site-packages option, that is nice. However I was wondering how to install certain packages into each virtualenv. For example, lets say I want to install django into each virtualenv... is this possible, and if so, how? Does buildout address this?
Well i... |
For Python support, what company would be best to get hosting from? | 434,598 | 0 | 14 | 9,246 | 0 | python,web-hosting,wsgi | I've been pretty happy with Dreamhost, and of course Google AppEngine. | 0 | 0 | 0 | 0 | 2009-01-12T06:07:00.000 | 9 | 0 | false | 434,580 | 0 | 0 | 1 | 3 | I want to be able to run WSGI apps but my current hosting restricts it. Does anybody know a company that can accommodate my requirements? |
For Python support, what company would be best to get hosting from? | 435,197 | 0 | 14 | 9,246 | 0 | python,web-hosting,wsgi | Google App engine and OpenHosting.com
Have virtual server by OpenHosting, they are ultra fast with support and have very high uptime. | 0 | 0 | 0 | 0 | 2009-01-12T06:07:00.000 | 9 | 0 | false | 434,580 | 0 | 0 | 1 | 3 | I want to be able to run WSGI apps but my current hosting restricts it. Does anybody know a company that can accommodate my requirements? |
For Python support, what company would be best to get hosting from? | 22,368,517 | 0 | 14 | 9,246 | 0 | python,web-hosting,wsgi | I use AWS micro server, 1 year free and after that you can get a 3 year reserved which works out to about $75/yr :) The micro server has only 20MB/sec throughput, ~600MB of ram, and a slower CPU. I run a few Mezzanine sites on mine and it seems fine. | 0 | 0 | 0 | 0 | 2009-01-12T06:07:00.000 | 9 | 0 | false | 434,580 | 0 | 0 | 1 | 3 | I want to be able to run WSGI apps but my current hosting restricts it. Does anybody know a company that can accommodate my requirements? |
What should "value_from_datadict" method of a custom form widget return? | 437,360 | 0 | 5 | 4,106 | 0 | python,django,django-forms | The Django source says
Given a
dictionary of data and this widget's
name, returns the value of this
widget. Returns None if it's not
provided.
Reading the code, I see that Django's separate Date and Time widgets are both subclasses of Input, subclasses of Widget, which appears to work with simple Strings. | 0 | 0 | 0 | 0 | 2009-01-12T20:40:00.000 | 2 | 0 | false | 436,944 | 1 | 0 | 1 | 1 | I'm trying to build my own custom django form widgets (putting them in widgets.py of my project directory). What should the value "value_from_datadict()" return? Is it returning a string or the actual expected value of the field?
I'm building my own version of a split date/time widget using JQuery objects, what shoul... |
Is there a way to automatically generate a list of columns that need indexing? | 438,700 | 4 | 5 | 620 | 1 | python,mysql,database,django,django-models | No.
Adding indexes willy-nilly to all "slow" queries will also slow down inserts, updates and deletes.
Indexes are a balancing act between fast queries and fast changes. There is no general or "right" answer. There's certainly nothing that can automate this.
You have to measure the improvement across your whole appli... | 0 | 0 | 0 | 0 | 2009-01-13T10:36:00.000 | 2 | 0.379949 | false | 438,559 | 0 | 0 | 1 | 1 | The beauty of ORM lulled me into a soporific sleep. I've got an existing Django app with a lack of database indexes. Is there a way to automatically generate a list of columns that need indexing?
I was thinking maybe some middleware that logs which columns are involved in WHERE clauses? but is there anything built into... |
Re-creating threading and concurrency knowledge in increasingly popular languages | 442,312 | 1 | 7 | 573 | 0 | java,python,ruby,multithreading,concurrency | This is not flame bait, but IMHO Java has one of the simpler and more restricted models for threading and concurrency available.
That's not necessarily a bad thing, but at the level of granularity it offers it means that the perspective it gives you of what concurrency is and how to deal with it is inherently limited i... | 0 | 0 | 0 | 0 | 2009-01-13T17:52:00.000 | 5 | 0.039979 | false | 440,036 | 1 | 0 | 1 | 3 | I am primarily a Java developer, and I've been reading a lot of in-depth work on threads and concurrency. Many very smart people (Doug Lea, Brian Goetz, etc) have authored books on these topics and made contributions to new concurrency libraries for Java.
As I start to learn more about Python, Ruby, and other language... |
Re-creating threading and concurrency knowledge in increasingly popular languages | 463,249 | 3 | 7 | 573 | 0 | java,python,ruby,multithreading,concurrency | I think the answer is both yes and no. Java arguably has the most well-defined memory model and execution semantics of the most commonly used imperative languages (Java, C++, Python, Ruby, etc). In some sense, other languages either lack this completely or are playing catch-up (if that's even possible given the immat... | 0 | 0 | 0 | 0 | 2009-01-13T17:52:00.000 | 5 | 0.119427 | false | 440,036 | 1 | 0 | 1 | 3 | I am primarily a Java developer, and I've been reading a lot of in-depth work on threads and concurrency. Many very smart people (Doug Lea, Brian Goetz, etc) have authored books on these topics and made contributions to new concurrency libraries for Java.
As I start to learn more about Python, Ruby, and other language... |
Re-creating threading and concurrency knowledge in increasingly popular languages | 440,086 | 11 | 7 | 573 | 0 | java,python,ruby,multithreading,concurrency | The basic principles of concurrent programming existed before java and were summarized in those java books you're talking about. The java.util.concurrent library was similarly derived from previous code and research papers on concurrent programming.
However, some implementation issues are specific to Java. It has a spe... | 0 | 0 | 0 | 0 | 2009-01-13T17:52:00.000 | 5 | 1 | false | 440,036 | 1 | 0 | 1 | 3 | I am primarily a Java developer, and I've been reading a lot of in-depth work on threads and concurrency. Many very smart people (Doug Lea, Brian Goetz, etc) have authored books on these topics and made contributions to new concurrency libraries for Java.
As I start to learn more about Python, Ruby, and other language... |
What is the best approach to implement configuration app with Django? | 448,110 | 0 | 4 | 1,916 | 0 | python,django,configuration,django-models,django-admin | I think you'll have trouble if you make other apps depend (at interpretation/app-loading time) on values set in your config app. Can you use some kind of placeholder value in Python code at interpretation time, and then pull in the real config data on the post_syncdb signal? | 0 | 0 | 0 | 0 | 2009-01-14T09:11:00.000 | 3 | 0 | false | 442,355 | 0 | 0 | 1 | 1 | I need to program kind of configuration registry for Django-based application.
Requirements:
Most likely param_name : param_value structure
Editable via admin interface
Has to work with syncdb. How to deal with a situation in which other apps depend on configuration model and the model itself has not been initialized... |
cascading forms in Django/else using any Pythonic framework | 443,155 | 1 | 3 | 612 | 0 | python,django | I would also suggest considering getting a mapping of all data once instead of requesting subfield values one by one. Unless the subfield choices change frequently (states/cities change?) or huge in numbers (>1000) this should offer best performance and it is less complex.
You don't even need to create a seperate view,... | 0 | 0 | 0 | 0 | 2009-01-14T11:04:00.000 | 2 | 0.099668 | false | 442,596 | 0 | 0 | 1 | 1 | Can anyone point to an example written in Python (django preferred) with ajax for cascading forms? Cascading Forms is basically forms whose field values change if and when another field value changes. Example Choose Country, and then States will change... |
Has anyone tracked down whether IronPython or IronRuby will support Attributes? | 592,844 | 0 | 1 | 316 | 0 | ironpython,ironruby | We're looking at attribute support again for a .NET interop-focused release in the near future. Keep an eye on ironruby-core@rubyforge.org for an updates. | 0 | 0 | 0 | 1 | 2009-01-14T17:49:00.000 | 3 | 0 | false | 443,996 | 0 | 0 | 1 | 1 | I have scanned 'the Google' and have not found the definitive answer on whether the Iron* languages (any or all) will end up with Attribute support..
Anyone?
Thanks - Jon |
GAE - How to live with no joins? | 446,471 | 13 | 13 | 2,112 | 1 | python,google-app-engine,join,google-cloud-datastore | If you look at how the SQL solution you provided will be executed, it will go basically like this:
Fetch a list of friends for the current user
For each user in the list, start an index scan over recent posts
Merge-join all the scans from step 2, stopping when you've retrieved enough entries
You can carry out exactly... | 0 | 1 | 0 | 0 | 2009-01-15T06:07:00.000 | 4 | 1 | false | 445,827 | 0 | 0 | 1 | 2 | Example Problem:
Entities:
User contains name and a list of friends (User references)
Blog Post contains title, content, date and Writer (User)
Requirement:
I want a page that displays the title and a link to the blog of the last 10 posts by a user's friend. I would also like the ability to keep paging back through ... |
GAE - How to live with no joins? | 446,477 | 1 | 13 | 2,112 | 1 | python,google-app-engine,join,google-cloud-datastore | "Load user, loop through the list of friends and load their latest blog posts."
That's all a join is -- nested loops. Some kinds of joins are loops with lookups. Most lookups are just loops; some are hashes.
"Finally merge all the blog posts to find the latest 10 blog entries"
That's a ORDER BY with a LIMIT. That's ... | 0 | 1 | 0 | 0 | 2009-01-15T06:07:00.000 | 4 | 0.049958 | false | 445,827 | 0 | 0 | 1 | 2 | Example Problem:
Entities:
User contains name and a list of friends (User references)
Blog Post contains title, content, date and Writer (User)
Requirement:
I want a page that displays the title and a link to the blog of the last 10 posts by a user's friend. I would also like the ability to keep paging back through ... |
Porting library from Java to Python | 2,746,114 | 0 | 6 | 1,699 | 0 | java,python | I've used Java2Python. It's not too bad, you still need to understand the code as it doesn't do everything correctly, but it does help. | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 0 | false | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
Porting library from Java to Python | 448,137 | 9 | 6 | 1,699 | 0 | java,python | If it were me, I'd consider doing the work by hand. A couple thousand lines of code isn't a lot of code, and by rewriting it yourself (rather than translating it automatically), you'll be in a position to decide how to take advantage of Python idioms appropriately. (FWIW, I worked Java almost exclusively for 9 years, a... | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 1.2 | true | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
Porting library from Java to Python | 448,330 | 2 | 6 | 1,699 | 0 | java,python | Jython's not what you're looking for in the final solution, but it will make the porting go much smoother.
My approach would be:
If there are existing tests (unit or otherwise), rewrite them in Jython (using Python's unittest)
Write some characterization tests in Jython (tests that record the current behavior)
Start p... | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 0.057081 | false | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
Porting library from Java to Python | 448,245 | 3 | 6 | 1,699 | 0 | java,python | I would write it again by hand. I don't know of any automated tools that would generate non-disgusting looking Python, and having ported Java code to Python myself, I found the result was both higher quality than the original and considerably shorter.
You gain quality because Python is more expressive (for example, ano... | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 0.085505 | false | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
Porting library from Java to Python | 448,213 | 3 | 6 | 1,699 | 0 | java,python | Automatic translators (f2c, j2py, whatever) normally emit code you wouldn't want to touch by hand. This is fine when all you need to do is use the output (for example, if you have a C compiler and no Fortran compiler, f2c allows you to compile Fortran programs), but terrible when you need to do anything to the code af... | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 0.085505 | false | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
Porting library from Java to Python | 448,188 | 6 | 6 | 1,699 | 0 | java,python | Code is always better the second time you write it anyway....
Plus a few thousand lines of Java can probably be translated into a few hundred of Python. | 0 | 0 | 0 | 0 | 2009-01-15T19:23:00.000 | 7 | 1 | false | 448,095 | 1 | 0 | 1 | 6 | I'm about to port a smallish library from Java to Python and wanted some advice (smallish ~ a few thousand lines of code). I've studied the Java code a little, and noticed some design patterns that are common in both languages. However, there were definitely some Java-only idioms (singletons, etc) present that are ge... |
How do I create a webpage with buttons that invoke various Python scripts on the system serving the webpage? | 449,199 | 0 | 25 | 38,798 | 0 | python,windows,web-services,cgi | When setting this up, please be careful to restrict access to the scripts that take some action on your web server. It is not sufficient to place them in a directory where you just don't publish the URL, because sooner or later somebody will find them.
At the very least, put these scripts in a location that is password... | 0 | 0 | 1 | 0 | 2009-01-15T22:58:00.000 | 9 | 0 | false | 448,837 | 0 | 0 | 1 | 2 | I'm a hobbyist (and fairly new) programmer who has written several useful (to me) scripts in python to handle various system automation tasks that involve copying, renaming, and downloading files amongst other sundry activities.
I'd like to create a web page served from one of my systems that would merely present a few... |
How do I create a webpage with buttons that invoke various Python scripts on the system serving the webpage? | 449,062 | 1 | 25 | 38,798 | 0 | python,windows,web-services,cgi | A simple cgi script (or set of scripts) is all you need to get started. The other answers have covered how to do this so I won't repeat it; instead, I will stress that using plain text will get you a long way. Just output the header (print("Content-type: text/plain\n") plus print adds its own newline to give you the ne... | 0 | 0 | 1 | 0 | 2009-01-15T22:58:00.000 | 9 | 0.022219 | false | 448,837 | 0 | 0 | 1 | 2 | I'm a hobbyist (and fairly new) programmer who has written several useful (to me) scripts in python to handle various system automation tasks that involve copying, renaming, and downloading files amongst other sundry activities.
I'd like to create a web page served from one of my systems that would merely present a few... |
Python Path | 450,545 | 0 | 2 | 1,226 | 0 | python | Remember that in addition to setting PYTHONPATH in your system environment, you'll also want to assign DJANGO_SETTINGS_MODULE. | 0 | 0 | 0 | 0 | 2009-01-16T12:33:00.000 | 3 | 0 | false | 450,290 | 1 | 0 | 1 | 1 | I am installing active python, django. I really dont know how to set the python path in vista environment system. first of all will it work in vista. |
No module named MySQLdb | 28,278,997 | 5 | 493 | 804,257 | 1 | python,django,python-2.x | Go to your project directory with cd.
source/bin/activate (activate your env. if not previously).
Run the command easy_install MySQL-python | 0 | 0 | 0 | 0 | 2009-01-18T09:13:00.000 | 32 | 0.03124 | false | 454,854 | 0 | 0 | 1 | 5 | I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista. |
No module named MySQLdb | 58,246,337 | 6 | 493 | 804,257 | 1 | python,django,python-2.x | I personally recommend using pymysql instead of using the genuine MySQL connector, which provides you with a platform independent interface and could be installed through pip.
And you could edit the SQLAlchemy URL schema like this:
mysql+pymysql://username:passwd@host/database | 0 | 0 | 0 | 0 | 2009-01-18T09:13:00.000 | 32 | 1 | false | 454,854 | 0 | 0 | 1 | 5 | I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista. |
No module named MySQLdb | 38,310,817 | 93 | 493 | 804,257 | 1 | python,django,python-2.x | if your python version is 3.5, do a pip install mysqlclient, other things didn't work for me | 0 | 0 | 0 | 0 | 2009-01-18T09:13:00.000 | 32 | 1 | false | 454,854 | 0 | 0 | 1 | 5 | I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista. |
No module named MySQLdb | 58,825,148 | 2 | 493 | 804,257 | 1 | python,django,python-2.x | None of the above worked for me on an Ubuntu 18.04 fresh install via docker image.
The following solved it for me:
apt-get install holland python3-mysqldb | 0 | 0 | 0 | 0 | 2009-01-18T09:13:00.000 | 32 | 0.012499 | false | 454,854 | 0 | 0 | 1 | 5 | I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista. |
No module named MySQLdb | 72,496,371 | 0 | 493 | 804,257 | 1 | python,django,python-2.x | For CentOS 8 and Python3
$ sudo dnf install python3-mysqlclient -y | 0 | 0 | 0 | 0 | 2009-01-18T09:13:00.000 | 32 | 0 | false | 454,854 | 0 | 0 | 1 | 5 | I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista. |
Advice on Python/Django and message queues | 714,637 | 6 | 44 | 20,229 | 0 | python,django,message-queue | Stompserver is a good option. It's lightweight, easy to install and easy to use from Django/python.
We have a system using stompserver in production for sending out emails and processing other jobs asynchronously.
Django saves the emails to the database, a model.post_save handler in Django sends an event to stompserver... | 0 | 0 | 0 | 0 | 2009-01-18T10:42:00.000 | 8 | 1 | false | 454,944 | 0 | 0 | 1 | 4 | I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons.
Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django p... |
Advice on Python/Django and message queues | 3,696,792 | 1 | 44 | 20,229 | 0 | python,django,message-queue | Is there anything wrong is solving this using the mail infrastructure? Like, every app server running their own mail daemons which will queue any locally submitted mail, which forward to a centralized mail server which can do the mail heavy lifting? | 0 | 0 | 0 | 0 | 2009-01-18T10:42:00.000 | 8 | 0.024995 | false | 454,944 | 0 | 0 | 1 | 4 | I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons.
Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django p... |
Advice on Python/Django and message queues | 454,996 | 0 | 44 | 20,229 | 0 | python,django,message-queue | If you already have MySQL installed, you could create a table to use as a "todo list" of sorts.
Threads synchronously add jobs to the table, and a batched task removes jobs as they're completed.
That way, there's no need to install and learn more software, and it should work fine as a persistent job store so long as yo... | 0 | 0 | 0 | 0 | 2009-01-18T10:42:00.000 | 8 | 0 | false | 454,944 | 0 | 0 | 1 | 4 | I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons.
Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django p... |
Advice on Python/Django and message queues | 456,389 | 1 | 44 | 20,229 | 0 | python,django,message-queue | Just add the emails to a database, and then write another script ran by some task scheduler utility (cron comes to mind) to send the emails. | 0 | 0 | 0 | 0 | 2009-01-18T10:42:00.000 | 8 | 0.024995 | false | 454,944 | 0 | 0 | 1 | 4 | I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons.
Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django p... |
Cropping pages of a .pdf file | 459,639 | 0 | 23 | 40,532 | 0 | python,pdf,pypdf2,pypdf | Acrobat Javascript API has a setPageBoxes method, but Adobe doesn't provide any Python code samples. Only C++, C# and VB. | 0 | 0 | 0 | 0 | 2009-01-19T10:43:00.000 | 7 | 0 | false | 457,207 | 0 | 0 | 1 | 2 | I was wondering if anyone had any experience in working programmatically with .pdf files. I have a .pdf file and I need to crop every page down to a certain size.
After a quick Google search I found the pyPdf library for python but my experiments with it failed. When I changed the cropBox and trimBox attributes on a pa... |
Cropping pages of a .pdf file | 459,523 | 0 | 23 | 40,532 | 0 | python,pdf,pypdf2,pypdf | You can convert the PDF to Postscript (pstopdf or ps2pdf) and than use text processing on the Postscript file. After that you can convert the output back to PDF.
This works nicely if the PDFs you want to process are all generated by the same application and are somewhat similar. If they come from different sources it i... | 0 | 0 | 0 | 0 | 2009-01-19T10:43:00.000 | 7 | 0 | false | 457,207 | 0 | 0 | 1 | 2 | I was wondering if anyone had any experience in working programmatically with .pdf files. I have a .pdf file and I need to crop every page down to a certain size.
After a quick Google search I found the pyPdf library for python but my experiments with it failed. When I changed the cropBox and trimBox attributes on a pa... |
Is there a better layout language than HTML for printing? | 458,353 | 14 | 15 | 6,190 | 0 | python,qt,layout,printing,gpl | There's LaTeX. Not sure if that falls into the "as easy to use as html" category, but it's not hard. | 0 | 0 | 0 | 0 | 2009-01-19T17:05:00.000 | 10 | 1 | false | 458,340 | 0 | 0 | 1 | 1 | I'm using Python and Qt 4.4 and I have to print some pages. Initially I thought I'd use HTML with CSS to produce those pages. But HTML has some limitations.
Now the question is: is there anything that's better than HTML but just (or almost) as easy to use? Additionally, it should be GPL-compatible.
Edit:
kdgregory & Ma... |
Python with Netbeans 6.5 | 462,107 | 1 | 1 | 263 | 0 | python,netbeans,project | Python support is in beta, and as someone who works with NB for a past 2 years, I can say that even a release versions are buggy and sometimes crashes. Early Ruby support was also very shaky. | 0 | 0 | 0 | 0 | 2009-01-20T16:37:00.000 | 1 | 0.197375 | false | 462,068 | 0 | 0 | 1 | 1 | Can you give me some links or explain how to configure an existing python project onto Netbeans?
I'm trying it these days and it continues to crash also code navigation doesn't work well and I've problems with debugging. Surely these problems are related to my low eperience about python and I need support also in triv... |
Django missing translation of some strings. Any idea why? | 463,928 | 11 | 9 | 2,057 | 0 | python,django,internationalization,translation | The fuzzy marker is added to the .po file by makemessages. When you have a new string (with no translations), it looks for similar strings, and includes them as the translation, with the fuzzy marker. This means, this is a crude match, so don't display it to the user, but it could be a good start for the human transl... | 0 | 0 | 0 | 0 | 2009-01-21T00:38:00.000 | 2 | 1 | false | 463,714 | 0 | 0 | 1 | 1 | I have a medium sized Django project, (running on AppEngine if it makes any difference), and have all the strings living in .po files like they should.
I'm seeing strange behavior where certain strings just don't translate. They show up in the .po file when I run make_messages, with the correct file locations marked w... |
unit testing for an application server | 465,422 | 1 | 3 | 1,357 | 0 | python,unit-testing,twisted | I think you chose the wrong direction. It's true that the Trial docs is very light. But Trial is base on unittest and only add some stuff to deal with the reactor loop and the asynchronous calls (it's not easy to write tests that deal with deffers). All your tests that are not including deffer/asynchronous call will be... | 0 | 1 | 0 | 1 | 2009-01-21T09:15:00.000 | 4 | 0.049958 | false | 464,543 | 0 | 0 | 1 | 3 | I wrote an application server (using python & twisted) and I want to start writing some tests. But I do not want to use Twisted's Trial due to time constraints and not having time to play with it now. So here is what I have in mind: write a small test client that connects to the app server and makes the necessary reque... |
unit testing for an application server | 464,870 | 1 | 3 | 1,357 | 0 | python,unit-testing,twisted | "My question is: Is this a correct approach?"
It's what you chose. You made a lot of excuses, so I'm assuming that your pretty well fixed on this course. It's not the best, but you've already listed all your reasons for doing it (and then asked follow-up questions on this specific course of action). "correct" doesn'... | 0 | 1 | 0 | 1 | 2009-01-21T09:15:00.000 | 4 | 1.2 | true | 464,543 | 0 | 0 | 1 | 3 | I wrote an application server (using python & twisted) and I want to start writing some tests. But I do not want to use Twisted's Trial due to time constraints and not having time to play with it now. So here is what I have in mind: write a small test client that connects to the app server and makes the necessary reque... |
unit testing for an application server | 464,596 | 0 | 3 | 1,357 | 0 | python,unit-testing,twisted | haven't used twisted before, and the twisted/trial documentation isn't stellar from what I just saw, but it'll likely take you 2-3 days to implement correctly the test system you describe above. Now, like I said I have no idea about Trial, but I GUESS you could probably get it working in 1-2 days, since you already hav... | 0 | 1 | 0 | 1 | 2009-01-21T09:15:00.000 | 4 | 0 | false | 464,543 | 0 | 0 | 1 | 3 | I wrote an application server (using python & twisted) and I want to start writing some tests. But I do not want to use Twisted's Trial due to time constraints and not having time to play with it now. So here is what I have in mind: write a small test client that connects to the app server and makes the necessary reque... |
Templates within templates. How to avoid rendering twice? | 468,751 | 2 | 1 | 561 | 0 | python,django,django-templates | "This seems wasteful" Why does it seem that way?
Every template is a mix of tags and text. In your case some block of text has already been visited by a template engine. So what? Once it's been transformed it's just text and passes through the next template engine very, very quickly.
Do you have specific performanc... | 0 | 0 | 0 | 0 | 2009-01-22T11:22:00.000 | 2 | 1.2 | true | 468,736 | 0 | 0 | 1 | 1 | I've got a CMS that takes some dynamic content and renders it using a standard template. However I am now using template tags in the dynamic content itself so I have to do a render_to_string and then pass the results of that as a context variable to render_to_response. This seems wasteful.
What's a better way to do thi... |
Using a java library from python | 477,533 | 6 | 41 | 60,373 | 0 | java,python,jython | Wrap your Java-Code in a Container (Servlet / EJB).
So you don´t loose time in the vm-startup and you go the way to more service-oriented.
For the wraping you can use jython (only make sense if you are familiar with python)
Choose a communication-protocoll in which python and java can use:
json (see www.json.... | 0 | 0 | 0 | 0 | 2009-01-25T00:41:00.000 | 6 | 1 | false | 476,968 | 0 | 0 | 1 | 1 | I have a python app and java app. The python app generates input for the java app and invokes it on the command line.
I'm sure there must be a more elegant solution to this; just like using JNI to invoke C code from Java.
Any pointers?
(FYI I'm v. new to Python)
Clarification (at the cost of a long question: apologie... |
Inventory Control Across Multiple Servers .. Ideas? | 487,660 | 1 | 0 | 1,492 | 0 | python,tracking,inventory | One possibility would be to expose a web service interface on your inventory management system that allows the transactions used by the web shopfront to be accessed remotely. With a reasonably secure VPN link or ssh tunnel type arrangement, the web shopfront could get stock levels, place orders or execute searches aga... | 0 | 0 | 0 | 0 | 2009-01-28T13:39:00.000 | 3 | 1.2 | true | 487,642 | 0 | 0 | 1 | 3 | We currently have an inventory management system that was built in-house. It works great, and we are constantly innovating it.
This past Fall, we began selling products directly on one of our websites via a Shopping Cart checkout.
Our inventory management system runs off a server in the office, while the three website... |
Inventory Control Across Multiple Servers .. Ideas? | 487,674 | 0 | 0 | 1,492 | 0 | python,tracking,inventory | I don't see the problem... You have an application running on one server that manages your database locally. There's no reason a remote server can't also talk to that database.
Of course, if you don't have a database and are instead using a homegrown app to act as some sort of faux-database, I recommend that you refact... | 0 | 0 | 0 | 0 | 2009-01-28T13:39:00.000 | 3 | 0 | false | 487,642 | 0 | 0 | 1 | 3 | We currently have an inventory management system that was built in-house. It works great, and we are constantly innovating it.
This past Fall, we began selling products directly on one of our websites via a Shopping Cart checkout.
Our inventory management system runs off a server in the office, while the three website... |
Inventory Control Across Multiple Servers .. Ideas? | 706,707 | 0 | 0 | 1,492 | 0 | python,tracking,inventory | I'm not sure if there is any one really good solution for your problem. I think the way you are doing it now works fine, but if you don't agree then I don't know what to tell you. | 0 | 0 | 0 | 0 | 2009-01-28T13:39:00.000 | 3 | 0 | false | 487,642 | 0 | 0 | 1 | 3 | We currently have an inventory management system that was built in-house. It works great, and we are constantly innovating it.
This past Fall, we began selling products directly on one of our websites via a Shopping Cart checkout.
Our inventory management system runs off a server in the office, while the three website... |
How can I order objects according to some attribute of the child in sqlalchemy? | 1,227,979 | 1 | 3 | 595 | 1 | python,sqlalchemy | I had the same question as the parent when using the ORM, and GHZ's link contained the answer on how it's possible. In sqlalchemy, assuming BlogPost.comments is a mapped relation to the Comments table, you can't do:
session.query(BlogPost).order_by(BlogPost.comments.creationDate.desc())
, but you can do:
session.que... | 0 | 0 | 0 | 0 | 2009-01-29T16:01:00.000 | 2 | 0.099668 | false | 492,223 | 0 | 0 | 1 | 1 | Here is the situation: I have a parent model say BlogPost. It has many Comments. What I want is the list of BlogPosts ordered by the creation date of its' Comments. I.e. the blog post which has the most newest comment should be on top of the list. Is this possible with SQLAlchemy? |
Best opensource IDE for building applications on Google App Engine? | 498,183 | 0 | 15 | 11,377 | 0 | python,google-app-engine,ide | For my recent GAE project I tried both eclipse with pydev and intellij with its python plugin. I use intellij for my "real" work and so I found it to be the most natural and easy to use, personally. It is not open source, but if you already have a license it is no extra cost.
I found the eclipse plugin to be very goo... | 0 | 1 | 0 | 0 | 2009-01-30T14:03:00.000 | 10 | 0 | false | 495,579 | 0 | 0 | 1 | 5 | Looking to dabble with GAE and python, and I'd like to know what are some of the best tools for this - thanks! |
Best opensource IDE for building applications on Google App Engine? | 497,470 | 0 | 15 | 11,377 | 0 | python,google-app-engine,ide | I've been using gedit and am pretty happy with it, there is a couple of good plugins that make life easier (e.g. Class Browser). I tried eclipse but its just not the same experience you get with Java. | 0 | 1 | 0 | 0 | 2009-01-30T14:03:00.000 | 10 | 0 | false | 495,579 | 0 | 0 | 1 | 5 | Looking to dabble with GAE and python, and I'd like to know what are some of the best tools for this - thanks! |
Best opensource IDE for building applications on Google App Engine? | 495,783 | 6 | 15 | 11,377 | 0 | python,google-app-engine,ide | Netbeans has some very nice tools for Python development | 0 | 1 | 0 | 0 | 2009-01-30T14:03:00.000 | 10 | 1 | false | 495,579 | 0 | 0 | 1 | 5 | Looking to dabble with GAE and python, and I'd like to know what are some of the best tools for this - thanks! |
Best opensource IDE for building applications on Google App Engine? | 498,484 | 6 | 15 | 11,377 | 0 | python,google-app-engine,ide | I use pydev on eclipse, and works well for django too! | 0 | 1 | 0 | 0 | 2009-01-30T14:03:00.000 | 10 | 1 | false | 495,579 | 0 | 0 | 1 | 5 | Looking to dabble with GAE and python, and I'd like to know what are some of the best tools for this - thanks! |
Best opensource IDE for building applications on Google App Engine? | 496,385 | 2 | 15 | 11,377 | 0 | python,google-app-engine,ide | VIM(there's enough plug-ins to make it IDE -like)
Komodo IDE($$)
Eclipse w/Pydev
Net Beans with Python support
WingIDE($$)
SPE(Stani's Python Editor) | 0 | 1 | 0 | 0 | 2009-01-30T14:03:00.000 | 10 | 0.039979 | false | 495,579 | 0 | 0 | 1 | 5 | Looking to dabble with GAE and python, and I'd like to know what are some of the best tools for this - thanks! |
Django Admin app or roll my own? | 496,123 | 17 | 21 | 11,322 | 0 | python,django,django-admin | It really depends on the project I guess. While you can do everything in the admin, when your app gets more complex using the admin gets more complex too. And if you want to make your app really easy to manage you want control over every little detail, which is not really possible with the admin app.
I guess you should... | 0 | 0 | 0 | 0 | 2009-01-30T15:22:00.000 | 7 | 1.2 | true | 495,879 | 0 | 0 | 1 | 5 | I'm just starting to use Django for a personal project.
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
This is a community wiki because it could be considered a poll. |
Django Admin app or roll my own? | 500,093 | 1 | 21 | 11,322 | 0 | python,django,django-admin | I'd recommend enabling the admin site on just about every type of project. The cost of setting it up is pretty low, and it gives you a reasonably convenient mechanism for inspecting and modifying your site.
If your site has mostly a one way flow of information, from webmaster to visitors, then the admin site is prob... | 0 | 0 | 0 | 0 | 2009-01-30T15:22:00.000 | 7 | 0.028564 | false | 495,879 | 0 | 0 | 1 | 5 | I'm just starting to use Django for a personal project.
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
This is a community wiki because it could be considered a poll. |
Django Admin app or roll my own? | 3,842,185 | 1 | 21 | 11,322 | 0 | python,django,django-admin | I'd go with the Django admin functionality, over writing your own. You can customize the Django admin by adding your own templates for the admin, your own widgets, etc. I'm working on a project with a very customized Django admin. If we had decided to write it by hand, it would have taken 4 times as long to get done... | 0 | 0 | 0 | 0 | 2009-01-30T15:22:00.000 | 7 | 0.028564 | false | 495,879 | 0 | 0 | 1 | 5 | I'm just starting to use Django for a personal project.
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
This is a community wiki because it could be considered a poll. |
Django Admin app or roll my own? | 498,068 | 3 | 21 | 11,322 | 0 | python,django,django-admin | I found sadly, that the while the django admin app saves a lot of time at first, it becomes a hinderence later on, as your costumer demands more features that are not easily integrated with the default admin interface. You might endup with two kinds of admin tools: the django admin (for apps that require simple data en... | 0 | 0 | 0 | 0 | 2009-01-30T15:22:00.000 | 7 | 0.085505 | false | 495,879 | 0 | 0 | 1 | 5 | I'm just starting to use Django for a personal project.
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
This is a community wiki because it could be considered a poll. |
Django Admin app or roll my own? | 498,061 | 17 | 21 | 11,322 | 0 | python,django,django-admin | I would use Django's admin app, for a number of reasons. First, writing an administration app may be quite tricky and take some time if you want to do it right, and django.contrib.admin is for free and works out of the box. Second, it is really well designed and very nice to work with (even for non-technical users). Th... | 0 | 0 | 0 | 0 | 2009-01-30T15:22:00.000 | 7 | 1 | false | 495,879 | 0 | 0 | 1 | 5 | I'm just starting to use Django for a personal project.
What are the pros and cons of using the built-in Admin application versus integrating my administrative functions into the app itself (by checking request.user.is_staff)?
This is a community wiki because it could be considered a poll. |
Is Django a good choice for a security critical application? | 499,505 | 1 | 22 | 8,593 | 0 | python,django,security | You should not rely the security of the application on the framework. even though Django does come in with a pretty good number of measures against classical security issues, it can not guarantee that your application will be secure, you need much more than a programming Framework to get a security critical application... | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 0.028564 | false | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Is Django a good choice for a security critical application? | 498,707 | 17 | 22 | 8,593 | 0 | python,django,security | Probably the reason behind Java is not in the in the security. I think Java is more used in large development companies and banks usually resort to them for their development needs (which probably are not only related to the web site but creep deeper in the backend).
So, I see no security reasons, mostly cultural ones. | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 1 | false | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Is Django a good choice for a security critical application? | 498,798 | 30 | 22 | 8,593 | 0 | python,django,security | Actually, the security in Java and Python is the same. Digest-only password handling, cookies that timeout rapidly, careful deletion of sessions, multi-factor authentication. None of this is unique to a Java framework or a Python framework like Django.
Django, indeed, has a security backend architecture that allows y... | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 1.2 | true | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Is Django a good choice for a security critical application? | 499,599 | 8 | 22 | 8,593 | 0 | python,django,security | The reasons for building banking apps in Java are not related to security, at least IMHO. They are related to:
Java is the COBOL of the 21st century, so there is a lot of legacy code that would have to be rewritten and that takes time. Basically banking apps are old apps, they were built in java some ten years ago and... | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 1 | false | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Is Django a good choice for a security critical application? | 499,670 | 4 | 22 | 8,593 | 0 | python,django,security | I find your connection between Java and banking wrong ended.
Most Banking Software has terrible security. And much banking software is written in Java. Does ths mean Java makes it more difficult to write secure software than other languages?
Probably it's not Java's fault that there is so little quality security (and s... | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 0.113791 | false | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Is Django a good choice for a security critical application? | 499,065 | 0 | 22 | 8,593 | 0 | python,django,security | Are you referring to the fact that the complete application is built in Java, or just the part you see in your browser? If the latter, the reason is probably because in the context of webpages, Java applets can be downloaded and run. | 0 | 0 | 0 | 0 | 2009-01-31T10:46:00.000 | 7 | 0 | false | 498,630 | 0 | 0 | 1 | 7 | Is Django a good choice for a security critical application?
I am asking this because most of the online banking software is built using Java. Is there any real reason for this? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.