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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Is Django a good choice for a security critical application? | 2,654,928 | 1 | 22 | 8,593 | 0 | python,django,security | You can build a secure application with Django just as you can with any popular Java framework. One part where Java does shine is its extensive cryptographic library.
For the minimal encryption tasks that are required by Django, Python’s cryptographic services are sufficient, however its lack of strong block ciphers ma... | 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? |
Can I log into a web application automatically using a users windows logon? | 500,260 | 0 | 3 | 4,695 | 0 | python,authentication,web-applications,windows-authentication | To the best of my knowledge the only browser that automatically passes your login credentials is Internet Explorer. To enable this feature select "Enable Integrated Windows Authentication" in the advanced Internet options dialog under the security section. This is usually enabled by default.
The web server will ha... | 0 | 0 | 0 | 0 | 2009-02-01T03:37:00.000 | 3 | 0 | false | 500,134 | 0 | 0 | 1 | 1 | On the intranet at my part time job (not IT related) there are various web applications that we use that do not require logging in explicitly. We are required to login to Windows obviously, and that then authenticates us some how.
I'm wondering how this is done? Without worrying about security TOO much, how would I go ... |
Using web.py as non blocking http-server | 501,570 | 1 | 17 | 7,054 | 0 | python,multithreading,web-services,web.py | Wouldn't is be simpler to re-write your main-loop code to be a function that you call over and over again, and then call that from the function that you pass to runsimple...
It's guaranteed not to fully satisfy your requirements, but if you're in a rush, it might be easiest. | 0 | 0 | 1 | 0 | 2009-02-01T14:47:00.000 | 4 | 0.049958 | false | 500,935 | 0 | 0 | 1 | 1 | while learning some basic programming with python, i found web.py. i
got stuck with a stupid problem:
i wrote a simple console app with a main loop that proccesses items
from a queue in seperate threads. my goal is to use web.py to add
items to my queue and report status of the queue via web request. i
got this running... |
pure web based versioning system | 513,899 | 0 | 2 | 1,960 | 0 | php,python,version-control,web-applications | Why dont you want a client..? A simple client that you can run on your production machine which then syncs to your repository running on another server somewhere.
SVN is available over HTTP so writing a client that is able to sync your code is really easy in python or php. | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 0 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
pure web based versioning system | 513,366 | 1 | 2 | 1,960 | 0 | php,python,version-control,web-applications | I think it's actually a pretty good idea, but don't believe such a versioning system exists (yet) so hopefully you'll go ahead and make one.
I don't think adapting an existing solution is going to be easy, but it's probably worth looking into because if you use an existing solution you'll have all the client support do... | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 0.024995 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
pure web based versioning system | 513,231 | 7 | 2 | 1,960 | 0 | php,python,version-control,web-applications | Get a better hosting service. Seriously. Even if you found something that worked in PHP/Ruby/Perl/Whatever, it would still be a sub-par solution. It most likely wouldn't integrate with any IDE you have, and wouldn't have a good tool set available for working with it. It would be really clunky to do correctly.
The o... | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 1 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
pure web based versioning system | 513,253 | 0 | 2 | 1,960 | 0 | php,python,version-control,web-applications | you could try the reverse way
use e.g. a free online svn/git Service to version control the sources on your dev machine
use usual ways to update the "production" machine aka site, like FTP | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 0 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
pure web based versioning system | 515,956 | 1 | 2 | 1,960 | 0 | php,python,version-control,web-applications | Use Bazaar:
Lightweight. No dedicated server with Bazaar installed is needed, just FTP access to a web server. A smart server is available for those requiring additional performance or security but it is not required in many cases - Bazaar 1.x over plain http performs well. | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 0.024995 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
pure web based versioning system | 513,322 | 2 | 2 | 1,960 | 0 | php,python,version-control,web-applications | Don't host your repository on your web server. Deploy from your server to the ftp/sftp - whatever. | 0 | 0 | 0 | 1 | 2009-02-04T20:34:00.000 | 8 | 0.049958 | false | 513,173 | 0 | 0 | 1 | 6 | My hosting service does not currently run/allow svn, git, cvs on their server. I would really like to be able to 'sync' my current source on my development machine with my production server.
I am looking for a pure php/python/ruby version control system (not just a client for a version control system) that does not re... |
Mixed language source directory layout | 518,493 | 2 | 5 | 1,166 | 0 | java,python,sql,directory | I think the best thing to do would be to ensure that your various modules don't depend upon being in the same directory (i.e. separate by component). A lot of people seem to be deathly afraid of this idea, but a good set of build scripts should be able to automate away any pain.
The end goal would be to make it easy t... | 0 | 0 | 0 | 1 | 2009-02-05T16:57:00.000 | 2 | 0.197375 | false | 516,798 | 1 | 0 | 1 | 1 | We are running a large project with several different languages: Java, Python, PHP, SQL and Perl.
Until now people have been working in their own private repositories, but now we want to merge the entire project in a single repository. The question now is: how should the directory structure look? Should we have separa... |
How to work with unsaved many-to-many relations in django? | 518,290 | 6 | 8 | 4,822 | 0 | python,django,django-models,many-to-many | I would add a field which indicates whether the objects are "draft" or "live". That way they are persisted across requests, sessions, etc. and django stops complaining.
You can then filter your objects to only show "live" objects in public views and only show "draft" objects to the user that created them. This can als... | 0 | 0 | 0 | 0 | 2009-02-05T22:01:00.000 | 3 | 1 | false | 518,162 | 0 | 0 | 1 | 1 | I have a couple of models in django which are connected many-to-many. I want to create instances of these models in memory, present them to the user (via custom method-calls inside the view-templates) and if the user is satisfied, save them to the database.
However, if I try to do anything on the model-instances (call ... |
How to externally populate a Django model? | 524,414 | 2 | 8 | 7,525 | 0 | python,django,django-models | I've used cron to update my DB using both a script and a view. From cron's point of view it doesn't really matter which one you choose. As you've noted, though, it's hard to beat the simplicity of firing up a browser and hitting a URL if you ever want to update at a non-scheduled interval.
If you go the view route, i... | 0 | 0 | 0 | 0 | 2009-02-07T17:54:00.000 | 4 | 0.099668 | false | 524,214 | 0 | 0 | 1 | 1 | What is the best idea to fill up data into a Django model from an external source?
E.g. I have a model Run, and runs data in an XML file, which changes weekly.
Should I create a view and call that view URL from a curl cronjob (with the advantage that that data can be read anytime, not only when the cronjob runs), or cr... |
How would you set up a python web server with multiple vhosts? | 537,504 | 1 | 1 | 1,401 | 0 | python,webserver,environment,wsgi | I'd recommend Nginx for the web server. Fast and easy to set up.
You'd probably want to have one unix user per vhost - so every home directory holds its own application, python environment and server configuration. This allows you to restart a particular app safely, simply by killing worker processes that your vhost o... | 0 | 0 | 0 | 0 | 2009-02-11T15:46:00.000 | 3 | 0.066568 | false | 537,399 | 1 | 0 | 1 | 1 | I've been told wsgi is the way to go and not mod_python. But more specifically, how would you set up your multi website server environment? Choice of web server, etc? |
Are there any good build frameworks written in Python? | 3,838,805 | 2 | 16 | 2,630 | 0 | python,build-process,build-automation | My Rapid Throughts:
SCons is quite mature and oriented also to other languages (es C++)
Waf is very simlar to ant/maven, so you will prefer it if you are used to ant/maven
Paver is very pythonic oriented, and seems a good option if you do not know how to start. | 0 | 0 | 0 | 1 | 2009-02-12T16:59:00.000 | 5 | 0.07983 | false | 542,289 | 0 | 0 | 1 | 1 | I switched from NAnt to using Python to write build automation scripts. I am curious if whether any build frameworks worth using that are similar to Make, Ant, and NAnt, but, instead, are Python-based. For example, Ruby has Rake. What about Python? |
Should I use Django's contrib applications or build my own? | 542,685 | 7 | 3 | 297 | 0 | python,django,django-contrib | It all depends. We had a need for something that was 98% similar to contrib.flatpages. We could have monkeypatched it, but we decided that the code was so straightforward that we would just copy and fork it. It worked out fine.
Doing this with contrib.auth, on the other hand, might be a bad move given its interaction w... | 0 | 0 | 0 | 0 | 2009-02-12T18:10:00.000 | 3 | 1.2 | true | 542,594 | 0 | 0 | 1 | 2 | The Django apps come with their own features and design. If your requirements don't match 100% with the features of the contib app, you end up customizing and tweaking the app. I feel this involves more effort than just building your own app to fit your requirements.
What do you think? |
Should I use Django's contrib applications or build my own? | 543,335 | 4 | 3 | 297 | 0 | python,django,django-contrib | Most of the apps in django.contrib are written very well and are highly extensible.
Don't like quite how comments works? Subclass the models and forms within it, adding your own functionality and you have a working comment system that fits your sites schema, with little effort.
I think the best part when you extend the... | 0 | 0 | 0 | 0 | 2009-02-12T18:10:00.000 | 3 | 0.26052 | false | 542,594 | 0 | 0 | 1 | 2 | The Django apps come with their own features and design. If your requirements don't match 100% with the features of the contib app, you end up customizing and tweaking the app. I feel this involves more effort than just building your own app to fit your requirements.
What do you think? |
Tool (or combination of tools) for reproducible environments in Python | 545,839 | 0 | 9 | 1,538 | 0 | python,continuous-integration,installation,development-environment,automated-deploy | I do exactly this with a combination of setuptools and Hudson. I know Hudson is a java app, but it can run Python stuff just fine. | 0 | 1 | 0 | 0 | 2009-02-13T12:20:00.000 | 7 | 0 | false | 545,730 | 0 | 0 | 1 | 1 | I used to be a java developer and we used tools like ant or maven to manage our development/testing/UAT environments in a standardized way. This allowed us to handle library dependencies, setting OS variables, compiling, deploying, running unit tests, and all the required tasks. Also, the scripts generated guaranteed t... |
Simple unique non-priority queue system | 549,555 | 1 | 1 | 2,069 | 0 | python,queue | Why not use a list if you need order (or even a heapq, as was formerly suggested by zacherates before a set was suggested instead) and also use a set to check for duplicates? | 0 | 0 | 1 | 0 | 2009-02-14T18:44:00.000 | 5 | 0.039979 | false | 549,536 | 0 | 0 | 1 | 1 | I'm working on a simple web crawler in python and I wan't to make a simple queue class, but I'm not quite sure the best way to start. I want something that holds only unique items to process, so that the crawler will only crawl each page once per script run (simply to avoid infinite looping). Can anyone give me or poin... |
Favorite Django Tips & Features? | 551,499 | 35 | 308 | 62,526 | 0 | python,django,hidden-features | Add assert False in your view code to dump debug information. | 0 | 0 | 0 | 0 | 2009-02-15T10:06:00.000 | 55 | 1 | false | 550,632 | 0 | 0 | 1 | 1 | Inspired by the question series 'Hidden features of ...', I am curious to hear about your favorite Django tips or lesser known but useful features you know of.
Please, include only one tip per answer.
Add Django version requirements if there are any. |
Python or Ruby for a .NET developer? | 552,734 | 16 | 12 | 1,835 | 0 | python,ruby-on-rails,ruby,comparison | Both languages are powerful and fun. Either would be a useful addition to your tool box.
Python has a larger community and probably more mature documentation and libraries. Its object-orientation is a little inconsistent and feels (to me, IMHO) like something that was bolted on to the language. You can alter class beha... | 0 | 0 | 0 | 1 | 2009-02-15T19:45:00.000 | 8 | 1.2 | true | 551,465 | 1 | 0 | 1 | 5 | I'm a C# .NET developer and I work on mostly ASP.NET projects.
I want to learn a new programming language,
to improve my programming skills by experiencing a new language,
to see something different then microsoft environment,
and maybe to think in a different way.
I focus on two languages for my goal. Python and Ru... |
Python or Ruby for a .NET developer? | 551,484 | 6 | 12 | 1,835 | 0 | python,ruby-on-rails,ruby,comparison | First... good for you for wanting to broaden your knowledge! Second, you are comparing a language (Python) with a web framework (Ruby on Rails).
I think your best option is to try a few different frameworks in both Python and Ruby, do the same fairly simple task in each, and only then pick which one you'd like to learn... | 0 | 0 | 0 | 1 | 2009-02-15T19:45:00.000 | 8 | 1 | false | 551,465 | 1 | 0 | 1 | 5 | I'm a C# .NET developer and I work on mostly ASP.NET projects.
I want to learn a new programming language,
to improve my programming skills by experiencing a new language,
to see something different then microsoft environment,
and maybe to think in a different way.
I focus on two languages for my goal. Python and Ru... |
Python or Ruby for a .NET developer? | 552,177 | 2 | 12 | 1,835 | 0 | python,ruby-on-rails,ruby,comparison | Rule of thumb - Python if you like strict rules and Ruby if you hate them.
Another one: if you adore JavaScript - Ruby is your choice :) | 0 | 0 | 0 | 1 | 2009-02-15T19:45:00.000 | 8 | 0.049958 | false | 551,465 | 1 | 0 | 1 | 5 | I'm a C# .NET developer and I work on mostly ASP.NET projects.
I want to learn a new programming language,
to improve my programming skills by experiencing a new language,
to see something different then microsoft environment,
and maybe to think in a different way.
I focus on two languages for my goal. Python and Ru... |
Python or Ruby for a .NET developer? | 555,166 | 2 | 12 | 1,835 | 0 | python,ruby-on-rails,ruby,comparison | What? No mention of IronPython?
IronPython is the flagship language of the DLR. It allows you to use all the familiar .NET libraries, but through Python.
I would definitely try Python and IronPython. You'll learn a lot and might even sneak it into your current projects (you can embed an IronPython engine in a .NET appl... | 0 | 0 | 0 | 1 | 2009-02-15T19:45:00.000 | 8 | 0.049958 | false | 551,465 | 1 | 0 | 1 | 5 | I'm a C# .NET developer and I work on mostly ASP.NET projects.
I want to learn a new programming language,
to improve my programming skills by experiencing a new language,
to see something different then microsoft environment,
and maybe to think in a different way.
I focus on two languages for my goal. Python and Ru... |
Python or Ruby for a .NET developer? | 552,126 | 0 | 12 | 1,835 | 0 | python,ruby-on-rails,ruby,comparison | I'd get in on Ruby. Seems to have a larger (or at least more active) community, the pace of new projects & continued development is second-to-none, and the learning resources seem to outnumber & outpace those of Python. I could be wrong, but these are my impressions. | 0 | 0 | 0 | 1 | 2009-02-15T19:45:00.000 | 8 | 0 | false | 551,465 | 1 | 0 | 1 | 5 | I'm a C# .NET developer and I work on mostly ASP.NET projects.
I want to learn a new programming language,
to improve my programming skills by experiencing a new language,
to see something different then microsoft environment,
and maybe to think in a different way.
I focus on two languages for my goal. Python and Ru... |
How to get distinct Django apps on same subdomain to share session cookie? | 659,606 | 8 | 8 | 6,592 | 0 | python,django,deployment,session,cookies | I agree that sharing sessions between Django instances is probably not a good idea. If you really wanted to, you could:
make sure the two django applications share the same SECRET_KEY
make sure the two django applications share the same SeSSON_COOKIE_NAME
make sure the SESSION_COOKIE_DOMAIN is set to something that le... | 0 | 0 | 0 | 0 | 2009-02-17T13:58:00.000 | 2 | 1 | false | 556,907 | 0 | 0 | 1 | 2 | We have a couple of Django applications deployed on the same subdomain. A few power users need to jump between these applications. I noticed that each time they bounce between applications their session cookie receives a new session ID from Django.
I don't use the Django session table much except in one complex wor... |
How to get distinct Django apps on same subdomain to share session cookie? | 557,020 | 18 | 8 | 6,592 | 0 | python,django,deployment,session,cookies | I would instead advise you to set SESSION_COOKIE_NAME to different values for the two apps. Your users will still have to log in twice initially, but their sessions won't conflict - if they log in to app A, then app B, and return to A, they'll still have their A session.
Sharing sessions between Django instances is pro... | 0 | 0 | 0 | 0 | 2009-02-17T13:58:00.000 | 2 | 1.2 | true | 556,907 | 0 | 0 | 1 | 2 | We have a couple of Django applications deployed on the same subdomain. A few power users need to jump between these applications. I noticed that each time they bounce between applications their session cookie receives a new session ID from Django.
I don't use the Django session table much except in one complex wor... |
How to re-use a reusable app in Django | 3,710,136 | 2 | 22 | 3,945 | 0 | python,django,code-reuse | An old question, but here's what I do:
If you're using a version control system (VCS), I suggest putting all of the reusable apps and libraries (including django) that your software needs in the VCS. If you don't want to put them directly under your project root, you can modify settings.py to add their location to sys.... | 0 | 0 | 0 | 0 | 2009-02-17T14:50:00.000 | 2 | 0.197375 | false | 557,171 | 0 | 0 | 1 | 1 | I am trying to create my first site in Django and as I'm looking for example apps out there to draw inspiration from, I constantly stumble upon a term called "reusable apps".
I understand the concept of an app that is reusable easy enough, but the means of reusing an app in Django are quite lost for me. Few questions ... |
Eclipse PyDev: setting breakpoints in site-packages source | 561,957 | 5 | 5 | 4,282 | 0 | python,django,eclipse,pydev | Have you imported the Django source as a project? To do that you just create a new PyDev project and set it's location to the Django source folder. | 0 | 0 | 0 | 0 | 2009-02-17T22:25:00.000 | 4 | 1.2 | true | 558,999 | 0 | 0 | 1 | 2 | I am debugging a problem in Django with Pydev.
I can set breakpoint in my django project code with out a problem.
However I can't set breakpoints in the Django library source code (in site-packages).
The PyDev debugger user interface in this case simply does nothing when I click to set the breakpoint and does not bre... |
Eclipse PyDev: setting breakpoints in site-packages source | 2,516,750 | 0 | 5 | 4,282 | 0 | python,django,eclipse,pydev | PyDev 1.5.5 seems to have an issue with Eclipse. Uninstall 1.5.5 and install the 1.5.4 version | 0 | 0 | 0 | 0 | 2009-02-17T22:25:00.000 | 4 | 0 | false | 558,999 | 0 | 0 | 1 | 2 | I am debugging a problem in Django with Pydev.
I can set breakpoint in my django project code with out a problem.
However I can't set breakpoints in the Django library source code (in site-packages).
The PyDev debugger user interface in this case simply does nothing when I click to set the breakpoint and does not bre... |
Check whether a PDF-File is valid with Python | 584,225 | 0 | 22 | 32,854 | 0 | python,file,pdf | By valid do you mean that it can be displayed by a PDF viewer, or that the text can be extracted? They are two very different things.
If you just want to check that it really is a PDF file that has been uploaded then the pyPDF solution, or something similar, will work.
If, however, you want to check that the text can ... | 0 | 0 | 0 | 0 | 2009-02-17T22:53:00.000 | 7 | 0 | false | 559,096 | 0 | 0 | 1 | 1 | I get a File via a HTTP-Upload and need to be sure its a pdf-file. Programing Language is Python, but this should not matter.
I thought of the following solutions:
Check if the first bytes of the string are "%PDF". This is not a good check but prevents the use from uploading other files accidentally.
Try the libmagic... |
Anybody tried mosso CloudFiles with Google AppEngine? | 564,966 | 1 | 1 | 310 | 0 | python,google-app-engine,storage,cloud,mosso | It appears to implement a simple RESTful API, so there's no reason you couldn't use it from App Engine. Previously, you'd have had to write your own library to do so, using App Engine's urlfetch API, but with the release of SDK 1.1.9, you can now use urllib and httplib instead. | 0 | 1 | 0 | 0 | 2009-02-19T09:01:00.000 | 1 | 1.2 | true | 564,460 | 0 | 0 | 1 | 1 | I'm wondering if anybody tried to integrate mosso CloudFiles with an application running on Google AppEngine (mosso does not provide testing sandbox so I cann't check for myself without registering)? Looking at the code it seems that this will not work due to httplib and urllib limitations in AppEngine environment, but... |
Parsing HTML generated from Legacy ASP Application to create ASP.NET 2.0 Pages | 568,228 | 0 | 0 | 307 | 0 | c#,.net,python,html | Just found HTML agility pack to be useful enough, as they understand C# better than python. | 0 | 0 | 0 | 0 | 2009-02-19T13:19:00.000 | 3 | 0 | false | 565,264 | 0 | 0 | 1 | 2 | One of my friends is working on having a good solution to generate aspx pages, out of html pages generated from a legacy asp application.
The idea is to run the legacy app, capture html output, clean the html using some tool (say HtmlTidy) and parse it/transform it to aspx, (using Xslt or a custom tool) so that existi... |
Parsing HTML generated from Legacy ASP Application to create ASP.NET 2.0 Pages | 1,664,516 | 0 | 0 | 307 | 0 | c#,.net,python,html | I know this is an old question, but in a similar situation (50k+ legacy ASP pages that need to display in a .NET framework), I did the following.
Created a rewrite engine (HttpModule) which catches all incoming requests and looks for anything that is from the old site.
(in a separate class - keep things organized!) us... | 0 | 0 | 0 | 0 | 2009-02-19T13:19:00.000 | 3 | 0 | false | 565,264 | 0 | 0 | 1 | 2 | One of my friends is working on having a good solution to generate aspx pages, out of html pages generated from a legacy asp application.
The idea is to run the legacy app, capture html output, clean the html using some tool (say HtmlTidy) and parse it/transform it to aspx, (using Xslt or a custom tool) so that existi... |
Preventing BeautifulSoup from converting my XML tags to lowercase | 568,081 | 4 | 10 | 1,662 | 0 | python,xml,beautifulsoup | No, that's not a built-in option. The source is pretty straightforward, though. It looks like you want to change the value of encodedName in Tag.__str__. | 0 | 0 | 1 | 0 | 2009-02-20T01:52:00.000 | 2 | 1.2 | true | 567,999 | 0 | 0 | 1 | 1 | I am using BeautifulStoneSoup to parse an XML document and change some attributes. I noticed that it automatically converts all XML tags to lowercase. For example, my source file has <DocData> elements, which BeautifulSoup converts to <docdata>.
This appears to be causing problems since the program I am feeding my modi... |
Django: multiple models in one template using forms | 569,763 | 3 | 124 | 119,625 | 0 | python,django,django-forms | "I want to hide some of the fields and do some complex validation."
I start with the built-in admin interface.
Build the ModelForm to show the desired fields.
Extend the Form with the validation rules within the form. Usually this is a clean method.
Be sure this part works reasonably well.
Once this is done, you can... | 0 | 0 | 0 | 0 | 2009-02-20T12:50:00.000 | 7 | 0.085505 | false | 569,468 | 0 | 0 | 1 | 1 | I'm building a support ticket tracking app and have a few models I'd like to create from one page. Tickets belong to a Customer via a ForeignKey. Notes belong to Tickets via a ForeignKey as well. I'd like to have the option of selecting a Customer (that's a whole separate project) OR creating a new Customer, then creat... |
Set up a scheduled job? | 7,287,891 | 2 | 567 | 206,437 | 0 | python,django,web-applications,scheduled-tasks | I had something similar with your problem today.
I didn't wanted to have it handled by the server trhough cron (and most of the libs were just cron helpers in the end).
So i've created a scheduling module and attached it to the init .
It's not the best approach, but it helps me to have all the code in a single place an... | 0 | 0 | 0 | 0 | 2009-02-21T19:39:00.000 | 24 | 0.016665 | false | 573,618 | 0 | 0 | 1 | 1 | I've been working on a web app using Django, and I'm curious if there is a way to schedule a job to run periodically.
Basically I just want to run through the database and make some calculations/updates on an automatic, regular basis, but I can't seem to find any documentation on doing this.
Does anyone know how to se... |
How do YOU deploy your WSGI application? (and why it is the best way) | 612,622 | 3 | 42 | 14,313 | 0 | python,deployment,wsgi | Apache httpd + mod_fcgid using web.py (which is a wsgi application).
Works like a charm. | 0 | 0 | 0 | 1 | 2009-02-22T00:58:00.000 | 9 | 0.066568 | false | 574,068 | 0 | 0 | 1 | 4 | Deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this.
So how can it be done?
Apache Mod-wsgi (the other mod-wsgi's seem to not be worth it)
Pure Python web server eg paste, cherrypy, Spawning, Twisted.web
as 2 bu... |
How do YOU deploy your WSGI application? (and why it is the best way) | 612,607 | 1 | 42 | 14,313 | 0 | python,deployment,wsgi | We are using pure Paste for some of our web services. It is easy to deploy (with our internal deployment mechanism; we're not using Paste Deploy or anything like that) and it is nice to minimize the difference between production systems and what's running on developers' workstations. Caveat: we don't expect low laten... | 0 | 0 | 0 | 1 | 2009-02-22T00:58:00.000 | 9 | 0.022219 | false | 574,068 | 0 | 0 | 1 | 4 | Deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this.
So how can it be done?
Apache Mod-wsgi (the other mod-wsgi's seem to not be worth it)
Pure Python web server eg paste, cherrypy, Spawning, Twisted.web
as 2 bu... |
How do YOU deploy your WSGI application? (and why it is the best way) | 616,720 | 1 | 42 | 14,313 | 0 | python,deployment,wsgi | Apache+mod_wsgi,
Simple, clean. (only four lines of webserver config), easy for other sysadimns to get their head around. | 0 | 0 | 0 | 1 | 2009-02-22T00:58:00.000 | 9 | 0.022219 | false | 574,068 | 0 | 0 | 1 | 4 | Deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this.
So how can it be done?
Apache Mod-wsgi (the other mod-wsgi's seem to not be worth it)
Pure Python web server eg paste, cherrypy, Spawning, Twisted.web
as 2 bu... |
How do YOU deploy your WSGI application? (and why it is the best way) | 635,680 | 6 | 42 | 14,313 | 0 | python,deployment,wsgi | Nginx reverse proxy and static file sharing + XSendfile + uploadprogress_module. Nothing beats it for the purpose.
On the WSGI side either Apache + mod_wsgi or cherrypy server. I like to use cherrypy wsgi server for applications on servers with less memory and less requests.
Reasoning:
I've done benchmarks with differe... | 0 | 0 | 0 | 1 | 2009-02-22T00:58:00.000 | 9 | 1 | false | 574,068 | 0 | 0 | 1 | 4 | Deploying a WSGI application. There are many ways to skin this cat. I am currently using apache2 with mod-wsgi, but I can see some potential problems with this.
So how can it be done?
Apache Mod-wsgi (the other mod-wsgi's seem to not be worth it)
Pure Python web server eg paste, cherrypy, Spawning, Twisted.web
as 2 bu... |
Python web programming | 582,467 | 1 | 12 | 2,349 | 0 | python,cherrypy | When you use mod_python on a threaded Apache server (the default on Windows), CherryPy runs in the same process as Apache. In that case, you almost certainly don't want CP to restart the process.
Solution: use mod_rewrite or mod_proxy so that CherryPy runs in its own process. Then you can autoreload to your heart's con... | 0 | 0 | 0 | 0 | 2009-02-24T09:15:00.000 | 5 | 0.039979 | false | 581,038 | 0 | 0 | 1 | 2 | Good morning.
As the title indicates, I've got some questions about using python for web development.
What is the best setup for a development environment, more specifically, what webserver to use, how to bind python with it. Preferably, I'd like it to be implementable in both, *nix and win environment.
My major conc... |
Python web programming | 581,356 | 8 | 12 | 2,349 | 0 | python,cherrypy | What is the best setup for a development environment?
Doesn't much matter. We use Django, which runs in Windows and Unix nicely. For production, we use Apache in Red Hat.
Is having to reload webserver to see the changes considered normal?
Yes. Not clear why you'd want anything different. Web application software sh... | 0 | 0 | 0 | 0 | 2009-02-24T09:15:00.000 | 5 | 1 | false | 581,038 | 0 | 0 | 1 | 2 | Good morning.
As the title indicates, I've got some questions about using python for web development.
What is the best setup for a development environment, more specifically, what webserver to use, how to bind python with it. Preferably, I'd like it to be implementable in both, *nix and win environment.
My major conc... |
What are good ways to upload bulk .csv data into a webapp using Django/Python? | 588,212 | 1 | 2 | 2,198 | 0 | jquery,python,django,django-models,csv | Look at csv module from stdlib. It contains presets for popualr CSV dialects like one produced by Excel.
Reader class support field mapping and if file contains column header it coes not depend on column order. For more complex logic, like looking up several alternative names for a field, you'll need to write your ow... | 0 | 0 | 0 | 0 | 2009-02-25T15:39:00.000 | 6 | 0.033321 | false | 586,517 | 0 | 0 | 1 | 2 | I have a very basic CSV file upload module working to bulk upload my user's data into my site. I process the CSV file in the backend with a python script that runs on crontab and then email the user the results of the bulk upload. This process works ok operationally, but my issue is with the format of the csv file. ... |
What are good ways to upload bulk .csv data into a webapp using Django/Python? | 586,694 | 1 | 2 | 2,198 | 0 | jquery,python,django,django-models,csv | If you'll copy excel table into clipboard and then paste results into notepad, you'll notice that it's tab separated. I once used it to make bulk import from most of table editors by copy-pasting data from the editor into textarea on html page.
You can use a background for textarea as a hint for number of columns and p... | 0 | 0 | 0 | 0 | 2009-02-25T15:39:00.000 | 6 | 0.033321 | false | 586,517 | 0 | 0 | 1 | 2 | I have a very basic CSV file upload module working to bulk upload my user's data into my site. I process the CSV file in the backend with a python script that runs on crontab and then email the user the results of the bulk upload. This process works ok operationally, but my issue is with the format of the csv file. ... |
Is there a Django apps pattern equivalent in Google App Engine? | 591,169 | 3 | 3 | 715 | 0 | python,django,design-patterns,google-app-engine,django-apps | The Django implementation of apps is closely tied to Django operation as a framework - I mean plugging application using Django url mapping features (for mapping urls to view functions) and Django application component discovery (for discovering models and admin configuration). There is no such mechanisms in WebApp (I ... | 0 | 1 | 0 | 0 | 2009-02-25T23:09:00.000 | 2 | 1.2 | true | 588,342 | 0 | 0 | 1 | 1 | Django has a very handy pattern known as "apps". Essentially, a self-contained plug-in that requires a minimal amount of wiring, configuring, and glue code to integrate into an existing project. Examples are tagging, comments, contact-form, etc. They let you build up large projects by gathering together a collection... |
Does the stack limit of Symbian also apply to PyS60? | 595,330 | 3 | 3 | 417 | 0 | python,symbian,nokia,pys60 | Yes, PyS60 is based on CPython, thus uses the C stack. | 1 | 0 | 0 | 0 | 2009-02-27T15:48:00.000 | 4 | 0.148885 | false | 595,296 | 0 | 0 | 1 | 4 | Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps? |
Does the stack limit of Symbian also apply to PyS60? | 606,180 | 1 | 3 | 417 | 0 | python,symbian,nokia,pys60 | Increasing the Symbian stack size is done through a parameter in the mmp file.
This is valid when you create a native application that the toolchain will turn into an exe file.
If you were to upgrade the Python runtime on your phone, with a version you built yourself, you could increase the stack size of the runtime pr... | 1 | 0 | 0 | 0 | 2009-02-27T15:48:00.000 | 4 | 0.049958 | false | 595,296 | 0 | 0 | 1 | 4 | Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps? |
Does the stack limit of Symbian also apply to PyS60? | 685,145 | 0 | 3 | 417 | 0 | python,symbian,nokia,pys60 | I would assume that PyS60 should be doing the memory management for you, as your program will probably be constrained by the resources of PyS60. | 1 | 0 | 0 | 0 | 2009-02-27T15:48:00.000 | 4 | 0 | false | 595,296 | 0 | 0 | 1 | 4 | Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps? |
Does the stack limit of Symbian also apply to PyS60? | 915,134 | 1 | 3 | 417 | 0 | python,symbian,nokia,pys60 | There is a difference between python runtime and python apps. Also from PyS60 app developer point of view, it's the heapsize that's more interesting...
Version 1.9.5 comes by default with heapsize 100k min and 4M max. Of course you can define those by yourself when creating the SIS package to release and distribute you... | 1 | 0 | 0 | 0 | 2009-02-27T15:48:00.000 | 4 | 1.2 | true | 595,296 | 0 | 0 | 1 | 4 | Symbian has a stack limit of 8kB. Does this also apply to the function calling in PyS60 apps? |
FOSS HTML to PDF in Python, .Net or command line? | 597,840 | 0 | 0 | 1,517 | 0 | c#,.net,python,html-to-pdf | You can also try different approach like using virtual printers. | 0 | 0 | 0 | 0 | 2009-02-28T01:56:00.000 | 5 | 0 | false | 597,348 | 0 | 0 | 1 | 1 | I have google as much as I possible, checked stackoverflow several times, and yet I can not find a good html to pdf converter that can handle css. Is there a free and open source solution (even for commercial usage)? There are many solutions, with huge variety of price ranges, but I was looking for something open sou... |
What SHOULDN'T Django's admin interface be used for? | 599,054 | 5 | 4 | 352 | 0 | python,django,administration | Generally, you shouldn't use the admin for access by people you don't really trust. Even though there's plenty of flexibility in terms of locking things down and controlling access (much more so since Django 1.0), the admin is still designed on the assumption that the people using it are trusted members of your staff. | 0 | 0 | 0 | 0 | 2009-02-28T20:00:00.000 | 2 | 0.462117 | false | 598,577 | 0 | 0 | 1 | 2 | I've been applying Django's automatic administration capabilities to some applications who had previously been very difficult to administer. I'm thinking of a lot of ways to apply it to other applications we use (including using it to replace some internal apps altogether). Before I go overboard though, is there anyt... |
What SHOULDN'T Django's admin interface be used for? | 598,580 | 7 | 4 | 352 | 0 | python,django,administration | User-specific privileges. I myself had been trying to work it into that-- some of the new (and at least at the time, undocumented) features (from newforms-admin) make it actually possible. Depending on how fine you want the control to be, though, you can end up getting very, very deep into the Django/admin internals. J... | 0 | 0 | 0 | 0 | 2009-02-28T20:00:00.000 | 2 | 1.2 | true | 598,577 | 0 | 0 | 1 | 2 | I've been applying Django's automatic administration capabilities to some applications who had previously been very difficult to administer. I'm thinking of a lot of ways to apply it to other applications we use (including using it to replace some internal apps altogether). Before I go overboard though, is there anyt... |
How to make Satchmo work in Google App Engine | 833,823 | 2 | 4 | 1,984 | 0 | python,google-app-engine,e-commerce,satchmo | Nothing is impossible - this will just require lots of effort - if there will be somebody wishing to do so - why not? But it might be easier (cheaper) to get Django friendly hosting instead of spending hours on hacking the code. | 0 | 0 | 0 | 0 | 2009-03-01T18:22:00.000 | 3 | 0.132549 | false | 600,225 | 0 | 0 | 1 | 1 | I understand that there are big differences in data-store, but surely since django is bundled and it abstracts data-store away from Satchmo, something can be done?
Truth is that I am not a Python guy, been mostly Java/PHP thus far, but I am willing to learn.
Plus, if this is not possible today, lets band together and f... |
Should I use GeoDjango for mapping a floor plan? | 614,489 | 1 | 7 | 3,422 | 0 | python,django,mapping,geodjango | How often will the floor plan change? From your description a simple image with a imagemap would suffice. | 0 | 0 | 0 | 0 | 2009-03-02T06:34:00.000 | 4 | 0.049958 | false | 601,442 | 0 | 0 | 1 | 2 | I want to create a floor plan map of an interior space that has clickable regions. My first thought was to investigate GeoDjango since its the mapping app for Django. But considering the dependencies, the learning curve and overall complexity, I'm concerned that I may be trying to swat a fly with a bazooka.
Should I ... |
Should I use GeoDjango for mapping a floor plan? | 613,955 | 5 | 7 | 3,422 | 0 | python,django,mapping,geodjango | I'd say that using GeoDjango for this purpose is definitely overkill.
It could be implemented simply with an image map, or Canvas/SVG or Flash for extra pretty-points :) | 0 | 0 | 0 | 0 | 2009-03-02T06:34:00.000 | 4 | 1.2 | true | 601,442 | 0 | 0 | 1 | 2 | I want to create a floor plan map of an interior space that has clickable regions. My first thought was to investigate GeoDjango since its the mapping app for Django. But considering the dependencies, the learning curve and overall complexity, I'm concerned that I may be trying to swat a fly with a bazooka.
Should I ... |
Store last created model's row in memory | 603,637 | 0 | 0 | 127 | 1 | python,django | You'd either have to use a cache, or fetch the most recent change on each request (since you can't persist objects between requests in-memory).
From what you describe, it sounds as if it's being hit fairly frequently, so the cache is probably the way to go. | 0 | 0 | 0 | 0 | 2009-03-02T11:46:00.000 | 4 | 0 | false | 602,030 | 1 | 0 | 1 | 1 | I am working on ajax-game. The abstract: 2+ gamers(browsers) change a variable which is saved to DB through json. All gamers are synchronized by javascript-timer+json - periodically reading that variable from DB.
In general, all changes are stored in DB as history, but I want the recent change duplicated in memory.
S... |
Differential AJAX updates for HTML table? | 602,381 | 1 | 2 | 981 | 0 | jquery,python,html,dhtml | Without thinking of deltas:
You can use JSON quite easily to do this sort of thing. You can roll out your own compressed format, too.
I think compressing the data using gzip would help a lot. Most browsers nowadays support it, and it will greatly reduce the size of your responses. | 0 | 0 | 0 | 0 | 2009-03-02T13:17:00.000 | 3 | 0.066568 | false | 602,322 | 0 | 0 | 1 | 1 | I have a game that's based on a 25x20 HTML table (the game board). Every 3 seconds the user can "move," which sends an AJAX request to the server, at which time the server rerenders the entire HTML table and sends it to the user.
This was easy to write, but it wastes a lot of bandwidth. Are there any libraries, client ... |
IronPython memory usage | 613,533 | 0 | 2 | 1,344 | 0 | performance,ironpython | Turns out, after aspnet_wp goes to about 500mb, the garbage collector kicks in and cleans out the mess. The memory usage then drops to about 20mb and steadily starts increasing again during load testing.
So there's no memory 'leak' as such. | 1 | 0 | 0 | 1 | 2009-03-04T11:11:00.000 | 3 | 1.2 | true | 610,128 | 0 | 0 | 1 | 2 | I'm hosting IronPython in a c#-based WebService to be able to provide custom extension scripts. However, I'm finding that memory usage sharply increases when I do simple load testing by executing the webservice repeatedly in a loop.
IronPython-1.1 implemented IDisposable on its objects so that you can dispose of them w... |
IronPython memory usage | 611,623 | 1 | 2 | 1,344 | 0 | performance,ironpython | You could try creating a new AppDomain every time you run one of your IronPython scripts. Although assebmlies cannot be unloaded from memory you can unload an AppDomain and this will allow you to get the injected assembly out of memory. | 1 | 0 | 0 | 1 | 2009-03-04T11:11:00.000 | 3 | 0.066568 | false | 610,128 | 0 | 0 | 1 | 2 | I'm hosting IronPython in a c#-based WebService to be able to provide custom extension scripts. However, I'm finding that memory usage sharply increases when I do simple load testing by executing the webservice repeatedly in a loop.
IronPython-1.1 implemented IDisposable on its objects so that you can dispose of them w... |
Django Model Inheritance. Hiding or removing fields | 611,725 | 4 | 10 | 6,399 | 0 | python,python-3.x,django,django-models,django-admin | If you are inheriting the model then it is probably not wise to attempt to hide or disable any existing fields. The best thing you could probably do is exactly what you suggested: override save() and handle your logic in there. | 0 | 0 | 0 | 0 | 2009-03-04T17:49:00.000 | 5 | 1.2 | true | 611,691 | 0 | 0 | 1 | 1 | I want to inherit a model class from some 3rd party code. I won't be using some of the fields but want my client to be able to edit the model in Admin. Is the best bet to hide them from Admin or can I actually prevent them being created in the first place?
Additionally - what can I do if one of the unwanted fields is r... |
Can you give a Django app a verbose name for use throughout the admin? | 612,955 | 6 | 151 | 84,109 | 0 | python,django | No, but you can copy admin template and define app name there. | 0 | 0 | 0 | 0 | 2009-03-04T20:51:00.000 | 14 | 1 | false | 612,372 | 0 | 0 | 1 | 1 | In the same way that you can give fields and models verbose names that appear in the Django admin, can you give an app a custom name? |
Tools to ease executing raw SQL with Django ORM | 620,117 | 3 | 2 | 3,263 | 1 | python,django,orm | Since the issue is "manually converting query results into objects," the simplest solution is often to see if your custom SQL can fit into an ORM .extra() call rather than being a pure-SQL query. Often it can, and then you let the ORM do all the work of building up objects as usual. | 0 | 0 | 0 | 0 | 2009-03-06T16:11:00.000 | 3 | 1.2 | true | 619,384 | 0 | 0 | 1 | 1 | I often need to execute custom sql queries in django, and manually converting query results into objects every time is kinda painful. I wonder how fellow Slackers deal with this. Maybe someone had written some kind of a library to help dealing with custom SQL in Django? |
Choosing and deploying a comet server | 622,509 | 5 | 13 | 7,360 | 0 | python,django,comet,daemon | I would recommend looking into Twisted, their twisted.web server, and the comet work done on top of it at Divmod. They can handle far more concurrent connections than traditional thread or process based servers, which is exactly what you need for something like this. And, yes, I've architected systems using Twisted for... | 0 | 1 | 0 | 0 | 2009-03-07T12:51:00.000 | 6 | 1.2 | true | 621,802 | 0 | 0 | 1 | 1 | I want to push data to the browser over HTTP without killing my django/python application.
I decided to use a comet server, to proxy requests between my application and the client (though I still haven't really figured it out properly).
I've looked into the following engines:
orbited
cometd
ejabberd
jetty
Has anyone ha... |
For my app, how many threads would be optimal? | 623,070 | 13 | 3 | 2,509 | 0 | python,multithreading | You will probably find your application is bandwidth limited not CPU or I/O limited.
As such, add as many as you like until performance begins to degrade.
You may come up against other limits depending on your network setup. Like if you're behind an ADSL router, there will be a limit on the number of concurrent NAT se... | 0 | 0 | 0 | 0 | 2009-03-08T04:44:00.000 | 7 | 1.2 | true | 623,054 | 1 | 0 | 1 | 3 | I have a simple Python web crawler. It uses SQLite to store its output and also to keep a queue. I want to make the crawler multi-threaded so that it can crawl several pages at a time. I figured i would make a thread and just run several instances of the class at once, so they all run concurrently. But the question is,... |
For my app, how many threads would be optimal? | 623,064 | 3 | 3 | 2,509 | 0 | python,multithreading | It's usually simpler to make multiple concurrent processes. Simply use subprocess to create as many Popens as you feel it necessary to run concurrently.
There's no "optimal" number. Generally, when you run just one crawler, your PC spends a lot of time waiting. How much? Hard to say.
When you're running some small ... | 0 | 0 | 0 | 0 | 2009-03-08T04:44:00.000 | 7 | 0.085505 | false | 623,054 | 1 | 0 | 1 | 3 | I have a simple Python web crawler. It uses SQLite to store its output and also to keep a queue. I want to make the crawler multi-threaded so that it can crawl several pages at a time. I figured i would make a thread and just run several instances of the class at once, so they all run concurrently. But the question is,... |
For my app, how many threads would be optimal? | 623,515 | 1 | 3 | 2,509 | 0 | python,multithreading | One thing you should keep in mind is that some servers may interpret too many concurrent requests from the same IP address as a DoS attack and abort connections or return error pages for requests that would otherwise succeed.
So it might be a good idea to limit the number of concurrent requests to the same server to a ... | 0 | 0 | 0 | 0 | 2009-03-08T04:44:00.000 | 7 | 0.028564 | false | 623,054 | 1 | 0 | 1 | 3 | I have a simple Python web crawler. It uses SQLite to store its output and also to keep a queue. I want to make the crawler multi-threaded so that it can crawl several pages at a time. I figured i would make a thread and just run several instances of the class at once, so they all run concurrently. But the question is,... |
What should I be aware of when moving from asp.net to python for web development? | 624,119 | 4 | 3 | 390 | 0 | asp.net,python | I second the note by Out Into Space on how python is a language versus a web framework; it's an important observation that underlies pretty much everything you will experience in moving from ASP.NET to Python.
On a similar note, you will also find that the differences in language style and developer community between C... | 0 | 0 | 0 | 0 | 2009-03-08T18:34:00.000 | 3 | 0.26052 | false | 624,062 | 1 | 0 | 1 | 2 | I'm thinking about converting an app from Asp.net to python. I would like to know: what are the key comparisons to be aware of when moving a asp.net app to python(insert framework)?
Does python have user controls? Master pages? |
What should I be aware of when moving from asp.net to python for web development? | 637,273 | 0 | 3 | 390 | 0 | asp.net,python | Most frameworks for python has a 'templating' engine which provide similar functionality of ASP.NET's Master pages and User Controls. :)
Thanks for the replies Out Of Space and Jarret Hardie | 0 | 0 | 0 | 0 | 2009-03-08T18:34:00.000 | 3 | 0 | false | 624,062 | 1 | 0 | 1 | 2 | I'm thinking about converting an app from Asp.net to python. I would like to know: what are the key comparisons to be aware of when moving a asp.net app to python(insert framework)?
Does python have user controls? Master pages? |
How can I customize the output from pygments? | 624,717 | 1 | 1 | 3,304 | 0 | python,html,css,pygments | Pass full=True to the HtmlFormatter constructor. | 0 | 0 | 0 | 0 | 2009-03-08T21:37:00.000 | 4 | 0.049958 | false | 624,345 | 0 | 0 | 1 | 1 | If I run a python source file through pygments, it outputs html code whose elements class belong to some CSS file pygments is using. Could the style attributes be included in the outputted html so that I don't have to provide a CSS file? |
Using Django admin look and feel in my own application | 625,235 | 4 | 1 | 1,834 | 0 | python,django,django-admin,styles,look-and-feel | Are you sure you want to take every bit of admin-site's look & feel??
I think you would need to customize some, as in header footer etc.
To do that, just copy base.html from
"djangosrc/contrib/admin/templates/admin/"
and keep it in
"your_template_dir/admin/base.html" or
"your_template_dir/admin/mybase.html"
Jus... | 0 | 0 | 0 | 0 | 2009-03-08T23:22:00.000 | 2 | 1.2 | true | 624,535 | 0 | 0 | 1 | 1 | I like the very simple but still really elegant look and feel of the django admin and I was wondering if there is a way to apply it to my own application.
(I think that I've read something like that somewhere, but now I cannot find the page again.)
(edited: what I am looking for is a way to do it automatically by exten... |
Why aren't signals simply called events? | 624,865 | 24 | 4 | 676 | 0 | python,signals,django-signals | Actually, "signals" have been around longer than events have. In the earliest usage, a signal was an asynchronous way for processes to get notified that events had occurred. Since Unix is much older than Django (and since a lot of the Django work came from pydispatcher, where the original stuff was done), the name has ... | 0 | 0 | 0 | 0 | 2009-03-09T02:42:00.000 | 4 | 1.2 | true | 624,844 | 0 | 0 | 1 | 3 | From what I can tell, in Python and and Django, signals are simply delegated events. Is there anything that functionally differentiates them from the typical notion of events in C#, Java, ActionScript, etc? |
Why aren't signals simply called events? | 624,860 | 1 | 4 | 676 | 0 | python,signals,django-signals | You might as well ask "Why aren't events simply called signals?". Differences in terminology happen. | 0 | 0 | 0 | 0 | 2009-03-09T02:42:00.000 | 4 | 0.049958 | false | 624,844 | 0 | 0 | 1 | 3 | From what I can tell, in Python and and Django, signals are simply delegated events. Is there anything that functionally differentiates them from the typical notion of events in C#, Java, ActionScript, etc? |
Why aren't signals simply called events? | 624,855 | 4 | 4 | 676 | 0 | python,signals,django-signals | Signals typically have an association with an operating system facility and events are typically application-defined. In some technology stacks, the OS-level stuff may be hidden well enough that there isn't a difference in the API, but in others perhaps not. | 0 | 0 | 0 | 0 | 2009-03-09T02:42:00.000 | 4 | 0.197375 | false | 624,844 | 0 | 0 | 1 | 3 | From what I can tell, in Python and and Django, signals are simply delegated events. Is there anything that functionally differentiates them from the typical notion of events in C#, Java, ActionScript, etc? |
What will be the upgrade path to Python 3.x for Google App Engine Applications? | 625,632 | 1 | 9 | 4,490 | 0 | python,google-app-engine | The app.yaml syntax already supports multiple languages and multiple API versions, though only one of each (Python, API version 1) is currently supported. Presumably, one of those extension mechanisms will be used to specify that you want Python 3, and it'll be up to you to port your app over to work in Python 3, then ... | 0 | 1 | 0 | 0 | 2009-03-09T04:43:00.000 | 4 | 0.049958 | false | 625,042 | 1 | 0 | 1 | 2 | What is required to make the transition to Python 3.x for Google App Engine?
I know Google App Engine requires the use of at least Python 2.5.
Is it possible to use Python 3.0 already on Google App Engine? |
What will be the upgrade path to Python 3.x for Google App Engine Applications? | 625,130 | 1 | 9 | 4,490 | 0 | python,google-app-engine | At least at the being, Guido was working closely with the team at Google who is building AppEngine. When this option does become available, you will have to edit your main XAML file.
I agree with Chris B. that Python 3.0 support may not be forthcoming too soon, but I'm not sure I agree that it will come sooner than Per... | 0 | 1 | 0 | 0 | 2009-03-09T04:43:00.000 | 4 | 0.049958 | false | 625,042 | 1 | 0 | 1 | 2 | What is required to make the transition to Python 3.x for Google App Engine?
I know Google App Engine requires the use of at least Python 2.5.
Is it possible to use Python 3.0 already on Google App Engine? |
Dump memcache keys from GAE SDK Console? | 626,559 | 8 | 1 | 2,662 | 0 | python,google-app-engine,memcached | People ask for this on the memcached list a lot, sometimes with the same type of "just in case I want to look around to debug something" sentiment.
The best way to handle this is to know how you generate your keys, and just go look stuff up when you want to know what's stored for a given value.
If you have too many thi... | 0 | 1 | 0 | 0 | 2009-03-09T07:49:00.000 | 5 | 1.2 | true | 625,314 | 0 | 0 | 1 | 4 | In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts!
I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul... |
Dump memcache keys from GAE SDK Console? | 625,331 | 4 | 1 | 2,662 | 0 | python,google-app-engine,memcached | No. I did not found such functionality in memcached too.
Thinking about this issue, I found this limitation understandable - it would require keeping a registry of keys with all related problems like key expiration, invalidation and of course locking. Such system would not be as fast as memcaches are intended to be. | 0 | 1 | 0 | 0 | 2009-03-09T07:49:00.000 | 5 | 0.158649 | false | 625,314 | 0 | 0 | 1 | 4 | In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts!
I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul... |
Dump memcache keys from GAE SDK Console? | 626,458 | 0 | 1 | 2,662 | 0 | python,google-app-engine,memcached | Memcache is designed to be quick and there's no convincing use case for this functionality
which would justify the overhead required for a command that is so at odds with the rest of memcached.
The GAE SDK is simulating memcached, so it doesn't offer this functionality either. | 0 | 1 | 0 | 0 | 2009-03-09T07:49:00.000 | 5 | 0 | false | 625,314 | 0 | 0 | 1 | 4 | In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts!
I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul... |
Dump memcache keys from GAE SDK Console? | 660,458 | 0 | 1 | 2,662 | 0 | python,google-app-engine,memcached | The easiest way that I could think of, would be to maintain a memcache key at a known ID, and then append to it every time you insert a new key. This way you could just query for the single key to get a list of existing keys. | 0 | 1 | 0 | 0 | 2009-03-09T07:49:00.000 | 5 | 0 | false | 625,314 | 0 | 0 | 1 | 4 | In the "Memcache Viewer", is there any way to dump a list of existing keys? Just for debugging, of course, not for use in any scripts!
I ask because it doesn't seem like the GAE SDK is using a "real" memcache server, so I'm guessing it's emulated in Python (for simplicity, as it's just a development server).. This woul... |
Is there a way to configure the Application Pool's "Idle timeout" in web.config? | 627,740 | 5 | 15 | 13,542 | 0 | iis,web-config,application-pool,python-idle | Not in IIS 6. In IIS 6, Application Pools are controlled by Worker Processes, which map to a Request Queue handled by HTTP.sys. HTTP.sys handles the communication with the WWW Server to determine when to start and stop Worker Processes.
Since IIS 6 was created before .Net, there's no communication hooks between .Net ... | 0 | 0 | 0 | 0 | 2009-03-09T09:57:00.000 | 3 | 1.2 | true | 625,614 | 0 | 0 | 1 | 1 | I know one can set the session timeout. But, if the application itself has received no requests for a given period of time, IIS shuts down the application.
This behavior is configurable in the IIS management console, and I know how to do this. Still, I wonder if it is possible to configure this in web.config. |
Python equivalent to java.util.SortedSet? | 20,666,684 | 0 | 22 | 9,278 | 0 | python,data-structures | Do you have the possibility of using Jython? I just mention it because using TreeMap, TreeSet, etc. is trivial. Also if you're coming from a Java background and you want to head in a Pythonic direction Jython is wonderful for making the transition easier. Though I recognise that use of TreeSet in this case would not ... | 0 | 0 | 0 | 0 | 2009-03-09T21:58:00.000 | 7 | 0 | false | 628,192 | 1 | 1 | 1 | 1 | Does anybody know if Python has an equivalent to Java's SortedSet interface?
Heres what I'm looking for: lets say I have an object of type foo, and I know how to compare two objects of type foo to see whether foo1 is "greater than" or "less than" foo2. I want a way of storing many objects of type foo in a list L, so th... |
Deploying Google Analytics With Django | 629,888 | 2 | 38 | 19,916 | 0 | python,django,deployment,google-analytics | I mostly agree with Ned, although I have a single setting called IS_LIVE_SITE which toggles analytics code, adverts and a few other things. This way I can keep all the keys in subversion (as it is a pain to look them up) and still toggle them on or off easily. | 0 | 0 | 0 | 0 | 2009-03-10T11:09:00.000 | 10 | 0.039979 | false | 629,696 | 0 | 0 | 1 | 2 | We're about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don't want all of the hits on development instances to contribute to the Google Analytics statistics.
There are a few ways we could deal with this:
have a configuration option in settings.... |
Deploying Google Analytics With Django | 633,029 | 2 | 38 | 19,916 | 0 | python,django,deployment,google-analytics | Instead of including the script tag directly in your html, just change the analytics javascript so it only runs if the href does not contain your prod site's name. This will work without any extra configuration. | 0 | 0 | 0 | 0 | 2009-03-10T11:09:00.000 | 10 | 0.039979 | false | 629,696 | 0 | 0 | 1 | 2 | We're about to deploy a new Django website, and we want to use Google Analytics to keep track of traffic on the site. However, we don't want all of the hits on development instances to contribute to the Google Analytics statistics.
There are a few ways we could deal with this:
have a configuration option in settings.... |
Ruby on Rails versus Python | 639,650 | 16 | 13 | 26,861 | 0 | python,ruby | Ruby gets more attention than Python simply because Ruby has one clear favourite when it comes to web apps while Python has traditionally had a very splintered approach (Zope, Plone, Django, Pylons, Turbogears). The critical mass of having almost all developers using one system as opposed to a variety of individual one... | 0 | 0 | 0 | 0 | 2009-03-12T11:06:00.000 | 4 | 1 | false | 638,150 | 0 | 0 | 1 | 2 | I am in the field of data crunching and very soon might make a move to the world of web programming. Although I am fascinated both by Python and Ruby as both of them seem to be having every similar styles when it comes to writing business logic or data crunching logic.
But when I start googling for web development I st... |
Ruby on Rails versus Python | 639,045 | 3 | 13 | 26,861 | 0 | python,ruby | Ruby and Python have more similarities than differences; the same is true for Rails and Django, which are the leading web frameworks in the respective languages.
Both languages and both frameworks are likely to be rewarding to work with - in personal, "fun" terms at least - I don't know what the job markets are like in... | 0 | 0 | 0 | 0 | 2009-03-12T11:06:00.000 | 4 | 0.148885 | false | 638,150 | 0 | 0 | 1 | 2 | I am in the field of data crunching and very soon might make a move to the world of web programming. Although I am fascinated both by Python and Ruby as both of them seem to be having every similar styles when it comes to writing business logic or data crunching logic.
But when I start googling for web development I st... |
Architecture for social multiplayer browser game (backend choice + frontend choice [flash/silverlight]) | 1,255,224 | 6 | 4 | 5,154 | 0 | .net,silverlight,multiplayer,python-stackless | I spent a year working on a massively multiplayer online game using Silverlight for the frontend and Python for the backend (I actually used IronPython in Silverlight so as to simplify development)
Silverlight is very well suited for this, I wouldn't do a serious online game in anything else. It already has 35% of the ... | 0 | 0 | 0 | 0 | 2009-03-12T11:48:00.000 | 3 | 1 | false | 638,272 | 0 | 0 | 1 | 1 | I'm thinking about developing online multiplayer social game. The shared state of the world would require something fast on the backend, so the potential solutions seem to be:
fast game engine on server (eg. c++ ) and some frontend language (php/python/ruby) + flash
whole stack in python (using twisted or stackless py... |
PHP vs. long-running process (Python, Java, etc.)? | 639,435 | 1 | 5 | 1,789 | 0 | php,python | PHP is fine for either use in my opinion, the performance overheads are rarely noticed. It's usually other processes which will delay the program. It's easy to cache PHP programs with something like eAccelerator. | 0 | 0 | 0 | 1 | 2009-03-12T16:22:00.000 | 5 | 0.039979 | false | 639,409 | 0 | 0 | 1 | 3 | I'd like to have your opinion about writing web apps in PHP vs. a long-running process using tools such as Django or Turbogears for Python.
As far as I know:
- In PHP, pages are fetched from the hard-disk every time (although I assume the OS keeps files in RAM for a while after they've been accessed)
- Pages are recomp... |
PHP vs. long-running process (Python, Java, etc.)? | 639,537 | 3 | 5 | 1,789 | 0 | php,python | After you apply memcache, opcode caching, and connection pooling, the only real difference between PHP and other options is that PHP is short-lived, processed based, while other options are, typically, long-lived multithreaded based.
The advantage PHP has is that its dirt simple to write scripts. You don't have to wor... | 0 | 0 | 0 | 1 | 2009-03-12T16:22:00.000 | 5 | 0.119427 | false | 639,409 | 0 | 0 | 1 | 3 | I'd like to have your opinion about writing web apps in PHP vs. a long-running process using tools such as Django or Turbogears for Python.
As far as I know:
- In PHP, pages are fetched from the hard-disk every time (although I assume the OS keeps files in RAM for a while after they've been accessed)
- Pages are recomp... |
PHP vs. long-running process (Python, Java, etc.)? | 640,138 | 0 | 5 | 1,789 | 0 | php,python | As many others have noted, PHP nor Django are going to be your bottlenecks. Hitting the hard disk for the bytecode on PHP is irrelevant for a heavily trafficked site because caching will take over at that point. The same is true for Django.
Model/View and user experience design will have order of magnitude benefits t... | 0 | 0 | 0 | 1 | 2009-03-12T16:22:00.000 | 5 | 0 | false | 639,409 | 0 | 0 | 1 | 3 | I'd like to have your opinion about writing web apps in PHP vs. a long-running process using tools such as Django or Turbogears for Python.
As far as I know:
- In PHP, pages are fetched from the hard-disk every time (although I assume the OS keeps files in RAM for a while after they've been accessed)
- Pages are recomp... |
Can anyone point out the pros and cons of TG2 over Django? | 703,311 | 15 | 7 | 2,475 | 0 | python,django,turbogears,turbogears2 | TG2 has several advantages that I think are important:
Multi-database support
sharding/data partitioning support
longstanding support for aggregates, multi-column primary keys
a transaction system that handles multi-database transactions for you
an admin system that works with all of the above
out of the box support ... | 0 | 0 | 0 | 0 | 2009-03-12T23:26:00.000 | 8 | 1 | false | 640,877 | 0 | 0 | 1 | 4 | Django is my favorite python web framework. I've tried out others like pylons, web2py, nevow and others.
But I've never looked into TurboGears with much enthusiasm.
Now with TG2 out of beta I may give it a try. I'd like to know what are some of the pros and cons compared to Django. |
Can anyone point out the pros and cons of TG2 over Django? | 1,387,123 | 5 | 7 | 2,475 | 0 | python,django,turbogears,turbogears2 | Pros.
SQLAlchemy > django ORM
Multiple template languages out of the box (genshi,mako,jinja2)
more WSGI friendly
Object Dispatch > routes > regexp routing. You can get the first 2 with TG2
Almost all components are optional you can keep the core and use any ORM, template, auth library, etc.
Sprox > django forms
Cons.... | 0 | 0 | 0 | 0 | 2009-03-12T23:26:00.000 | 8 | 0.124353 | false | 640,877 | 0 | 0 | 1 | 4 | Django is my favorite python web framework. I've tried out others like pylons, web2py, nevow and others.
But I've never looked into TurboGears with much enthusiasm.
Now with TG2 out of beta I may give it a try. I'd like to know what are some of the pros and cons compared to Django. |
Can anyone point out the pros and cons of TG2 over Django? | 642,874 | 0 | 7 | 2,475 | 0 | python,django,turbogears,turbogears2 | Last I checked, django has a very poor data implementation. And that's a huge weakness in my book. Django's orm doesn't allow me to use the power of the underlying database. For example I can't use compound primary keys, which are important to good db design. It also doesn't support more than a single database, whi... | 0 | 0 | 0 | 0 | 2009-03-12T23:26:00.000 | 8 | 0 | false | 640,877 | 0 | 0 | 1 | 4 | Django is my favorite python web framework. I've tried out others like pylons, web2py, nevow and others.
But I've never looked into TurboGears with much enthusiasm.
Now with TG2 out of beta I may give it a try. I'd like to know what are some of the pros and cons compared to Django. |
Can anyone point out the pros and cons of TG2 over Django? | 641,046 | 0 | 7 | 2,475 | 0 | python,django,turbogears,turbogears2 | Because Django uses its own ORM it limits you to learn that ORM for that specific web framework. I think using an web framework with a more popular ORM (like SqlAlchemy which TG uses) increases your employability chances. Just my 2 cents .. | 0 | 0 | 0 | 0 | 2009-03-12T23:26:00.000 | 8 | 0 | false | 640,877 | 0 | 0 | 1 | 4 | Django is my favorite python web framework. I've tried out others like pylons, web2py, nevow and others.
But I've never looked into TurboGears with much enthusiasm.
Now with TG2 out of beta I may give it a try. I'd like to know what are some of the pros and cons compared to Django. |
Email integration | 641,004 | 7 | 12 | 1,824 | 0 | python,django,email | Generally:
1) Set up a dedicated email account for the purpose.
2) Have a programm monitor the mailbox (let's say fetchmail, since that's what I do).
3) When an email arrives at the account, fetchmail downloads the email, writes it to disk, and calls script or program you have written with the email file as an argument... | 0 | 0 | 0 | 0 | 2009-03-13T00:09:00.000 | 6 | 1 | false | 640,970 | 0 | 0 | 1 | 1 | I was wondering if someone could help me out. In some web application, the app will send out emails, say when a new message has been posted. Then instead of signing into the application to post a reply you can just simply reply to the email and it will automatically update the web app with your response.
My question ... |
Anyone use Pyjamas (pyjs) python to javascript compiler (like GWT..) | 3,030,515 | 1 | 18 | 5,067 | 0 | javascript,python,gwt | yes it works fine on windows (it's a compiler: you just need python, to run the conversion to javascript). but if you're thinking of pyjamas-desktop, 0.6 added support for MSHTML as one of the engines, so that works too. | 0 | 0 | 0 | 0 | 2009-03-13T16:33:00.000 | 4 | 0.049958 | false | 643,565 | 1 | 0 | 1 | 2 | Has any one used this? I don't have a large background in Javascript and this lib looks like it may speed things along.
www.pyjs.org |
Anyone use Pyjamas (pyjs) python to javascript compiler (like GWT..) | 730,960 | 10 | 18 | 5,067 | 0 | javascript,python,gwt | yep. me. i'm the lead developer. drop by on groups.google.com "pyjamas-dev" and say hello. | 0 | 0 | 0 | 0 | 2009-03-13T16:33:00.000 | 4 | 1 | false | 643,565 | 1 | 0 | 1 | 2 | Has any one used this? I don't have a large background in Javascript and this lib looks like it may speed things along.
www.pyjs.org |
How do you make a case for Django [or Ruby on Rails] to non-technical clients | 644,312 | 1 | 14 | 2,100 | 0 | python,ruby-on-rails,ruby,django | The problem with a "brochure" approach is that it doesn't address the clients needs. Putting the language/platform of choice into a presentation that addresses the clients goals is much more likely to sell them - both on the tools you want to use, as well as you as a provider. As long as you can show that your approach... | 0 | 0 | 0 | 0 | 2009-03-13T19:25:00.000 | 7 | 0.028564 | false | 644,237 | 0 | 0 | 1 | 5 | Businessmen typically want a web application developed. They are aware of .net or J2EE by names, without much knowledge about either.
Altho' Rails and Django offer for a much better and faster development stack, it is a big task to convince businessmen to use these platforms.
The task begins with introducing Django (or... |
How do you make a case for Django [or Ruby on Rails] to non-technical clients | 644,291 | 2 | 14 | 2,100 | 0 | python,ruby-on-rails,ruby,django | The first 2 arguments from the top of my mind:
Easier and faster development = cheaper product, less time to market.
SO optimization out of the box. | 0 | 0 | 0 | 0 | 2009-03-13T19:25:00.000 | 7 | 0.057081 | false | 644,237 | 0 | 0 | 1 | 5 | Businessmen typically want a web application developed. They are aware of .net or J2EE by names, without much knowledge about either.
Altho' Rails and Django offer for a much better and faster development stack, it is a big task to convince businessmen to use these platforms.
The task begins with introducing Django (or... |
How do you make a case for Django [or Ruby on Rails] to non-technical clients | 644,279 | 1 | 14 | 2,100 | 0 | python,ruby-on-rails,ruby,django | The best case to be made for either of these frameworks is their ability to automate repetitive and time-consuming tasks. This allows developers to be faster and more productive which in turn means projects are delivered faster. | 0 | 0 | 0 | 0 | 2009-03-13T19:25:00.000 | 7 | 0.028564 | false | 644,237 | 0 | 0 | 1 | 5 | Businessmen typically want a web application developed. They are aware of .net or J2EE by names, without much knowledge about either.
Altho' Rails and Django offer for a much better and faster development stack, it is a big task to convince businessmen to use these platforms.
The task begins with introducing Django (or... |
How do you make a case for Django [or Ruby on Rails] to non-technical clients | 644,310 | 16 | 14 | 2,100 | 0 | python,ruby-on-rails,ruby,django | You need to speak the language of business: money.
"If we do it Rails, it will cost you 50% less than the same functionality in Java."
Your percentage may vary, and you might need to also include hosting and upkeep costs, to show how it balances out.
When you're convincing other programmers, sure, talk about develo... | 0 | 0 | 0 | 0 | 2009-03-13T19:25:00.000 | 7 | 1 | false | 644,237 | 0 | 0 | 1 | 5 | Businessmen typically want a web application developed. They are aware of .net or J2EE by names, without much knowledge about either.
Altho' Rails and Django offer for a much better and faster development stack, it is a big task to convince businessmen to use these platforms.
The task begins with introducing Django (or... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.