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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
when a class is instantiated, storing that instance by user | 2,265,947 | 1 | 0 | 888 | 0 | asp.net,ironpython | You have to put it into the Session object, which is automatically managed for you. | 0 | 0 | 0 | 0 | 2010-02-15T12:40:00.000 | 2 | 0.099668 | false | 2,265,928 | 1 | 0 | 1 | 1 | I have to do the following, when a class is instantiated I need to store that instance by user . Since I'm working in asp.net, I was wondering if I should use some of the ways asp.net provides to persist data between user requests. (Cache cant be because the data needs to be persistent and application state cant be be... |
Paginating the results of a Django forms POST request | 2,266,571 | 0 | 20 | 12,612 | 0 | python,django,django-forms,pagination | You can ask request object if it's ajax, simply request.is_ajax. This way you can detect, whether it's first post request or further questions about the next pages. | 0 | 0 | 0 | 0 | 2010-02-15T14:31:00.000 | 8 | 0 | false | 2,266,554 | 0 | 0 | 1 | 2 | I'm using Django Forms to do a filtered/faceted search via POST, and I would like to Django's paginator class to organize the results. How do I preserve the original request when passing the client between the various pages? In other words, it seems that I lose the POST data as soon as I pass the GET request for anot... |
Paginating the results of a Django forms POST request | 3,170,694 | 0 | 20 | 12,612 | 0 | python,django,django-forms,pagination | Have the search form and the results display on one single django template. Initially, use css to hide the results display area. On POSTing the form, you could check to see if the search returned any results and hide the search form with css if results exist. If results do not exist, use css to hide the results display... | 0 | 0 | 0 | 0 | 2010-02-15T14:31:00.000 | 8 | 0 | false | 2,266,554 | 0 | 0 | 1 | 2 | I'm using Django Forms to do a filtered/faceted search via POST, and I would like to Django's paginator class to organize the results. How do I preserve the original request when passing the client between the various pages? In other words, it seems that I lose the POST data as soon as I pass the GET request for anot... |
Subscription web/desktop app [PYTHON] | 2,277,634 | 0 | 3 | 795 | 0 | python,django,sms,payment-gateway | I'd like to comment on the SMS alert part.
First, I have to admit that I'm not familiar with Django, but I assume it to be just like most other web frameworks: request based. This might be your first problem, as the alert service needs to run independently of requests. You could of course hack together something to e... | 0 | 0 | 0 | 0 | 2010-02-16T04:06:00.000 | 2 | 0 | false | 2,270,556 | 0 | 0 | 1 | 1 | Firstly pardon me if i've yet again failed to title my question correctly.
I am required to build an app to manage magazine subscriptions. The client wants to enter subscriber data and then receive alerts at pre-set intervals such as when the subscription of a subscriber is about to expire and also the option to view a... |
django calendar free/busy/availabilitty | 2,271,544 | 0 | 12 | 3,899 | 0 | python,django,calendar | One caveat here is the different timezones of different users, and bring Daylight saving time into the mix things become very complicated.
You might want to take a look at pytz module for taking care of the timezone issue. | 0 | 0 | 0 | 0 | 2010-02-16T07:17:00.000 | 2 | 0 | false | 2,271,190 | 0 | 0 | 1 | 1 | I am trying to implement a calendar system with the ability to schedule other people for appointments. The system has to be able to prevent scheduling a person during another appointment or during their unavailable time.
I have looked at all the existing django calendar projects I have found on the internet and none of... |
How about having a SingletonModel in Django? | 2,274,434 | 1 | 20 | 10,738 | 0 | python,django,orm,singleton | rewrite your save method so that every time a Ticker object gets saved it overwrites the existing one (if one exists). | 0 | 0 | 0 | 0 | 2010-02-16T13:44:00.000 | 5 | 0.039979 | false | 2,273,258 | 0 | 0 | 1 | 1 | I'm making a very simple website in Django. On one of the pages there is a vertical ticker box. I need to give the client a way to edit the contents of the ticker box as an HTMLField.
The first way that came to mind was to make a model Ticker which will have only one instance. Then I thought, instead of making sure man... |
Why does django not do for the User model the same as it does for the userprofile model? | 2,275,652 | 2 | 0 | 89 | 0 | python,django | The User model has a lot of dependencies and must conform to a diverse set of API requirements in order to interoperate with the rest of the django framework. This is because of its relationship with authentication and authorization. Changing User means changing the expected behavior of contrib.auth. If you want to ... | 0 | 0 | 0 | 0 | 2010-02-16T17:50:00.000 | 2 | 1.2 | true | 2,275,043 | 0 | 0 | 1 | 2 | Why doesn't django just have the model to use for User configured in the settings file?
The requirements on the model specified would be that it contain a certain set of fields.
Is there a reason why it couldn't be done this way? |
Why does django not do for the User model the same as it does for the userprofile model? | 2,275,208 | 0 | 0 | 89 | 0 | python,django | "Why doesn't django just have the model to use for User configured in the settings file?"
I have a site that doesn't need users or a login or authentication.
I don't want the model for User.
In order to support everyone with applications like mine, User is optional. | 0 | 0 | 0 | 0 | 2010-02-16T17:50:00.000 | 2 | 0 | false | 2,275,043 | 0 | 0 | 1 | 2 | Why doesn't django just have the model to use for User configured in the settings file?
The requirements on the model specified would be that it contain a certain set of fields.
Is there a reason why it couldn't be done this way? |
Program web applications in python without a framework? | 2,276,041 | 4 | 43 | 35,567 | 0 | python | One of the lightest-weight frameworks is mod_wsgi. Anything less is going to be a huge amount of work parsing HTTP requests to find headers and URI's and methods and parsing the GET or POST query/data association, handling file uploads, cookies, etc.
As it is, mod_wsgi will only handle the basics of request parsing an... | 0 | 0 | 0 | 1 | 2010-02-16T20:15:00.000 | 6 | 0.132549 | false | 2,276,000 | 0 | 0 | 1 | 1 | I am just starting Python and I was wondering how I would go about programming web applications without the need of a framework. I am an experienced PHP developer but I have an urge to try out Python and I usually like to write from scratch without the restriction of a framework like flask or django to name a few. |
Help for novice choosing between Java and Python for app with sql db | 2,282,470 | 1 | 0 | 594 | 1 | java,python | The largest issue I can think of is the need to install an interpreter.
With Java, a lot of people will already have that interpreter installed, although you won't necessarily know which version. It may be wise to include the installer for Java with the program.
With Python, you're going to have to install the interpr... | 0 | 0 | 0 | 0 | 2010-02-17T16:20:00.000 | 5 | 0.039979 | false | 2,282,360 | 0 | 0 | 1 | 2 | I'm going to write my first non-Access project, and I need advice on choosing the platform. I will be installing it on multiple friends' and family's computers, so (since I'm sure many, many platforms would suffice just fine for my app), my highest priority has two parts: 1) ease of install for the non-technical user a... |
Help for novice choosing between Java and Python for app with sql db | 2,283,347 | 1 | 0 | 594 | 1 | java,python | If you're going to install only (or mostly) on Windows, I'd go with .Net.
If you have experience with C++, then C# would be natural to you, but if you're comfortable with VBA, you can try VB.NET, but if you prefer Python, then there is IronPython or can give a try to IronRuby, but the best of all is you can mix them a... | 0 | 0 | 0 | 0 | 2010-02-17T16:20:00.000 | 5 | 1.2 | true | 2,282,360 | 0 | 0 | 1 | 2 | I'm going to write my first non-Access project, and I need advice on choosing the platform. I will be installing it on multiple friends' and family's computers, so (since I'm sure many, many platforms would suffice just fine for my app), my highest priority has two parts: 1) ease of install for the non-technical user a... |
Suggestions wanted: learning material for Django | 2,282,645 | 2 | 6 | 514 | 0 | python,django,model-view-controller,frameworks | Well, I have a trivial solution - get used to reading the manual and the django book they host.
Django manual is organized well, and once you have a mental picture of it, you'll really be able to make a good use of it.
Two things I wish Django docs were better at - tell clearly where to import stuff right at each defin... | 0 | 0 | 0 | 0 | 2010-02-17T16:52:00.000 | 4 | 0.099668 | false | 2,282,619 | 0 | 0 | 1 | 1 | I am looking for advice on best resources to learn how to develop webapps with Django [the python framework]. Here's a few information to help responders to narrow-down the gazillion options "out there".
Where I stand
I know python (2.x series) and I have developed a few applications/scripts with it. I wouldn't define... |
Problem with running Django 1.1.1 on Google App Engine Developement Server | 2,289,005 | 0 | 0 | 261 | 0 | python,django,google-app-engine | I had module nammed same way as the default GAE launcher (main/ and main.py). After renaming the launcher everything works great. | 0 | 1 | 0 | 0 | 2010-02-18T13:00:00.000 | 1 | 1.2 | true | 2,288,725 | 0 | 0 | 1 | 1 | I've downloaded google_appengine version 1.3.1. Using some web tutorials, I've created basic django 1.1.1 application. Using appcfg I managed to deploy it on GAE and it works. The problem is, that application doesn't want to work on dev_appengine.py developement server.
Whenever I run the app GAE local server is return... |
Complete django DB reset | 2,289,931 | 0 | 20 | 24,412 | 1 | python,django | Hm, maybe you lie to manage.py, pretending to make fixtures, but only to look for apps:
apps=$(python manage.py makefixture 2>&1 | egrep -v '(^Error|^django)'|awk -F . '{print $2}'|uniq); for i in $apps; do python manage.py sqlreset $i; done| grep DROP
That prints out a list of DROP TABLE statements for all apps tabl... | 0 | 0 | 0 | 0 | 2010-02-18T14:16:00.000 | 7 | 0 | false | 2,289,187 | 0 | 0 | 1 | 3 | How do I completely reset my Django (1.2 alpha) DB (dropping all tables, rather than just clearing them)?
manage.py flush does too little (won't work if there are schema changes) and manage.py reset requires me to specify all apps (and appears to take a format that is different from just " ".join(INSTALLED_APPS)). I ca... |
Complete django DB reset | 2,289,445 | 0 | 20 | 24,412 | 1 | python,django | Just assign a new database and drop this db from the db console. Seems to me to be the simplest. | 0 | 0 | 0 | 0 | 2010-02-18T14:16:00.000 | 7 | 0 | false | 2,289,187 | 0 | 0 | 1 | 3 | How do I completely reset my Django (1.2 alpha) DB (dropping all tables, rather than just clearing them)?
manage.py flush does too little (won't work if there are schema changes) and manage.py reset requires me to specify all apps (and appears to take a format that is different from just " ".join(INSTALLED_APPS)). I ca... |
Complete django DB reset | 2,289,727 | -2 | 20 | 24,412 | 1 | python,django | take a look at reset command in django's code, and write your own which drops/creates DB first. | 0 | 0 | 0 | 0 | 2010-02-18T14:16:00.000 | 7 | -0.057081 | false | 2,289,187 | 0 | 0 | 1 | 3 | How do I completely reset my Django (1.2 alpha) DB (dropping all tables, rather than just clearing them)?
manage.py flush does too little (won't work if there are schema changes) and manage.py reset requires me to specify all apps (and appears to take a format that is different from just " ".join(INSTALLED_APPS)). I ca... |
Who is throwing (and catching) this MySQL Exception? | 55,394,190 | 0 | 8 | 6,125 | 1 | python,mysql,django,exception | The exceptions in object destructors (__del__) are ignored, which this message indicates. If you execute some MySQL command without fetching results from the cursor (e.g. 'create procedure' or 'insert') then the exception is unnoticed until the cursor is destroyed.
If you want to raise and catch an exception, call expl... | 0 | 0 | 0 | 0 | 2010-02-18T19:50:00.000 | 5 | 0 | false | 2,291,714 | 0 | 0 | 1 | 3 | i'm using Python with MySQL and Django. I keep seeing this error and I can't figure out where the exception is being thrown:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0x20108150>> ig... |
Who is throwing (and catching) this MySQL Exception? | 2,300,154 | 2 | 8 | 6,125 | 1 | python,mysql,django,exception | After printing out a bunch of stuff and debugging, I figured out the problem I think. One of the libraries that I used didn't close the connection or the cursor. But this problem only shows up if I iterate through a large amount of data. The problem is also very intermittent and I still don't know who's throwing the... | 0 | 0 | 0 | 0 | 2010-02-18T19:50:00.000 | 5 | 0.07983 | false | 2,291,714 | 0 | 0 | 1 | 3 | i'm using Python with MySQL and Django. I keep seeing this error and I can't figure out where the exception is being thrown:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0x20108150>> ig... |
Who is throwing (and catching) this MySQL Exception? | 2,292,145 | 2 | 8 | 6,125 | 1 | python,mysql,django,exception | I believe this error can occur if you are using the same connection/cursor from multiple threads.
However, I dont think the creators of Django has made such a mistake, but if you are doing something by yourself it can easily happen. | 0 | 0 | 0 | 0 | 2010-02-18T19:50:00.000 | 5 | 0.07983 | false | 2,291,714 | 0 | 0 | 1 | 3 | i'm using Python with MySQL and Django. I keep seeing this error and I can't figure out where the exception is being thrown:
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now") in <bound method Cursor.__del__ of <MySQLdb.cursors.Cursor object at 0x20108150>> ig... |
What Python/IronPython web development framework work on the Microsoft technology stack? | 2,292,804 | 1 | 6 | 1,847 | 0 | python,ironpython | Django does in theory run on Windows, but using Apache and MySQL. It's not possible (and certainly not recommended) to run it on IIS.
I know you totally didn't ask this, but I have to advise that if you really want to get into Python web development then looking into a Linux technology stack is definitely the recommend... | 0 | 0 | 0 | 0 | 2010-02-18T22:39:00.000 | 3 | 0.066568 | false | 2,292,775 | 0 | 0 | 1 | 1 | I started learning Python using the IronPython implementation. I'd like to do some web development now. I'm looking for a python web development framework that works on the Microsoft technology stack (IIS + MS SQL Server). Django looks like an interesting framework but based on what I have read, getting it to work on t... |
Building a wiki application? | 2,299,776 | 1 | 0 | 1,412 | 0 | python,django,django-models,wiki | Assuming that there will be a community of users you can provide good tools for them to spot problems and easily undo damage. The most important of these is to provide a Recent Changes page that summarizes recent edits. Then each page that can be edited should retain prior versions of the page that can be used to repla... | 0 | 0 | 0 | 0 | 2010-02-19T21:23:00.000 | 3 | 0.066568 | false | 2,299,697 | 0 | 0 | 1 | 2 | I'm building this app in Python with Django.
I would like to give parts of the site wiki like functionality,
but I don't know how to go on about reliability and security.
Make sure that good content is not ruined
Check for quality
Prevent spam from invading the site
The items requiring wiki like functionality are jus... |
Building a wiki application? | 2,299,849 | 1 | 0 | 1,412 | 0 | python,django,django-models,wiki | Make sure that good content is not ruined = version each edit and allow roll-backs.
Check for quality = get people to help with that
Prevent spam from invading the site = get people to help with that, require login, add a captcha if need be, use nofollow for all links | 0 | 0 | 0 | 0 | 2010-02-19T21:23:00.000 | 3 | 0.066568 | false | 2,299,697 | 0 | 0 | 1 | 2 | I'm building this app in Python with Django.
I would like to give parts of the site wiki like functionality,
but I don't know how to go on about reliability and security.
Make sure that good content is not ruined
Check for quality
Prevent spam from invading the site
The items requiring wiki like functionality are jus... |
What does Django do with `MEDIA_ROOT`? | 8,542,155 | 2 | 9 | 4,138 | 0 | python,django | When you creates a model with ImageField or FileField attributes, you should pass the upload_to argument. That is a relative path will be appended to your MEDIA_ROOT path and there will be save and retrieve that files. | 0 | 0 | 0 | 0 | 2010-02-20T18:53:00.000 | 3 | 0.132549 | false | 2,303,254 | 0 | 0 | 1 | 1 | What does Django do with MEDIA_ROOT exactly? I never understood it. Since Django itself doesn't serve static media, and you have to set up apache or something similar for it, why does it care in which directory it sits? |
Get zip code based on IP Address with Python | 2,303,976 | -2 | 3 | 3,231 | 0 | python,django,geolocation | You can't collect a real zip code from an IP address as these are assigned by ISP's when you route threw their connection. | 0 | 0 | 0 | 0 | 2010-02-20T22:17:00.000 | 2 | 1.2 | true | 2,303,966 | 0 | 0 | 1 | 1 | Is it possible to find the zip code based on a users IP address using python / django (not geodjango)? I assume I would have to use a web service, but I would really like to just be able to query a database if possible.
I am using geopy right now, so it would be cool if I could integrate that somehow. |
How can I limit an SQL query to be nondestructive? | 2,305,359 | 1 | 2 | 543 | 1 | python,sql,django,security,sql-injection | Create and use non-modifiable views. | 0 | 0 | 0 | 0 | 2010-02-21T08:48:00.000 | 2 | 0.099668 | false | 2,305,353 | 0 | 0 | 1 | 2 | I'm planning on building a Django log-viewing app with powerful filters. I'd like to enable the user to finely filter the results with some custom (possibly DB-specific) SELECT queries.
However, I dislike giving the user write access to the database. Is there a way to make sure a query doesn't change anything in the da... |
How can I limit an SQL query to be nondestructive? | 2,305,379 | 14 | 2 | 543 | 1 | python,sql,django,security,sql-injection | Connect with a user that has only been granted SELECT permissions. Situations like this is why permissions exist in the first place. | 0 | 0 | 0 | 0 | 2010-02-21T08:48:00.000 | 2 | 1.2 | true | 2,305,353 | 0 | 0 | 1 | 2 | I'm planning on building a Django log-viewing app with powerful filters. I'd like to enable the user to finely filter the results with some custom (possibly DB-specific) SELECT queries.
However, I dislike giving the user write access to the database. Is there a way to make sure a query doesn't change anything in the da... |
Django: sqlite for dev, mysql for prod? | 2,306,070 | 24 | 20 | 4,303 | 1 | python,mysql,django,sqlite,dev-to-production | I'd highly recommend using the same database backend in production as in development, and all stages in between. Django will abstract the database stuff, but having different environments will leave you open to horrible internationalisation, configuration issues, and nasty tiny inconsistencies that won't even show up u... | 0 | 0 | 0 | 0 | 2010-02-21T13:45:00.000 | 6 | 1.2 | true | 2,306,048 | 0 | 0 | 1 | 4 | Quick question: is it a good idea to use sqlite while developing a Django project, and use MySQL on the production server? |
Django: sqlite for dev, mysql for prod? | 9,401,789 | 7 | 20 | 4,303 | 1 | python,mysql,django,sqlite,dev-to-production | Use the same database in all environments.
As much as the ORM tries to abstract the differences between databases, there will always be certain features that behave differently based on the database. Database portability is a complete myth.
Plus, it seems pretty insane to test and develop against code paths that you w... | 0 | 0 | 0 | 0 | 2010-02-21T13:45:00.000 | 6 | 1 | false | 2,306,048 | 0 | 0 | 1 | 4 | Quick question: is it a good idea to use sqlite while developing a Django project, and use MySQL on the production server? |
Django: sqlite for dev, mysql for prod? | 2,306,069 | 3 | 20 | 4,303 | 1 | python,mysql,django,sqlite,dev-to-production | In short, no; unless you want to unnecessarily double development time. | 0 | 0 | 0 | 0 | 2010-02-21T13:45:00.000 | 6 | 0.099668 | false | 2,306,048 | 0 | 0 | 1 | 4 | Quick question: is it a good idea to use sqlite while developing a Django project, and use MySQL on the production server? |
Django: sqlite for dev, mysql for prod? | 12,684,980 | 3 | 20 | 4,303 | 1 | python,mysql,django,sqlite,dev-to-production | Just made this major mistake starting off with sqlite and when i try to deploy on production server with mysql, things didn't work as smooth as i expected. I tried dumpdata/loaddata with various switches but somehow keep getting errors thrown one after another. Do yourself a big favor and use the same db for both produ... | 0 | 0 | 0 | 0 | 2010-02-21T13:45:00.000 | 6 | 0.099668 | false | 2,306,048 | 0 | 0 | 1 | 4 | Quick question: is it a good idea to use sqlite while developing a Django project, and use MySQL on the production server? |
Exchange Oauth Request Token for Access Token fails Google API | 3,110,939 | 1 | 2 | 1,332 | 0 | python,oauth,google-api | When you're exchanging for the access token, the oauth_verifier parameter is required. If you don't provide that parameter, then google will tell you that the token is invalid. | 0 | 0 | 1 | 0 | 2010-02-21T18:50:00.000 | 1 | 1.2 | true | 2,306,984 | 0 | 0 | 1 | 1 | I am having trouble exchanging my Oauth request token for an Access Token. My Python application successfully asks for a Request Token and then redirects to the Google login page asking to grant access to my website. When I grant access I retrieve a 200 status code but exchanging this authorized request token for an ac... |
GAE Task Queue oddness | 2,402,964 | 0 | 2 | 630 | 0 | python,google-app-engine,task-queue | When a task-queue ends in error : I believe it stays in your queue ..
Check that | 0 | 1 | 0 | 0 | 2010-02-22T00:05:00.000 | 1 | 0 | false | 2,308,050 | 0 | 0 | 1 | 1 | I have been testing the taskqueue with mixed success. Currently I am
using the default queue, in default settings etc etc....
I have a test URL setup which inserts about 8 tasks into the queue.
With short order, all 8 are completed properly. So far so good.
The problem comes up when I re-load that URL twice under say a... |
How to handle user mangement in Django for groups that has same access but different rules? | 2,311,740 | 0 | 2 | 439 | 0 | python,django,user-management | If I'm understanding you correctly, it seems like you want to have two different groups have access to all the same views, but they will see different numbers. You can achieve this effect by making separate templates for the different groups, and then loading the appropriate template for each view depending on the grou... | 0 | 0 | 0 | 0 | 2010-02-22T13:27:00.000 | 2 | 0 | false | 2,311,094 | 0 | 0 | 1 | 1 | Background information:
I have created an internal site for a company. Most of the work has gone into making calculation tools that their sale persons can use to make offers for clients. Create pdf offers and contracts that can be downloaded, compare prices etc. All of this is working fine.
Now their sale persons have ... |
Allowing users to delete their own comments in Django | 3,269,190 | 3 | 7 | 5,562 | 0 | python,django,django-comments | I just ran into this problem.
Just re-implementing the logic in comments app's delete view would couple your implementation to that specific version of the comments app. For example the comment app actual also handles signals when you mark something as deleted and the provided version doesn't do that.
Fortunately the ... | 0 | 0 | 0 | 0 | 2010-02-22T23:51:00.000 | 4 | 0.148885 | false | 2,315,187 | 0 | 0 | 1 | 1 | I am using the delete() function from django.contrib.comments.views.moderation module. The staff-member is allowed to delete ANY comment posts, which is completely fine. However, I would also like to give registered non-staff members the privilege to delete their OWN comment posts, and their OWN only. How can I accompl... |
Is it possible to write dynamic web pages in Python with the Really Simple HTTP Server? | 8,673,542 | 0 | 1 | 7,811 | 0 | python,post,get,webserver,simplehttpserver | have you considered using CGIHTTPServer instead of SimpleHTTPServer? Then you can toss your scripts in cgi-bin and they'll execute. You have to include content-type header and whatnot but if you're looking for quick and dirty it's real convenient | 0 | 0 | 0 | 1 | 2010-02-23T21:19:00.000 | 3 | 0 | false | 2,321,813 | 0 | 0 | 1 | 1 | I know that with the SimpleHTTPServer I can make my directories accessible by web-browsers via Internet. So, I run just one line of the code and, as a result, another person working on another computer can use his/her browser to see content of my directories.
But I wander if I can make more complicated things. For exam... |
django+flex: Debugging strategies | 2,323,428 | 1 | 0 | 111 | 0 | python,django,actionscript-3 | I've used firebug to debug the flex side of things. But I've been using json or XML for communication between the two. Since flash uses the browser to do the network stuff, the request should be visible in the net tab of firebug.
To debug the django side of things, you have a few options.
If you're using the django de... | 0 | 0 | 0 | 0 | 2010-02-24T02:59:00.000 | 1 | 1.2 | true | 2,323,371 | 0 | 0 | 1 | 1 | I love django, and I like flex. Django for it's cool debugging system (those yellow pages helps a lot to find bugs in my code), and flex for it possibilities.
Recently I come across a problem. If I create a form in flex and then communicate with the django server, I can't see any debugging info (when the exception happ... |
Django admin - Restrict user view by permission | 2,325,199 | 1 | 0 | 2,577 | 0 | python,django,permissions,django-admin,admin | If you make sure that User 2 has no permissions for any model related to the app you want to hide away (so no change, add or delete powers for any of the models in that app), then it won't appear in the admin for User 2. | 0 | 0 | 0 | 0 | 2010-02-24T10:19:00.000 | 1 | 1.2 | true | 2,325,150 | 0 | 0 | 1 | 1 | I'm starting to learn Django and I have a question.
Is there any way to restric views in the administration interface? I see there are "change, "add" and "delete" permissions, but I wanted to restrict views also.
For example: Two users, "User 1" is superuser and "User 2" is in the editor group. User 1 has access to ev... |
Code protection system which works with IronPython assemblies? | 2,326,011 | 1 | 0 | 159 | 0 | asp.net,ironpython | since iron python compiles to IL I would imagine you can use the same obfuscations tools such as DotFuscator.
Are you using the pyc tool included in iron pythons tool folder? | 0 | 0 | 0 | 1 | 2010-02-24T12:37:00.000 | 1 | 1.2 | true | 2,325,971 | 0 | 0 | 1 | 1 | do you know/have you tried any code protection system which works with IronPython assemblies? Can you list it/them here? |
Anyone using Django in the "Enterprise" | 4,030,459 | 3 | 34 | 17,637 | 0 | java,python,ruby-on-rails,django,enterprise | My company uses Python/Django as a base for our Intramas Platform. An entreprise grade web application platform that is deployed to about a dozen large clients.
Built in features include central contact management, document generator, extra security layers, default GUI for rapid application design (no messing with Dja... | 0 | 0 | 0 | 0 | 2010-02-24T14:29:00.000 | 7 | 0.085505 | false | 2,326,671 | 0 | 0 | 1 | 4 | I know that the word “enterprise” gives some people the creeps, but I am curious to know if anyone has experience creating enterprise applications, similar to something like say… Java EE applications, which are highly concurrent, distributed applications with Django? I know Java has its own issues but its kind of viewe... |
Anyone using Django in the "Enterprise" | 9,905,892 | 11 | 34 | 17,637 | 0 | java,python,ruby-on-rails,django,enterprise | My Company uses Django for at least six large scale enterprises such as mercedes, adidas. we often use the Jython wrapper. The advantages are
reduced development cost compared to Java/C#
runs stable via wrappers in IIS or Tomcat/Java environments
protects our software from copycats
Therefore we are well satisfied wit... | 0 | 0 | 0 | 0 | 2010-02-24T14:29:00.000 | 7 | 1 | false | 2,326,671 | 0 | 0 | 1 | 4 | I know that the word “enterprise” gives some people the creeps, but I am curious to know if anyone has experience creating enterprise applications, similar to something like say… Java EE applications, which are highly concurrent, distributed applications with Django? I know Java has its own issues but its kind of viewe... |
Anyone using Django in the "Enterprise" | 6,459,735 | 14 | 34 | 17,637 | 0 | java,python,ruby-on-rails,django,enterprise | One of the biggest drawbacks in django is that although in theory the concept of applications being self-contained sounds nice, in practice it really doesn't work that well; even if you find some app that provides functionality that you need - it is not always easy to plug it in and go - you will always need to edit/ha... | 0 | 0 | 0 | 0 | 2010-02-24T14:29:00.000 | 7 | 1 | false | 2,326,671 | 0 | 0 | 1 | 4 | I know that the word “enterprise” gives some people the creeps, but I am curious to know if anyone has experience creating enterprise applications, similar to something like say… Java EE applications, which are highly concurrent, distributed applications with Django? I know Java has its own issues but its kind of viewe... |
Anyone using Django in the "Enterprise" | 2,327,568 | 7 | 34 | 17,637 | 0 | java,python,ruby-on-rails,django,enterprise | For the systems you want to replace, you may find that it is desirable to use something more powerful than Django's ORM like SQLAlchemy. It's not a question of scaling, but the fact is that Django's ORM makes it hard to build complex queries and often pushes you to do in Python what should be done by your RDBMS — when ... | 0 | 0 | 0 | 0 | 2010-02-24T14:29:00.000 | 7 | 1 | false | 2,326,671 | 0 | 0 | 1 | 4 | I know that the word “enterprise” gives some people the creeps, but I am curious to know if anyone has experience creating enterprise applications, similar to something like say… Java EE applications, which are highly concurrent, distributed applications with Django? I know Java has its own issues but its kind of viewe... |
It is said best way to deploy django is using wsgi, I am wondering why? | 2,327,403 | 15 | 7 | 1,155 | 0 | python,django,mod-wsgi,wsgi,django-wsgi | wsgi is usually preferred because it decouples your choice of framework from your choice of web server: if tomorrow you want to move, say, from Apache to nginx, or whatever, the move is trivially easy with wsgi, not so easy otherwise.
Furthermore, using wsgi affords you the option to add some middleware that's framewor... | 0 | 0 | 0 | 0 | 2010-02-24T15:54:00.000 | 3 | 1.2 | true | 2,327,355 | 0 | 0 | 1 | 2 | We are deploying django application, I found in the documentation that it is recommended to use WSGI appoach for doing that.
Before deploying I wanted to know, why it is recommended over other two approaches i.e. using mod_python and fastcgi...
Thanks a lot. |
It is said best way to deploy django is using wsgi, I am wondering why? | 2,327,392 | 5 | 7 | 1,155 | 0 | python,django,mod-wsgi,wsgi,django-wsgi | We tried mod_python. It's slower and harder to configure. It doesn't offer the daemon feature.
We couldn't get fast_cgi built for our combination of Apache, Red Hat and Python. I'm not sure specifically what was wrong, but we couldn't get it built properly. It wouldn't dispatch requests to Django properly, and we c... | 0 | 0 | 0 | 0 | 2010-02-24T15:54:00.000 | 3 | 0.321513 | false | 2,327,355 | 0 | 0 | 1 | 2 | We are deploying django application, I found in the documentation that it is recommended to use WSGI appoach for doing that.
Before deploying I wanted to know, why it is recommended over other two approaches i.e. using mod_python and fastcgi...
Thanks a lot. |
Django i18n: Common causes for translations not appearing | 17,742,639 | 0 | 26 | 9,733 | 0 | python,django,translation,gettext,django-multilingual | Another cause can be a wrong directory structure.
Read well the manage command's error message about which directory to create before running the makemassages command for the app translation. (It must be locale for an app, not conf/locale.) Note that the management commands work fine even with the wrong directory struc... | 0 | 0 | 0 | 0 | 2010-02-24T17:45:00.000 | 9 | 0 | false | 2,328,185 | 0 | 0 | 1 | 5 | I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, ... |
Django i18n: Common causes for translations not appearing | 18,593,863 | 0 | 26 | 9,733 | 0 | python,django,translation,gettext,django-multilingual | I noticed that when I had % in my text, the translated text was not being used. There may be other characters that can cause this problem. I fixed the problem by escaping the % as %%. | 0 | 0 | 0 | 0 | 2010-02-24T17:45:00.000 | 9 | 0 | false | 2,328,185 | 0 | 0 | 1 | 5 | I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, ... |
Django i18n: Common causes for translations not appearing | 65,446,782 | 0 | 26 | 9,733 | 0 | python,django,translation,gettext,django-multilingual | My answer here, all my translations were working except for 2 DateFields that I was using in a ModelForm.
Turns out that I had a widget in my forms.py that was not working well with the translations.
I just removed it for now so I can enjoy Xmas =D | 0 | 0 | 0 | 0 | 2010-02-24T17:45:00.000 | 9 | 0 | false | 2,328,185 | 0 | 0 | 1 | 5 | I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, ... |
Django i18n: Common causes for translations not appearing | 2,381,694 | 37 | 26 | 9,733 | 0 | python,django,translation,gettext,django-multilingual | Maybe the translated strings are marked as fuzzy? | 0 | 0 | 0 | 0 | 2010-02-24T17:45:00.000 | 9 | 1.2 | true | 2,328,185 | 0 | 0 | 1 | 5 | I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, ... |
Django i18n: Common causes for translations not appearing | 4,087,770 | 8 | 26 | 9,733 | 0 | python,django,translation,gettext,django-multilingual | Hi just attach some fixes I had to do in the past:
Restart the webserver!
In the setting file
- USE_I18N = True is needed
django.middleware.locale.LocaleMiddleware among middleware modules (but this is not your case for sure as long as Django will not care about your local at all)
django.core.context_processors.i18n... | 0 | 0 | 0 | 0 | 2010-02-24T17:45:00.000 | 9 | 1 | false | 2,328,185 | 0 | 0 | 1 | 5 | I am making a multilingual Django website. I created a messages file, populated and compiled it. I checked the site (the admin in this case,) in my wanted language (Hebrew) and most phrases appear in Hebrew like they should, but some don't. I checked the source and these still appear as _('Whatever') like they should, ... |
Any potential gotchas or things to be aware of for a newcomer to Django? | 2,328,803 | 4 | 2 | 145 | 0 | python,django | Use forms for all data validation. Bulk loading, batch processing, web services, everything.
At first, it seems odd to read a CSV file, populate a Form, and then have the Form validate the data and build the database object. But that's the way it's supposed to work. Use the Forms for all validation no matter what ... | 0 | 0 | 0 | 0 | 2010-02-24T19:15:00.000 | 3 | 0.26052 | false | 2,328,767 | 0 | 0 | 1 | 2 | In other words, what did you not know when you started with Django that you wish someone had told you?
I've dabbled some in Django but nothing really serious. However, I'm hoping to change that, and I'm wondering if there's any gotchas/shortcomings/whatever that I need to be aware of as I go. |
Any potential gotchas or things to be aware of for a newcomer to Django? | 2,328,793 | 4 | 2 | 145 | 0 | python,django | You can't process data in templates. There are a fair number of questions in SO from people trying to do "real" processing in the templates. The Django template language is -- intentionally -- not JSP or ASP or PHP. It just does presentation and retrieval of values computed in view functions.
If you can't figure out... | 0 | 0 | 0 | 0 | 2010-02-24T19:15:00.000 | 3 | 0.26052 | false | 2,328,767 | 0 | 0 | 1 | 2 | In other words, what did you not know when you started with Django that you wish someone had told you?
I've dabbled some in Django but nothing really serious. However, I'm hoping to change that, and I'm wondering if there's any gotchas/shortcomings/whatever that I need to be aware of as I go. |
Client polling (reverse AJAX) for chat requests in Django? | 2,329,704 | 2 | 0 | 1,063 | 0 | python,ajax,django,session,reverse-ajax | A database table for this would put a load on your server, as you said, but might be useful if you want to keep a record of these requests for whatever reason.
Using something like memcached or an AMQP server might give you better performance. If you like you could even use a higher-performance key-value-store such as ... | 0 | 0 | 0 | 0 | 2010-02-24T21:20:00.000 | 2 | 1.2 | true | 2,329,627 | 0 | 0 | 1 | 1 | I want to make it that one user on the site can chat request another user on my Django site. I want the requestee to get a realtime box that say: "Do you want to chat?"
How does the following client polling approach sound:
user1 clicks on users2 nickname, generating a POST request to some /message/requests, which creat... |
Customizing the language-guessing algorithm in Django | 2,336,824 | 0 | 0 | 269 | 0 | python,django,django-multilingual | Maybe you don't have to override anything. You can just check on the first page, (or maybe every page) if the user already has a language cookie and otherwise redirect him to the set_language redirect view. In that way you could force the language to Hebrew.
If the user decides to change back to English, he can do it ... | 0 | 0 | 0 | 0 | 2010-02-25T13:54:00.000 | 2 | 1.2 | true | 2,334,402 | 0 | 0 | 1 | 1 | I'm developing a multilingual Django website. It has two languages, English and Hebrew. I want the default language for every first-time visitor to be Hebrew, regardless of what his browser's Accept-Language is.
Of course, if he changes language to English (and thus gets the language cookie or the key in the session), ... |
Send Email in Django without SMTP server. Like php mail() function does | 2,335,399 | 2 | 8 | 7,844 | 0 | python,django,email | So how does PHP do it? By magic?
If you don't have an SMTP server, sign up for a GMail account and use that. | 0 | 0 | 0 | 1 | 2010-02-25T15:56:00.000 | 5 | 0.07983 | false | 2,335,384 | 0 | 0 | 1 | 1 | As far as I read, Django only supports sending mails using SMTP.
I would like to send Emails from my script in Django, but do not want to setup SMTP server (it's too complex for me, I'm a linux newbie).
Is it possible, to send mails in Django in the same way like I do it in PHP, without providing SMTP login, password a... |
How can I make URLs in Django similar to stackoverflow? | 2,340,258 | -3 | 6 | 826 | 0 | python,django,url,friendly-url,slug | With all due respect to Stackoverflow, this is the wrong way to do it. You shouldn't need to have two elements in the URL that identify the page. The ID is irrelevant - it's junk. You should be able to uniquely identify a page from the slug alone. | 0 | 0 | 0 | 0 | 2010-02-26T04:08:00.000 | 3 | -0.197375 | false | 2,339,436 | 0 | 0 | 1 | 1 | I'm creating a video site. I want my direct urls to a video to look like example.com/watch/this-is-a-slug-1 where 1 is the video id. I don't want the slug to matter though. example.com/watch/this-is-another-slug-1 should point to the same page. On SO, /questions/id is the only part of the url that matters. How can I do... |
In a MVC patterned framework where would a screen-scraping module be located? | 2,342,211 | 0 | 1 | 643 | 0 | python,ruby-on-rails,model-view-controller | It depends on how you are planning on implementing the scraper. If you are going to have a UI where you click a button to scrape a screen then it is going to be in all three (M, V, and C). If it is going to be a background process (like mentioned before) it should be in M and C. | 0 | 0 | 0 | 0 | 2010-02-26T13:50:00.000 | 4 | 0 | false | 2,342,033 | 0 | 0 | 1 | 3 | In a MVC patterned framework where would a screen-scraping module most logically be located? In the model or the controller? Or is it completely outside of this pattern? |
In a MVC patterned framework where would a screen-scraping module be located? | 2,342,064 | 0 | 1 | 643 | 0 | python,ruby-on-rails,model-view-controller | In a sense, the screen-scraper is the user of the application -- I'd think it would be a piece outside the MVC that interacts with the controller, just like a web page sends information to the controller. This would make it easy to put a web page over it if the interface changes. | 0 | 0 | 0 | 0 | 2010-02-26T13:50:00.000 | 4 | 0 | false | 2,342,033 | 0 | 0 | 1 | 3 | In a MVC patterned framework where would a screen-scraping module most logically be located? In the model or the controller? Or is it completely outside of this pattern? |
In a MVC patterned framework where would a screen-scraping module be located? | 2,342,101 | 0 | 1 | 643 | 0 | python,ruby-on-rails,model-view-controller | I presume the scraper is only used to collect data.
if the data is scraped and stored, this process does not simply drop into either M V or C. You could run this scrapping process as a cron job on intervals you define, store the data and then define models to access the data.
i wouldn't recommend calling the scrapping ... | 0 | 0 | 0 | 0 | 2010-02-26T13:50:00.000 | 4 | 0 | false | 2,342,033 | 0 | 0 | 1 | 3 | In a MVC patterned framework where would a screen-scraping module most logically be located? In the model or the controller? Or is it completely outside of this pattern? |
How to add an Admin class to a model after syncdb? | 2,344,046 | 1 | 0 | 187 | 0 | python,django,django-models,django-south | You seem to be very confused, unfortunately. Of course Django reads the code in models.py - otherwise what would be the point of it? Django uses that code initially to define the model SQL when doing syncdb, but it doesn't modify existing database tables in subsequent calls to syncdb - hence the need for South.
But nat... | 0 | 0 | 0 | 0 | 2010-02-26T16:24:00.000 | 3 | 1.2 | true | 2,343,053 | 0 | 0 | 1 | 3 | I added some models in my models.py and I want to add an admin class to use a wysiwyg-editor in text-fields.
Well, I know that Django itself doesn't support migrations and I've used South, but it doesn't work either.
South doesn't "see" the change.
... |
How to add an Admin class to a model after syncdb? | 2,343,100 | 1 | 0 | 187 | 0 | python,django,django-models,django-south | I'm fairly sure that if you follow the steps as outlined in the tutorial to create an admin app it'll just work. Migration isn't an issue as the admin app creates new tables rather than altering the existing one. | 0 | 0 | 0 | 0 | 2010-02-26T16:24:00.000 | 3 | 0.066568 | false | 2,343,053 | 0 | 0 | 1 | 3 | I added some models in my models.py and I want to add an admin class to use a wysiwyg-editor in text-fields.
Well, I know that Django itself doesn't support migrations and I've used South, but it doesn't work either.
South doesn't "see" the change.
... |
How to add an Admin class to a model after syncdb? | 2,343,087 | 2 | 0 | 187 | 0 | python,django,django-models,django-south | syncdb and South are only concerned with descendants of Model in apps listed in INSTALLED_APPS. Everything else is handled by Django directly. | 0 | 0 | 0 | 0 | 2010-02-26T16:24:00.000 | 3 | 0.132549 | false | 2,343,053 | 0 | 0 | 1 | 3 | I added some models in my models.py and I want to add an admin class to use a wysiwyg-editor in text-fields.
Well, I know that Django itself doesn't support migrations and I've used South, but it doesn't work either.
South doesn't "see" the change.
... |
Creating a Persistent Data Object In Django | 2,345,334 | 2 | 6 | 5,288 | 0 | python,django,persistence | Consider running it in another process. You could have your Django application submit samples via a socket that the classifier process listens on, or you could run a queue and have Django submit requests to the queue. | 0 | 0 | 0 | 0 | 2010-02-26T22:24:00.000 | 2 | 0.197375 | false | 2,345,257 | 0 | 0 | 1 | 1 | I have a Python-based maximum entropy classifier. It's large, stored as a Pickle, and takes about a minute to unserialize. It's also not thread safe. However, it runs fast and can classify a sample (a simple Python dictionary) in a few milliseconds.
I'd like to create a basic Django web app, so users can submit samples... |
Unable to get custom context processor to be invoked | 2,348,959 | 5 | 8 | 3,744 | 0 | python,django,django-templates,django-context | The setting name should be TEMPLATE_CONTEXT_PROCESSORS, with an S. | 0 | 0 | 0 | 0 | 2010-02-27T20:57:00.000 | 1 | 1.2 | true | 2,348,943 | 0 | 0 | 1 | 1 | I am trying to create a custom context processor which will render a list of menu items for a logged in user. I have done the following:
Within my settings.py I have
TEMPLATE_CONTEXT_PROCESSOR = (
'django.contrib.auth.context_processors.auth',
'mysite.accounts.context_processors.user_menu',
)
Under the accou... |
What can I do if django runserver seems to be caching my urls.py and settings.py? | 2,349,845 | 2 | 1 | 460 | 0 | python,django,url | You're not running what you think you're running. Check your PYTHONPATH. | 0 | 0 | 0 | 0 | 2010-02-27T23:02:00.000 | 1 | 1.2 | true | 2,349,302 | 0 | 0 | 1 | 1 | I detected this problem when updating the patterns in URLConf and seeing that the new pattern wasn't matched anywhere.
So, with urls.py I don't get anywhere when writing random lines on it, I mean, invalid code, and django doesn't throw any exception and serves the urls just fine.
So I checked ROOT_URLCONF in settings.... |
Accessing a ServerFactory from the Service in Twisted | 2,353,932 | 2 | 1 | 408 | 0 | python,twisted | Well, after some help from a friend. I figured it out. If you create a multiservice, you can just pass the multiservice object to all your child services (I pass it in the init). Then you do setName('servicename'). Then from another service you can just get the information like so: x = self.multiService.getServiceNamed... | 0 | 1 | 0 | 0 | 2010-02-28T07:19:00.000 | 1 | 0.379949 | false | 2,350,394 | 0 | 0 | 1 | 1 | I've been trying to come up with a decent design for multiple factories access each others information. For example, I have the following services: 1 management web service, a VirtualHost instance (multiple domains) and a built in DNS service. Going through the finger tutorial was very helpful but it lacks some key poi... |
Clearing Django form fields on form validation error? | 2,353,816 | -2 | 7 | 12,273 | 0 | python,django,django-forms | I guess you need to use JavaScript to hide or remove the text from the container. | 0 | 0 | 0 | 0 | 2010-03-01T03:27:00.000 | 7 | -0.057081 | false | 2,353,732 | 0 | 0 | 1 | 1 | I have a Django form that allows a user to change their password. I find it confusing on form error for the fields to have the *'ed out data still in them.
I've tried several methods for removing form.data, but I keep getting a This QueryDict instance is immutable exception message.
Is there a proper way to clear indiv... |
Remote system event Notification Library | 2,354,106 | 1 | 0 | 286 | 0 | java,python | I think you are looking for a queuing system. Give JMS a try. | 0 | 0 | 0 | 0 | 2010-03-01T05:31:00.000 | 1 | 1.2 | true | 2,354,064 | 0 | 0 | 1 | 1 | Hi I am looking for some sort of library that will allow:
- multiple remote applications to register with the system on which events it is interested in
- When this event occurs, the system will sent out notification to these remote applications regarding this event
- Objects, or hash tables information should be able ... |
Making Django development server faster at serving static media | 3,426,911 | 2 | 12 | 6,082 | 0 | python,django | Run lighttpd to serve the static content and use the MEDIA_URL to point the pages at the lighttpd server that servers the static stuff. | 0 | 0 | 0 | 0 | 2010-03-01T19:26:00.000 | 6 | 0.066568 | false | 2,358,450 | 0 | 0 | 1 | 1 | I'm using the Django manage.py runserver for developing my application (obviously), but it takes 10 seconds to completely load a page because the development server is very, very slow at serving static media.
Is there any way to speed it up or some kind of workaround? I'm using Windows 7. |
Compatibility with IIS and Apache -- PHP, Python, etc? | 2,359,411 | 0 | 1 | 1,120 | 0 | php,python,apache,iis | I have several production php5/6 applications that run on either windows/iis and apache/linux. switching between platforms has not been an issue for me. i test on a windows server talking to a mysql db on a linux machine. i deploy to a linux web server without issue. i cannot speak for rails or pytong as i'm not a ruby... | 0 | 0 | 0 | 1 | 2010-03-01T21:49:00.000 | 2 | 0 | false | 2,359,314 | 0 | 0 | 1 | 2 | I'm currently planning out a web app that I want to host for people and allow them to host themselves on either Linux/Apache of IIS6 or IIS7 (for the benefits of bandwidth, directory services [login, etc.]).
I see that PHP is supported on both platforms. I've heard people serving Django and Python in IIS using PyISAPI... |
Compatibility with IIS and Apache -- PHP, Python, etc? | 2,359,605 | 0 | 1 | 1,120 | 0 | php,python,apache,iis | Your lowest common denominator for building apps to seemlessly run on both the LAMP and Microsoft stacks is PHP.
Perl is another option, it's well supported on both Windows and Linux/Apache. But I think I'd be choosing PHP over Perl because of support for FastCGI which improves reliability and performance on the Window... | 0 | 0 | 0 | 1 | 2010-03-01T21:49:00.000 | 2 | 1.2 | true | 2,359,314 | 0 | 0 | 1 | 2 | I'm currently planning out a web app that I want to host for people and allow them to host themselves on either Linux/Apache of IIS6 or IIS7 (for the benefits of bandwidth, directory services [login, etc.]).
I see that PHP is supported on both platforms. I've heard people serving Django and Python in IIS using PyISAPI... |
Python directory list returned to Django template | 2,360,257 | 1 | 0 | 2,696 | 0 | python,list,directory-structure | If it's a single directory, os.listdir('thedirectory') will give you a list of filename strings that seem to be suitable for your purposes (though it won't make "the urls" -- not sure how you want to make them?). If you need a whole tree of directories (recursively including subdirectories) then it's worth debugging y... | 0 | 0 | 0 | 0 | 2010-03-02T00:50:00.000 | 2 | 0.099668 | false | 2,360,205 | 0 | 0 | 1 | 1 | Total Python newb here. I have a images directory and I need to return the names and urls of those files to a django template that I can loop through for links. I know it will be the server path, but I can modify it via JS. I've tried os.walk, but I keep getting empty results. |
Pickled Object Versioning | 2,361,252 | 7 | 10 | 2,902 | 0 | python,serialization,pickle,serialversionuid | The pickle format has no such proviso. Why don't you just make the "serial version number" part of the object's attributes, to be pickled right along with the rest? Then the "notification" can be trivially had by comparing actual and desired version -- don't see why it should be a PITA. | 0 | 0 | 0 | 0 | 2010-03-02T05:45:00.000 | 2 | 1.2 | true | 2,361,140 | 0 | 0 | 1 | 1 | I am working on a project where we have a large number of objects being serialized and stored to disk using pickle/cPickle.
As the life of the project progresses (after release to customers in the field) it is likely that future features/fixes will require us to change the signature of some of our persisted objects. T... |
Simple and effective web framework | 2,362,938 | 5 | 4 | 1,599 | 0 | python,web-frameworks | This question is based on a complete failure to understand any of the tools you have apparently "investigated", or indeed web serving generally.
Django has an admin panel? Well, don't use it if you don't want to. There's no configuration that needs to be done there, it's for managing your data if you want.
PHP has chow... | 0 | 0 | 0 | 0 | 2010-03-02T11:49:00.000 | 12 | 0.083141 | false | 2,362,840 | 0 | 0 | 1 | 5 | I'm looking for a suitable cross-platform web framework (if that's the proper term). I need something that doesn't rely on knowing the server's address or the absolute path to the files. Ideally it would come with a (development) server and be widely supported.
I've already tried PHP, Django and web2py. Django had an a... |
Simple and effective web framework | 2,363,485 | 1 | 4 | 1,599 | 0 | python,web-frameworks | What I need is a simple and effective cross-platform web development language that works pretty much anywhere.
Have you tried HTML?
But seriously, I think Pekka is right when he says you need to specify and clarify what you want.
Most of the features you don't want are standard modules of a web app (user and role mgm... | 0 | 0 | 0 | 0 | 2010-03-02T11:49:00.000 | 12 | 0.016665 | false | 2,362,840 | 0 | 0 | 1 | 5 | I'm looking for a suitable cross-platform web framework (if that's the proper term). I need something that doesn't rely on knowing the server's address or the absolute path to the files. Ideally it would come with a (development) server and be widely supported.
I've already tried PHP, Django and web2py. Django had an a... |
Simple and effective web framework | 2,362,857 | 0 | 4 | 1,599 | 0 | python,web-frameworks | I'd say Ruby on Rails is what you're looking for. Works anywhere, and no configuration needed. You only have it installed, install the gems you need, and off you go.
I also use ColdFusion, which is totally multi-platform, but relies on the Administrator settings for DSN configuration and stuff. | 0 | 0 | 0 | 0 | 2010-03-02T11:49:00.000 | 12 | 0 | false | 2,362,840 | 0 | 0 | 1 | 5 | I'm looking for a suitable cross-platform web framework (if that's the proper term). I need something that doesn't rely on knowing the server's address or the absolute path to the files. Ideally it would come with a (development) server and be widely supported.
I've already tried PHP, Django and web2py. Django had an a... |
Simple and effective web framework | 2,362,864 | -1 | 4 | 1,599 | 0 | python,web-frameworks | I think you need to focus on Restful web applications. Zend is a PHP based MVC framework. | 0 | 0 | 0 | 0 | 2010-03-02T11:49:00.000 | 12 | -0.016665 | false | 2,362,840 | 0 | 0 | 1 | 5 | I'm looking for a suitable cross-platform web framework (if that's the proper term). I need something that doesn't rely on knowing the server's address or the absolute path to the files. Ideally it would come with a (development) server and be widely supported.
I've already tried PHP, Django and web2py. Django had an a... |
Simple and effective web framework | 2,363,373 | 0 | 4 | 1,599 | 0 | python,web-frameworks | Use plain old ASP. IIS does not care where files are stored. All paths can be set relative from the virtual directory. That means you can include "/myproject/myfile.asp", whereas in PHP it's often done using relative paths. Global.asa then contains global configuration for the application. You hardly ever have to worry... | 0 | 0 | 0 | 0 | 2010-03-02T11:49:00.000 | 12 | 0 | false | 2,362,840 | 0 | 0 | 1 | 5 | I'm looking for a suitable cross-platform web framework (if that's the proper term). I need something that doesn't rely on knowing the server's address or the absolute path to the files. Ideally it would come with a (development) server and be widely supported.
I've already tried PHP, Django and web2py. Django had an a... |
How do I run Javascript tests in Windmill when using test_windmill for Django? | 2,468,981 | 0 | 0 | 354 | 0 | python,django,unit-testing,automated-tests,windmill | Ok, so couldn't find out how to do this so I'm running the website under Apache and using the windmill standard jstests parameter to run the Javascript tests against this. | 0 | 0 | 0 | 1 | 2010-03-03T17:22:00.000 | 1 | 0 | false | 2,373,446 | 0 | 0 | 1 | 1 | I'm using the Windmill test system and have it running using test_windmill for Django which works fine for the Python tests. I'd like this to run a suite of Javascript tests also whilst the Django test server is running. I've used the run_js_tests call from the Windmill shell which works fine but I can't find a way to ... |
global set up in django test framework? | 17,461,581 | 3 | 12 | 2,735 | 0 | python,django,testing | This is partially addressed in newer versions of python/django by setUpClass() which will at least allow me to run class level setup. | 0 | 0 | 0 | 1 | 2010-03-03T19:11:00.000 | 3 | 0.197375 | false | 2,374,197 | 0 | 0 | 1 | 1 | Is there some way (using the standard Django.test.TestCase framework) to perform a global initialization of certain variables, so that it only happens once.
Putting things setUp() makes it so that the variables are initialized before each test, which kills performance when the setup involves expensive operations. I'd l... |
Models in database speed vs static dictionaries speed | 2,391,789 | 0 | 1 | 237 | 0 | python,django,dictionary | If you need fast access from multiple processes, then a database is the best option for you.
However, if you just want to keep data in memory and access it from multiple places in the same process, then Python dictionaries will be faster than accessing a DB. | 0 | 0 | 0 | 0 | 2010-03-06T07:58:00.000 | 3 | 0 | false | 2,391,788 | 1 | 0 | 1 | 1 | I have a need for some kind of information that is in essence static. There is not much of this information, but alot of objects will use that information.
Since there is not a lot of that information (few dictionaries and some lists), I thought that I have 2 options - create models for holding that information in the ... |
Is there a better way to parse html tables than lxml | 2,393,941 | 2 | 0 | 293 | 0 | python,browser,lxml | Actually, browser engines are deliberately stupid in their parsing of HTML, assuming that what they get is only marginally correct. lxml and BeautifulSoup attempt to mimic this level of stupidity, so they are the correct tools to use. | 0 | 0 | 0 | 0 | 2010-03-06T19:59:00.000 | 2 | 0.197375 | false | 2,393,917 | 0 | 0 | 1 | 1 | I am working with html documents and ripping out tables to parse them if they turn out to be the correct tables. I am happy with the results - my extraction process successfully maps row labels and column headings in over 95% of the cases and in the cases it does not we can identify the problems and use other approach... |
Calling an executable from within Python / Django web application running on IIS | 2,395,623 | 0 | 1 | 1,622 | 0 | python,windows,django,iis,executable | Might be a permissions issue. when you run from the shell, you're using the user that run the python manage.py shell command. When serving requests from the IIS you're using its user (IUSR or something like that). Try giving execution permission on the executable file to the Everyone group just to see if it helps. | 0 | 1 | 0 | 0 | 2010-03-06T20:48:00.000 | 1 | 0 | false | 2,394,054 | 0 | 0 | 1 | 1 | I have a Python / Django application which is supposed to call an external windows binary and get its output at some point. And it does so when tested via 'python manage.py shell'.
But when it is run from within the web browser, which is served by IIS, the external application is not executed.
Is IIS blocking somethin... |
Python _ctypes import error on OSX 10.6 | 2,394,908 | 0 | 3 | 2,937 | 0 | python,macos | The only thing that I can think of is that maybe it's not on your path. Seems unlikely, but I would check that anyways. | 0 | 1 | 0 | 0 | 2010-03-07T02:09:00.000 | 4 | 0 | false | 2,394,903 | 0 | 0 | 1 | 2 | I'm very new to Python development, and am having a problem with one of my apps in OSX.
Technologies being used in this project
python 2.6
django
google app engine
rpx (openid)
When loading up the site on my windows app, there are no issues, but when trying to same app on OSX 10.6, I get the following issue:
ImportE... |
Python _ctypes import error on OSX 10.6 | 4,802,082 | 3 | 3 | 2,937 | 0 | python,macos | I don't have enough rep to comment so I will make this a post.
The accepted answer is correct in that all you need to do is set the Python Path in the GAE preferences to /usr/bin/python2.5.
There is no need to download python 2.5 via macports or from the official python website.
python 2.5 is still installed in OSX 10.... | 0 | 1 | 0 | 0 | 2010-03-07T02:09:00.000 | 4 | 0.148885 | false | 2,394,903 | 0 | 0 | 1 | 2 | I'm very new to Python development, and am having a problem with one of my apps in OSX.
Technologies being used in this project
python 2.6
django
google app engine
rpx (openid)
When loading up the site on my windows app, there are no issues, but when trying to same app on OSX 10.6, I get the following issue:
ImportE... |
migrating from one framework to another in python | 2,396,341 | 1 | 0 | 149 | 0 | python,django,frameworks,migrate | Your database queries(and object models), url config, and templates to say the least will all be specific to django. That said - if you understand what you're doing, recreating them in another package shouldn't take too long if you really need to at some later time.
edit: this is all assuming you dont integrate third p... | 0 | 0 | 0 | 0 | 2010-03-07T12:57:00.000 | 2 | 0.099668 | false | 2,396,294 | 0 | 0 | 1 | 1 | I'm having trouble deciding which python framework to use for my website. So I've decided to bite the bullet and use Django. My question is how easy (or difficult) will it be to migrate to a different framework in future if I have issues with Django ? |
In Django, what is the best way to manage both a mobile and desktop site? | 2,396,949 | 9 | 5 | 1,531 | 0 | python,css,django,mobile,templates | Have two sets of templates, one for mobile, one for desktop. Store the filenames in a pair of dictionaries, and use the User-agent header to detect which set should be used. Also allow manual selection of which site to use via a session entry. | 0 | 0 | 0 | 0 | 2010-03-07T16:18:00.000 | 6 | 1.2 | true | 2,396,938 | 0 | 0 | 1 | 2 | I'd like everything to function correctly, except when it's mobile, the entire site will used a set of specific templates.
Also, I'd like to autodetect if it's mobile. If so, then use that set of templates throughout the entire site. |
In Django, what is the best way to manage both a mobile and desktop site? | 2,397,185 | 1 | 5 | 1,531 | 0 | python,css,django,mobile,templates | If you place a class on your body (Django uses something similar to specify what column style to use), you could use the same templates but simply use different stylesheets. I'm not sure what main differences you are using separate templates for, but this might allow you to cut down on re-coding the templates multiple... | 0 | 0 | 0 | 0 | 2010-03-07T16:18:00.000 | 6 | 0.033321 | false | 2,396,938 | 0 | 0 | 1 | 2 | I'd like everything to function correctly, except when it's mobile, the entire site will used a set of specific templates.
Also, I'd like to autodetect if it's mobile. If so, then use that set of templates throughout the entire site. |
Web scraping with Python | 2,397,311 | 1 | 9 | 4,506 | 0 | python,firefox,webkit,web-scraping | Well, WebKit is open source so you could use its own parser (in the WebCore component), if any language is acceptable | 0 | 0 | 1 | 0 | 2010-03-07T18:07:00.000 | 10 | 0.019997 | false | 2,397,295 | 0 | 0 | 1 | 1 | I'm currently trying to scrape a website that has fairly poorly-formatted HTML (often missing closing tags, no use of classes or ids so it's incredibly difficult to go straight to the element you want, etc.). I've been using BeautifulSoup with some success so far but every once and a while (though quite rarely), I run... |
Unit testing aspect-oriented features | 2,402,152 | 0 | 4 | 258 | 0 | python,unit-testing,aop | Well... let's see. In my opinion you are testing three different things here (sorry for the "Java AOP jargon"):
the features implemented by the interceptors (i.e. the methods that implement the functions activated at the cutpoints)
the coverage of the filters (i.e. whether the intended cutpoints are activated correctl... | 0 | 0 | 0 | 1 | 2010-03-08T14:03:00.000 | 3 | 0 | false | 2,401,789 | 0 | 0 | 1 | 2 | I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security?
These things are sort of omni-present in the application, so how to test them properly?
E.g. ... |
Unit testing aspect-oriented features | 2,796,926 | 1 | 4 | 258 | 0 | python,unit-testing,aop | IMHO, the way of testing users permissions to the pages depends on the design of your app and design of the framework you're using.
Generally, it's probably enough to cover your permission checker decorator with unit tests to make sure it always works as expected and then write a test that cycles through your 'views' (... | 0 | 0 | 0 | 1 | 2010-03-08T14:03:00.000 | 3 | 0.066568 | false | 2,401,789 | 0 | 0 | 1 | 2 | I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security?
These things are sort of omni-present in the application, so how to test them properly?
E.g. ... |
Google App Engine UI Widgets | 2,404,551 | 3 | 5 | 2,260 | 0 | python,user-interface,google-app-engine | There is no difference in the amount of built in widgets available to the python and java sides of app engine. Neither side has any! App Engine is primarily a back end technology. It allows you to use pretty much whatever web framework you want for your presentation layer, subject to constraints that Alex mentions.
G... | 1 | 0 | 0 | 0 | 2010-03-08T14:52:00.000 | 3 | 0.197375 | false | 2,402,128 | 0 | 0 | 1 | 1 | Are there any UI widgets available to the python side of Google App Engine? I'd like something like the collapsed/expanded views of Google Groups threads. Are these type things limited to the GWT side? |
How do I create a set of image files from a PowerPoint file file? | 2,403,104 | 4 | 4 | 2,977 | 0 | python,powerpoint,jpeg | Off the top of my head, the way I'd do it:
Use OpenOffice.org to convert the .ppt file into a PDF. (OO.o has a very rich Java API. Rich and bloody difficult to use, mind, but once you figure out how to get it to do the task you need, you're all set. Dunno if you can do anything useful with it via Python; not my lan... | 0 | 0 | 0 | 0 | 2010-03-08T16:59:00.000 | 3 | 0.26052 | false | 2,403,041 | 0 | 0 | 1 | 1 | I'm creating a "slideshow room" web page. The user will upload a PowerPoint file that my server will use to generate a set of .jpg image files representing the slides to present in a custom "gallery viewer".
I'm an experienced Python developer but I cannot find anything useful.
How can I do that? |
Setting up a python screen scraper that could work on Google App engine | 2,660,349 | 0 | 3 | 2,539 | 0 | python,google-app-engine,screen-scraping | I have used BeautifulSoup with great success parsing HTML. Problem is that's all BeautifulSoup does, is parse the HTML. I ended up writing all the http interactions using urlfetch.
To web-scrape my target I need a full fledged code driven browser that can execute javascript on my target site's pages. I think I'm h... | 0 | 1 | 0 | 0 | 2010-03-09T01:38:00.000 | 4 | 0 | false | 2,406,082 | 0 | 0 | 1 | 2 | I am looking to setup a automated screen scraper that will run on Google app engine using python. I want it to scrape the site and put the specified results into a Entity in app engine. I am looking for some directions on what to use. I have seen beautifulsoup but wonder if people could recommend anything else that cou... |
Setting up a python screen scraper that could work on Google App engine | 2,406,093 | 0 | 3 | 2,539 | 0 | python,google-app-engine,screen-scraping | The other choice is lxml, but it uses C code and so does not work on GAE. | 0 | 1 | 0 | 0 | 2010-03-09T01:38:00.000 | 4 | 0 | false | 2,406,082 | 0 | 0 | 1 | 2 | I am looking to setup a automated screen scraper that will run on Google app engine using python. I want it to scrape the site and put the specified results into a Entity in app engine. I am looking for some directions on what to use. I have seen beautifulsoup but wonder if people could recommend anything else that cou... |
Add directory to PYTHONPATH ( multiple drives ), for auto-complete | 2,415,055 | 2 | 1 | 1,976 | 0 | python,autocomplete,pythonpath | Have you tried adding Additional import directories in Edit/Preferences/ under Languages/Python in Komodo?
Edit: I think you can also add a .pth file in [komodo-install-dir]/lib/mozilla/python/ or C:\[PythonVersion]\Lib\site-packages\ containing all other path you might want to be available. Not sure wich way is more a... | 0 | 0 | 0 | 0 | 2010-03-10T06:45:00.000 | 1 | 1.2 | true | 2,415,014 | 0 | 0 | 1 | 1 | I have 2 hard-drives, C:\ and D:\
Django imports correctly (which is in my C drive), but my application is on my D drive. I can't move it to the C drive because of some back-up software I'm running/
I'm trying to get auto-complete to work in Komodo Edit 5 which works fine for Django, but not for my application. There a... |
stop django from taking out javascript/frames? | 2,416,776 | 0 | 0 | 200 | 0 | python,django,django-templates | Django doesn't strip out javascript, because it is client side agnostic.
How are you inserting javascript into your website? If you are trying to put it into database (like ) it will escaped. | 0 | 0 | 0 | 0 | 2010-03-10T12:08:00.000 | 3 | 0 | false | 2,416,677 | 0 | 0 | 1 | 2 | Very newbie question, but please be gentle with me. Our site uses Django CMS and we're trying to insert some javascript into particular stories, but it appears Django is stripping out any javascript or iframes we put in there as soon as we save the story. How do we allow javascript to be used in stories? Is it being de... |
stop django from taking out javascript/frames? | 2,416,764 | 2 | 0 | 200 | 0 | python,django,django-templates | Django is probably automatically escaping the content the javascript / html as the template renders the content. It does this for security purposes.
The solution depends on which version of django you're running, whether you'll be rendering any content from untrusted sources, how the templates are put together and perh... | 0 | 0 | 0 | 0 | 2010-03-10T12:08:00.000 | 3 | 0.132549 | false | 2,416,677 | 0 | 0 | 1 | 2 | Very newbie question, but please be gentle with me. Our site uses Django CMS and we're trying to insert some javascript into particular stories, but it appears Django is stripping out any javascript or iframes we put in there as soon as we save the story. How do we allow javascript to be used in stories? Is it being de... |
Django and "get() returned more than one Model name" error in multi-threaded program | 2,417,080 | 2 | 1 | 4,232 | 0 | python,mysql,database,multithreading,insert | This is not caused by multithreading, but because there are more than one object in database, that satisfies your query. You must select exactly one object from the database using get, otherwise it will raise an exception. | 0 | 0 | 0 | 0 | 2010-03-10T12:31:00.000 | 1 | 1.2 | true | 2,416,819 | 0 | 0 | 1 | 1 | Django's get_or_create function always cause "get() returned more than one Model name" error in a multi-threaded program.
I even tried to put get_or_create statement inside a lock.acquire() and lock.release() block but still didn't work.
The program only works when I set thread_count=1
The database is on InnoDB engine.... |
Old desktop programmer wants to create S+S project | 2,430,572 | 0 | 1 | 174 | 1 | php,python,ruby-on-rails,programming-languages,saas | If you wan't to run a version of the server on desktops, your best options would be Python, Rails, or Java servlets, all of which can be easily packaged into small self contained servers with no dependencies.
My recommendation for the desktop would be HTML 5 local storage. The standard hasn't been finalized, but there... | 0 | 0 | 0 | 0 | 2010-03-11T19:38:00.000 | 3 | 0 | false | 2,428,077 | 0 | 0 | 1 | 3 | I have an idea for a product that I want to be web-based. But because I live in a part of the world where the internet is not always available, there needs to be a client desktop component that is available for when the internet is down. Also, I have been a SQL programmer, a desktop application programmer using dBase, ... |
Old desktop programmer wants to create S+S project | 2,429,484 | 0 | 1 | 174 | 1 | php,python,ruby-on-rails,programming-languages,saas | The languages you list are all serverside components. The big question is whether you can sensibly build a thick client - effectively you could develop a multi-tier application where the webserver sits on the client and uses a webservice as a datafeed if/when its available but the solution is not very portable.
You cou... | 0 | 0 | 0 | 0 | 2010-03-11T19:38:00.000 | 3 | 0 | false | 2,428,077 | 0 | 0 | 1 | 3 | I have an idea for a product that I want to be web-based. But because I live in a part of the world where the internet is not always available, there needs to be a client desktop component that is available for when the internet is down. Also, I have been a SQL programmer, a desktop application programmer using dBase, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.