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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PHP Frameworks (CodeIgniter, Yii, CakePHP) vs. Django | 2,578,635 | 31 | 21 | 30,143 | 0 | python,django,cakephp,web-frameworks,yii | This is a very subjective question but personally I'd recommend Django. Python is a very nice language to use and the Django framework is small, easy to use, well documented and also has a pretty active community.
This choice was made partly because of my dislike for PHP though, so take the recommendation with a pinch ... | 0 | 0 | 0 | 1 | 2010-04-05T13:18:00.000 | 8 | 1 | false | 2,578,540 | 0 | 0 | 1 | 5 | I have to develop a site which has to accomodate around 2000 users a day and speed is a criterion for it. Moreover, the site is a user oriented one where the user will be able to log in and check his profile, register for specific events he/she wants to participate in. The site is to be hosted on a VPS server.Although ... |
PHP Frameworks (CodeIgniter, Yii, CakePHP) vs. Django | 2,578,670 | 29 | 21 | 30,143 | 0 | python,django,cakephp,web-frameworks,yii | Most of the frameworks out there nowadays are fast enough to serve whatever needs you will have. It really depends on in which environment you feel most comfortable. Though there are nuances here and there, MVC frameworks share a lot of the same principles, so whichever you choose to use is really a matter of which you... | 0 | 0 | 0 | 1 | 2010-04-05T13:18:00.000 | 8 | 1.2 | true | 2,578,540 | 0 | 0 | 1 | 5 | I have to develop a site which has to accomodate around 2000 users a day and speed is a criterion for it. Moreover, the site is a user oriented one where the user will be able to log in and check his profile, register for specific events he/she wants to participate in. The site is to be hosted on a VPS server.Although ... |
Using set with values from a table | 2,579,922 | 1 | 3 | 85 | 1 | python,sql,mysql,django-models | The answer is clear too. You will need not a field, but another films_actors table. This table would act as your field, but much more reliable. This is called many-to-many relation. | 0 | 0 | 0 | 0 | 2010-04-05T17:31:00.000 | 2 | 0.099668 | false | 2,579,866 | 0 | 0 | 1 | 1 | I'm writing a database of all DVDs I have at home.
One of the fields, actors, I would like it to be a set of values from an other table, which is storing actors. So for every film I want to store a list of actors, all of which selected from a list of actors, taken from a different table.
Is it possible? How do I do thi... |
Unittest in Django. Static variable feeded into the test case | 2,580,813 | 3 | 2 | 399 | 0 | python,django,unit-testing | This is normal unittest behavior, though you would normally set up the test data in the setUp() method instead of __init__ (and destroy it in tearDown() perhaps).
If generating your dynamic test data takes to long to perform for each test case method, then I guess the best way to go is to create a singleton test data ... | 0 | 0 | 0 | 0 | 2010-04-05T19:35:00.000 | 1 | 1.2 | true | 2,580,648 | 0 | 0 | 1 | 1 | I want to generate some dynamic data and feed these data in to test cases. But I found that Django will initial the test class every time to do the test. So the data will get generated every time django test framework calls the function.
Is there anyway to use something like the singleton or static variable to solve t... |
Disable autocomplete on textfield in Django? | 3,672,334 | 33 | 28 | 19,773 | 0 | python,django,forms,autocomplete | Add the autocomplete="off" to the form tag, so you don't have to change the django.form instance.
<form action="." method="post" autocomplete="off">
{{ form }}
</form> | 0 | 0 | 0 | 0 | 2010-04-05T20:23:00.000 | 5 | 1 | false | 2,580,955 | 0 | 0 | 1 | 1 | Does anyone know how you can turn off autocompletion on a textfield in Django?
For example, a form that I generate from my model has an input field for a credit card number. It is bad practice to leave autocompletion on. When making the form by hand, I'd add a autocomplete="off" statement, but how do you do it in Djan... |
What's the easiest way to get my facebook status and photos using python? | 2,582,677 | 0 | 0 | 2,103 | 0 | python,django,facebook,pyfacebook | Probably. Anything that bypassed authentication would be a fairly large privacy issue. | 0 | 0 | 0 | 0 | 2010-04-06T04:21:00.000 | 3 | 0 | false | 2,582,627 | 0 | 0 | 1 | 1 | I just want to import my facebook status and photos to my personal django website but all the examples and documentation i can find are for developing facebook applications.
A simple rss feed would be enough but it doesnt seem to exist in facebook.
Do i really have to create a full facebook app to do this? |
How to use ';' (semicolon) in urls, using Google Appengine | 5,877,046 | 0 | 2 | 336 | 0 | python,google-app-engine,url | Issue816 has now been fixed, semi-colons are usable with appengine. | 0 | 1 | 0 | 0 | 2010-04-07T12:54:00.000 | 2 | 1.2 | true | 2,592,540 | 0 | 0 | 1 | 1 | Using the local dev server, I can use ';' in urls, but as soon as I try the live version hosted by Google, it looks like the ';' and everything afterward is stripped (at least according to request.path_qs).
(I would prefer not to encode them if possible, it's much less user friendly if the url cannot be constructed by ... |
Running Java, Python, Ruby and Perl programs in .NET | 2,593,537 | 7 | 0 | 421 | 0 | java,.net,python,ruby,perl | Do you want to run programs in these languages inside the .NET platform? You'd need IronPython or IronRuby (I don't think anything like IronPerl exists).
If you want to run "normal" Python/Ruby/Perl/Java programs, then yes, you'll need to install a Python interpreter, a Ruby interpreter, a Perl interpreter and a Java V... | 0 | 0 | 0 | 0 | 2010-04-07T15:02:00.000 | 4 | 1.2 | true | 2,593,519 | 1 | 0 | 1 | 3 | I've .NET framework 3.5 installed in my laptop. Just .NET alone, no Visual Studio. How can I run Java, Python, Ruby and Perl programs from the console?
Do I need to install something else also, for running these language files?
In case there is a need for something extra to be installed and after i have all of them, w... |
Running Java, Python, Ruby and Perl programs in .NET | 2,593,551 | 3 | 0 | 421 | 0 | java,.net,python,ruby,perl | None of those languages are supported natively with .NET. You can try IronPython or IronRuby for those languages, but to run Java or Perl I think you'll actually need to download and install a Java VM and a perl interpreter. | 0 | 0 | 0 | 0 | 2010-04-07T15:02:00.000 | 4 | 0.148885 | false | 2,593,519 | 1 | 0 | 1 | 3 | I've .NET framework 3.5 installed in my laptop. Just .NET alone, no Visual Studio. How can I run Java, Python, Ruby and Perl programs from the console?
Do I need to install something else also, for running these language files?
In case there is a need for something extra to be installed and after i have all of them, w... |
Running Java, Python, Ruby and Perl programs in .NET | 2,593,556 | 1 | 0 | 421 | 0 | java,.net,python,ruby,perl | There's no practical common virtual machine or binary for the options you list. You will require a separate install for each of these (note that all are unrelated to .NET) | 0 | 0 | 0 | 0 | 2010-04-07T15:02:00.000 | 4 | 0.049958 | false | 2,593,519 | 1 | 0 | 1 | 3 | I've .NET framework 3.5 installed in my laptop. Just .NET alone, no Visual Studio. How can I run Java, Python, Ruby and Perl programs from the console?
Do I need to install something else also, for running these language files?
In case there is a need for something extra to be installed and after i have all of them, w... |
Is there a way to backup everything in an app-engine blobstore? | 2,594,009 | 2 | 3 | 645 | 0 | python,google-app-engine,blobstore | In Java, you would instantiate a BlobInfoFactory and use BlobInfoFactory.queryBlobInfos.
Then for each blob, you would run BlobstoreService.serve(...) with the BlobKeys returned from the BlobInfos. You still might end up with broken entity relationships - there's no way to guarantee each blob will end up with the sam... | 0 | 1 | 0 | 0 | 2010-04-07T15:31:00.000 | 1 | 0.379949 | false | 2,593,756 | 0 | 0 | 1 | 1 | bulkloader.py is very handy.
But as far as I can tell it doesn't appear to fetch items from the blobstore, so you can be left with broken entity relationships if you needed to dump/restore your application.
Does anyone know a method for completely backing up their data from app-engine including blobstore data? |
Why would Django fcgi just die? How can I find out? | 2,664,142 | 0 | 6 | 916 | 0 | python,django,logging,crash,lighttpd | Have had the same problems. Not only do they die without warning or reason they leak like crazy too with threads being stuck without a master process. We solved this problem by having a cronjob run every 5 minutes that checks if the port number is up and running and if not restart.
By the way, we've now (slowly migrati... | 0 | 0 | 0 | 1 | 2010-04-08T13:32:00.000 | 3 | 0 | false | 2,600,212 | 0 | 0 | 1 | 2 | I'm running Django on Linux using fcgi and Lighttpd. Every now and again (about once a day) the server just dies. I'm using the latest stable release of Django, Python and Lighttpd.
The only thing I can think of is that my program is opening a lot of files and executing a lot of external processes, but I'm fairly sure ... |
Why would Django fcgi just die? How can I find out? | 2,653,742 | 0 | 6 | 916 | 0 | python,django,logging,crash,lighttpd | Is this on your server? (do you own the box?). I've had that problem on shared hosting, and the host was just killing long processes. Do you know if your fcgi is receiving a SIGTERM? | 0 | 0 | 0 | 1 | 2010-04-08T13:32:00.000 | 3 | 0 | false | 2,600,212 | 0 | 0 | 1 | 2 | I'm running Django on Linux using fcgi and Lighttpd. Every now and again (about once a day) the server just dies. I'm using the latest stable release of Django, Python and Lighttpd.
The only thing I can think of is that my program is opening a lot of files and executing a lot of external processes, but I'm fairly sure ... |
How to use the validation rules on both client-side and server-side? | 2,606,444 | 2 | 9 | 926 | 0 | jquery,python,django,validation | No, no such thing exists.
Yes, you need to code it yourself.
However, I imagine you could possibly create widgets which are able to deliver generic validation js routines based on the modelFields. Such as "This should be chars not more than max_length". However they could not trivially generate client-side code to va... | 0 | 0 | 0 | 0 | 2010-04-09T09:29:00.000 | 3 | 0.132549 | false | 2,606,283 | 0 | 0 | 1 | 1 | I'm using jQuery validation system for client-side validation. The backend works with django.
jQuery use an interesting set of rules in JSON format.
Does exists something to use the same rules on django side or I need to code it myself? |
ISBNs are used as primary key, now I want to add non-book things to the DB - should I migrate to EAN? | 2,610,094 | 3 | 2 | 1,516 | 1 | python,django,postgresql,isbn | I don't know postgres but normally ISBM would be a unique index key but not the primary. It's better to have an integer as primary/foreign key. That way you only need to add a new field EAN/ISSN as nullable. | 0 | 0 | 0 | 0 | 2010-04-09T18:45:00.000 | 4 | 0.148885 | false | 2,610,000 | 0 | 0 | 1 | 2 | I built an inventory database where ISBN numbers are the primary keys for the items. This worked great for a while as the items were books. Now I want to add non-books. some of the non-books have EANs or ISSNs, some do not.
It's in PostgreSQL with django apps for the frontend and JSON api, plus a few supporting python ... |
ISBNs are used as primary key, now I want to add non-book things to the DB - should I migrate to EAN? | 2,614,029 | 1 | 2 | 1,516 | 1 | python,django,postgresql,isbn | A simple solution (although arguably whether good) would be to use (isbn,title) or (isbn,author) which should pretty much guarantee uniqueness. Ideology is great but practicality also serves a purpose. | 0 | 0 | 0 | 0 | 2010-04-09T18:45:00.000 | 4 | 0.049958 | false | 2,610,000 | 0 | 0 | 1 | 2 | I built an inventory database where ISBN numbers are the primary keys for the items. This worked great for a while as the items were books. Now I want to add non-books. some of the non-books have EANs or ISSNs, some do not.
It's in PostgreSQL with django apps for the frontend and JSON api, plus a few supporting python ... |
Django project models.py versus app models.py | 2,610,788 | 6 | 18 | 11,119 | 0 | python,django,django-models | Django models can only reside in applications, not in project itself. By default manage.py inspectdb outputs content of the models.py file and it's up to you to put it in the right place.
In your case it would be easier to put whole thing in one app and later split it in the places where it would make sense.
I'm not su... | 0 | 0 | 0 | 0 | 2010-04-09T20:35:00.000 | 3 | 1 | false | 2,610,727 | 0 | 0 | 1 | 1 | I am learning Django and I am trying to understand the use of models.py in the project versus the application. It seems from the tutorial examples that I include a model definition in the app, but when I went to apply that knowledge to my own existing database I got stuck.
I took a database that I use (a copy of cours... |
Python Desktop Application with the Browser as an interface? | 2,611,928 | 2 | 27 | 25,678 | 0 | python,browser,desktop,httpserver | There are plenty of excellent GUI tools for the way you want to do your GUI -- HTML, CSS, and Javascript. If you don't know of any, ask in a separate question with the right tags.
The Python side in such an arrangement should have no GUI of its own, but just run a subclass of the Python's standard library's HTTP serve... | 0 | 0 | 1 | 0 | 2010-04-10T01:45:00.000 | 5 | 0.07983 | false | 2,611,910 | 0 | 0 | 1 | 1 | I want to create an application that runs on the users computer, a stand-alone application, with installation and what-not, but I want the interface to be a browser, either internal and displayed as an OS window or external accessible using the browser (i.e. some http server).
The reason would be because I know a littl... |
Storing URLs while Spidering | 2,615,862 | 4 | 7 | 1,194 | 0 | python,database,url,storage,web-crawler | It depends on the scale of the spidering you're going to be doing, and the kind of machine you're doing it on. Suppose a typical URL is a string of 60 bytes or so, an in-memory set will take a bit more than 100 bytes per URL (sets and dicts in Python are never allowed to grow beyond 60% full, for speed reasons). If y... | 0 | 0 | 0 | 0 | 2010-04-11T02:19:00.000 | 6 | 0.132549 | false | 2,615,830 | 0 | 0 | 1 | 3 | I created a little web spider in Python which I'm using to collect URLs. I'm not interested in the content. Right now I'm keeping all the visited URLs in a set in memory, because I don't want my spider to visit URLs twice. Of course that's a very limited way of accomplishing this.
So what's the best way to keep track o... |
Storing URLs while Spidering | 2,615,836 | 7 | 7 | 1,194 | 0 | python,database,url,storage,web-crawler | These seem to be the important aspects to me:
You can't keep the URLs in memory as RAM will get too high
You need fast existence lookups at least O(logn)
You need fast insertions
There are many ways to do this and it depends on how big your database will get. I think an SQL database can provide a good model for you... | 0 | 0 | 0 | 0 | 2010-04-11T02:19:00.000 | 6 | 1.2 | true | 2,615,830 | 0 | 0 | 1 | 3 | I created a little web spider in Python which I'm using to collect URLs. I'm not interested in the content. Right now I'm keeping all the visited URLs in a set in memory, because I don't want my spider to visit URLs twice. Of course that's a very limited way of accomplishing this.
So what's the best way to keep track o... |
Storing URLs while Spidering | 2,615,904 | 9 | 7 | 1,194 | 0 | python,database,url,storage,web-crawler | I've written a lot of spiders. To me, a bigger problem than running out of memory is the potential of losing all the URLs you've spidered already if the code or machine crashes or you decide you need to tweak the code. If you run out of RAM most machines and OSes these days will page so you'll slow down but still funct... | 0 | 0 | 0 | 0 | 2010-04-11T02:19:00.000 | 6 | 1 | false | 2,615,830 | 0 | 0 | 1 | 3 | I created a little web spider in Python which I'm using to collect URLs. I'm not interested in the content. Right now I'm keeping all the visited URLs in a set in memory, because I don't want my spider to visit URLs twice. Of course that's a very limited way of accomplishing this.
So what's the best way to keep track o... |
Does python-memcached support consistent hashing & binary protocol? | 2,616,824 | 2 | 4 | 2,396 | 0 | python,django,memcached,python-memcached,consistent-hashing | Looking at the _get_server method on python-memcached v1.45, it seems it doesn't use consistent hashing, but a simple hash % len(buckets).
Same goes for binary protocol, python-memcache uses, as far as I can see in the source, only text commands. | 0 | 0 | 0 | 0 | 2010-04-11T09:45:00.000 | 6 | 1.2 | true | 2,616,610 | 0 | 0 | 1 | 1 | Python-memcached is the official supported memcached driver for Django.
Does it support
Consistent hashing
Binary protocol
If it does, how do I use those features within Django? I couldn't find any documentation. |
How to convert Selenese (html) to Python programmatically? | 2,620,931 | 0 | 6 | 2,514 | 0 | python,selenium,selenium-rc,selenium-ide | No there isn't a way but in theory it shouldn't be too difficult to do as all you need to do is have something that uses the python-rc.js to convert the file. | 0 | 0 | 1 | 0 | 2010-04-11T16:16:00.000 | 2 | 0 | false | 2,617,684 | 0 | 0 | 1 | 1 | How would I convert test cases made by Selenium IDE to Python without exporting every test case by hand? Is there any command line converter for that job?
In the end I want to use Selenium RC and Pythons build in unittest to test my websites.
Thanks a lot.
Update:
I started to write a converter but its too much work to... |
Mod_wsgi versus fapws3 - Django | 2,633,716 | 3 | 0 | 853 | 0 | python,django,mod-wsgi,wsgi,fapws3 | The underlying web server is not the bottleneck, it is your application and database access. The differences between any underlying web server are going to very minimal or non existent in the context of an actual full application stack. You cannot base decisions on hello world type tests as they are pretty meaningless.... | 0 | 0 | 0 | 1 | 2010-04-13T11:26:00.000 | 2 | 0.291313 | false | 2,629,070 | 0 | 0 | 1 | 1 | is there a difference between using FAPWS3 and MOD_WSGI when dealing with Django?
FAPWS3 seems alot faster when serving requests toward Python scripts. I would like to know if I'm missing out anything. :)
Any ideas? |
Generate an image / thumbnail of a webpage using X/Gui-less linux | 14,925,431 | 1 | 0 | 353 | 0 | php,python,linux,image-processing | I'll never get back the time I wasted on wkhtml and Xvfb, along with the joy of embedding a monolithic binary from google onto my system. You can save yourself a lot of time and headache by abandoning wkhtml2whatever completely and installing phantom.js. Once I did that, I had five lines of shell code and beautiful ima... | 0 | 0 | 0 | 0 | 2010-04-13T17:40:00.000 | 2 | 0.099668 | false | 2,631,813 | 0 | 0 | 1 | 1 | There exists numerous solutions on generating a thumbnail or an image preview of a webpage. Some of these solutions are webs-based like websnapshots, windows libraries such as PHP's imagegrabscreen (only works on windows), and KDE's wkhtml. Many more do exist.
However, I'm looking for a GUI-less solution. Something I c... |
How to get a Device Specific UID using Python in ASE on Android? | 5,914,317 | 0 | 2 | 234 | 0 | python,android,ase,android-scripting | The newer versions of ASE now include a function call to create these identifiers. | 0 | 1 | 0 | 1 | 2010-04-13T20:38:00.000 | 1 | 1.2 | true | 2,633,029 | 0 | 0 | 1 | 1 | I am working on am Android Scripting Environment (ASE) script in Python to replicate an iPhone app.
I need a device UID of some sort. My thoughts where a salted MD5 hash of the MAC address or device phone number, but I can't figure out how to access either of those using the Python APIs within ASE.
What can I do to cre... |
Multiple classes in a Python module | 2,634,412 | 5 | 42 | 44,756 | 0 | python | It is absolutely proper to do so. A module groups related functionality. If that functionality is implemented in several classes (e.g., Tree, Node, Leaf) then it is appropriate to place them together.
A module is more closely associated with a Java package than a Java class. You can also implement a module as a folder... | 0 | 0 | 0 | 0 | 2010-04-14T01:57:00.000 | 5 | 0.197375 | false | 2,634,394 | 1 | 0 | 1 | 2 | I'm very new to Python (I'm coming from a JAVA background) and I'm wondering if anyone could help me with some of the Python standards. Is it a normal or "proper" practice to put multiple class in a module? I have been working with Django and started with the tutorials and they place their database model classes in the... |
Multiple classes in a Python module | 2,634,436 | 8 | 42 | 44,756 | 0 | python | When in doubt, just look at Python's standard libraries :)
For example, the standard calendar module contains 31 classes. So yes, it is ok. | 0 | 0 | 0 | 0 | 2010-04-14T01:57:00.000 | 5 | 1 | false | 2,634,394 | 1 | 0 | 1 | 2 | I'm very new to Python (I'm coming from a JAVA background) and I'm wondering if anyone could help me with some of the Python standards. Is it a normal or "proper" practice to put multiple class in a module? I have been working with Django and started with the tutorials and they place their database model classes in the... |
Django/Python: Save an HTML table to Excel | 2,640,085 | 2 | 5 | 9,613 | 0 | python,django,excel,html-table | Use CSV. There's a module in Python ("csv") to generate it, and excel can read it natively. | 0 | 0 | 0 | 0 | 2010-04-14T18:40:00.000 | 3 | 0.132549 | false | 2,640,072 | 0 | 0 | 1 | 1 | I have an HTML table that I'd like to be able to export to an Excel file. I already have an option to export the table into an IQY file, but I'd prefer something that didn't allow the user to refresh the data via Excel. I just want a feature that takes a snapshot of the table at the time the user clicks the link/button... |
A web framework where AJAX was not an after thought | 2,642,409 | 0 | 8 | 495 | 0 | php,.net,python,ajax,frameworks | Two approaches to this problem generally. One is for the framework to try and do it all, like Microsoft's ASP.NET with its Ajax toolkit. This includes server side controls that produce Ajax functionality with all client- and server-side code generated for you. For example, their UpdatePanel control allows for partial p... | 0 | 0 | 0 | 0 | 2010-04-15T02:24:00.000 | 4 | 0 | false | 2,642,364 | 0 | 0 | 1 | 1 | AJAX is a pain in the ass because it essentially means you'll have to write two sets of similarish code: one for browsers with JavaScript enabled and those without.
Not only this, but you have to connect JavaScript events to hook into your models and display the results.
And if all that weren't bad enough, you need to ... |
google app engine error ,and i can't open it now.(python) | 34,367,657 | 0 | 6 | 6,342 | 0 | python,google-app-engine | Not enough points to provide a comment on the answers above hence the stand alone answer. If you delete the ini files as per the other answers the pathways to your projects in the launcher will likely also be gone. In my case however I simply moved the ini files out of the C:\Users\your username\Google directory and th... | 0 | 1 | 0 | 0 | 2010-04-15T06:03:00.000 | 5 | 0 | false | 2,643,081 | 0 | 0 | 1 | 3 | the error is :
Errors occurred
See the logfile 'D:\Program Files\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe.log' for details
Why? |
google app engine error ,and i can't open it now.(python) | 31,897,510 | 3 | 6 | 6,342 | 0 | python,google-app-engine | Solution:
Note: The wrong directories are stated above.
Go to C:\Users\your username\Google directory.
Delete google_appengine_launcher.ini and google_appengine_projects.ini
Appengine should now start successfully, absent error message. | 0 | 1 | 0 | 0 | 2010-04-15T06:03:00.000 | 5 | 0.119427 | false | 2,643,081 | 0 | 0 | 1 | 3 | the error is :
Errors occurred
See the logfile 'D:\Program Files\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe.log' for details
Why? |
google app engine error ,and i can't open it now.(python) | 17,596,077 | 2 | 6 | 6,342 | 0 | python,google-app-engine | yeah just like RyanW mentioned the link, Delete the .ini files viz. google_appengine_launcher.ini & google_appengine_projects.ini in the user Directory in folder named Google. | 0 | 1 | 0 | 0 | 2010-04-15T06:03:00.000 | 5 | 0.07983 | false | 2,643,081 | 0 | 0 | 1 | 3 | the error is :
Errors occurred
See the logfile 'D:\Program Files\Google\google_appengine\launcher\GoogleAppEngineLauncher.exe.log' for details
Why? |
Is there a production ready web application framework in Python? | 2,643,669 | 15 | 14 | 5,358 | 0 | python,web-applications | For the context, I work at a large private bank in Switzerland, writing Enterprise applications on the J2EE stack.
There are plenty of "Production Ready" web frameworks in Python. And there are plenty of large Python-based websites out there.
That said, I think Python is a poor choice for an Enterprisy application. It ... | 0 | 0 | 0 | 0 | 2010-04-15T07:07:00.000 | 6 | 1.2 | true | 2,643,321 | 0 | 0 | 1 | 1 | I heard lots of good opinions about Python language. They say it's mature, expressive etc... I'm looking for production-ready enterprise application frameworks in Python. By "production ready" I mean :
supports objective-relational mapping with caching and declarative desciption (like JPA, Hibernate etc..)
controls or... |
I can't login to my Django app when debug is set to False | 2,645,668 | 0 | 2 | 1,621 | 0 | python,django,apache,login,debugging | I would guess that this is related to errors in admin classes requiring the devserver to be restarted to continue.
As nothing is being reportedm I would try removing all of your admin.py definitions and just use the basic admin.site.register(SomeModel) for everything and seeing if it still happens, then add them back i... | 0 | 0 | 0 | 0 | 2010-04-15T08:23:00.000 | 5 | 0 | false | 2,643,721 | 0 | 0 | 1 | 4 | Short Story: I get locked out of my Django app when Debug is set to False.
Long story:
Case 1 (the first time it happened):
I enter my login info, but It just redirects to the login page.
I restart the server, try to login, and it works fine, I get in.
a few hours later I come back, log out, try to log back in and I ... |
I can't login to my Django app when debug is set to False | 2,644,182 | 1 | 2 | 1,621 | 0 | python,django,apache,login,debugging | Do you have a custom 500 error handler set up? Is that doing something weird with the session, perhaps? | 0 | 0 | 0 | 0 | 2010-04-15T08:23:00.000 | 5 | 0.039979 | false | 2,643,721 | 0 | 0 | 1 | 4 | Short Story: I get locked out of my Django app when Debug is set to False.
Long story:
Case 1 (the first time it happened):
I enter my login info, but It just redirects to the login page.
I restart the server, try to login, and it works fine, I get in.
a few hours later I come back, log out, try to log back in and I ... |
I can't login to my Django app when debug is set to False | 6,030,163 | 0 | 2 | 1,621 | 0 | python,django,apache,login,debugging | Make sure the urls.py file imports everything from django.conf.urls.defaults.
You may have explicitly imported certain methods such as patterns and include (as I did to combat PyDev's 'wild import' warning messages).
As a result, crucial statements that assign Django's default handlers to 404 and 500 HTTP error codes ... | 0 | 0 | 0 | 0 | 2010-04-15T08:23:00.000 | 5 | 0 | false | 2,643,721 | 0 | 0 | 1 | 4 | Short Story: I get locked out of my Django app when Debug is set to False.
Long story:
Case 1 (the first time it happened):
I enter my login info, but It just redirects to the login page.
I restart the server, try to login, and it works fine, I get in.
a few hours later I come back, log out, try to log back in and I ... |
I can't login to my Django app when debug is set to False | 57,435,530 | 1 | 2 | 1,621 | 0 | python,django,apache,login,debugging | My problem was if I set SESSION_COOKIE_SECURE = True then I can't login in http mode.
I had to change it to SESSION_COOKIE_SECURE = False
Maybe you had this too? | 0 | 0 | 0 | 0 | 2010-04-15T08:23:00.000 | 5 | 0.039979 | false | 2,643,721 | 0 | 0 | 1 | 4 | Short Story: I get locked out of my Django app when Debug is set to False.
Long story:
Case 1 (the first time it happened):
I enter my login info, but It just redirects to the login page.
I restart the server, try to login, and it works fine, I get in.
a few hours later I come back, log out, try to log back in and I ... |
urllib2 to string | 35,367,453 | 16 | 7 | 17,378 | 0 | python,string,urllib2 | In python3, it should be changed to urllib.request.openurl('http://www.example.com/').read().decode('utf-8'). | 0 | 0 | 1 | 0 | 2010-04-15T17:48:00.000 | 4 | 1 | false | 2,647,723 | 0 | 0 | 1 | 1 | I'm using urllib2 to open a url. Now I need the html file as a string. How do I do this? |
google app engine persistent globals | 2,650,039 | 6 | 1 | 595 | 0 | python,database,google-app-engine,global | The datastore is the only place you can have guaranteed-persistent data that are also modifiable. So you can have a single large object, or several smaller ones (with a name attribute and others), depending on your desired access patterns -- but live in the datastore it must. You can use memcache for faster cache tha... | 0 | 1 | 0 | 0 | 2010-04-16T01:21:00.000 | 1 | 1.2 | true | 2,650,014 | 0 | 0 | 1 | 1 | I'm looking for a way to keep the equivalent of persistent global variables in app engine (python). What I'm doing is creating a global kind that I initialize once (i.e. when I reset all my database objects when I'm testing). I have things in there like global counters, or the next id to assign certain kinds I create... |
Django, How authenticate user with first name and last name? | 2,656,270 | 1 | 1 | 1,594 | 0 | python,django,django-models,django-admin | I like the idea of not making users remember a username, but I think a better solution to that is to have their email address be their user name. Is it fair for you to assume in your specific application that no two users will have the same first and last name? If that's not a fair assumption, how will your system hand... | 0 | 0 | 0 | 0 | 2010-04-16T01:52:00.000 | 4 | 0.049958 | false | 2,650,106 | 0 | 0 | 1 | 2 | i want to authenticate users using firstname and lastname
This is the code i am using
user = auth.authenticate(first_name=firstname,last_name=lastname,password=password)
it keep coming up with NoneType: None
i have checked the firstname and lastname plus password seen to be correct?
what i am doing wrong? thanks |
Django, How authenticate user with first name and last name? | 2,650,166 | 2 | 1 | 1,594 | 0 | python,django,django-models,django-admin | Building a little from @T. Stone's idea. Why not have them register with their First and Last name and you just concatenate them together and use that as their username?. And everytime you have them login you setup your view to combine the two fields again and use that string.
You won't be able to use some of the aut... | 0 | 0 | 0 | 0 | 2010-04-16T01:52:00.000 | 4 | 0.099668 | false | 2,650,106 | 0 | 0 | 1 | 2 | i want to authenticate users using firstname and lastname
This is the code i am using
user = auth.authenticate(first_name=firstname,last_name=lastname,password=password)
it keep coming up with NoneType: None
i have checked the firstname and lastname plus password seen to be correct?
what i am doing wrong? thanks |
Self Authenticating Links in Django | 2,650,293 | 0 | 3 | 1,274 | 0 | python,django,authentication | To T. Stone's point, end users are notorious for passing links around -- ESPECIALLY those in an intraweb environment. Having something that authenticated the user automatically means that I can almost guarantee that you're going to have at least one person logged in as somebody else.
There are better ways, of course,... | 0 | 0 | 0 | 0 | 2010-04-16T02:25:00.000 | 3 | 0 | false | 2,650,189 | 0 | 0 | 1 | 1 | In my web app I would like to be able to email self-authenticating links to users. These links will contain a unique token (uuid). When they click the link the token being present in the query string will be enough to authenticate them and they won't have to enter their username and password.
What's the best way to do ... |
MySQL to AppEngine | 2,662,880 | 0 | 0 | 1,278 | 1 | python,mysql,google-app-engine,bulk-load | If you're using Pentaho BI Server as your data source, why don't you consider using Pentaho Data Integration (ETL tool) to move the data over? At the very least PDI automate any movement of data between your data source and any AppEngine bulk loader tool (it can easily trigger any app with a shell step). | 0 | 1 | 0 | 0 | 2010-04-16T03:57:00.000 | 3 | 0 | false | 2,650,499 | 0 | 0 | 1 | 1 | I'm from Brazil and study at FATEC (college located in Brazil).
I'm trying to learn about AppEngine.
Now, I'm trying to load a large database from MySQL to AppEngine to perform some queries, but I don't know how i can do it. I did some testing with CSV files,but is there any way to perform the direct import from MySQL?... |
Storing a list of objects in GAE | 2,656,720 | 0 | 2 | 296 | 0 | python,google-app-engine,google-cloud-datastore | If it's really just a list of tuples / two "columns", could you just use an alternating list and a ListProperty? This would be fine if the data had a consistent dimension, was small, and didn't require indexing.
e.g. To encode the example you gave in a list do:
# i forget if mixed types are allowed, but you get the i... | 0 | 0 | 0 | 0 | 2010-04-16T11:09:00.000 | 2 | 0 | false | 2,652,394 | 0 | 0 | 1 | 1 | I need to store some data that looks a little like this:
xyz 123
abc 456
hij 678
rer 838
Now I would just store it as a traditional string and integer model, and put in the datastore. But the data changes regularly, and is ONLY relevant when looked at as a COLLECTION. So it needs to be store as either a list of lists... |
Django - how to write users and profiles handling in best way? | 2,657,984 | 0 | 3 | 2,938 | 0 | python,django,profiles | Thank you all for your answers! I know that django dev documentation mentions user profiles, but does it very briefly (roughly few lines) and links to djangobook containing information about user profiles, but... to its first version, covering django 0.96. The second version of djangobook, covering django 1.0 (that is ... | 0 | 0 | 0 | 0 | 2010-04-16T16:43:00.000 | 4 | 0 | false | 2,654,689 | 0 | 0 | 1 | 1 | I am writing simple site that requires users and profiles to be handled. The first initial thought is to use django's build in user handling, but then the user model is too narrow and does not contain fields that I need. The documentation mentions user profiles, but user profiles section has been removed from djangoboo... |
How can I implement "real time" messaging on Google AppEngine? | 2,660,540 | 1 | 3 | 554 | 0 | javascript,python,google-app-engine,comet | The App Engine roadmap has Comet support, otherwise you will have some difficulty achieving this. | 0 | 1 | 0 | 0 | 2010-04-17T22:31:00.000 | 3 | 0.066568 | false | 2,660,316 | 0 | 0 | 1 | 1 | I'm creating a web application on Google AppEngine where I want the user to be notified a quickly as possible after certain events occour. The problem is similar to say a chat server in that I need something happening on one connection (someone is writing a message in a chat room) to propagate to a number of other conn... |
Problems with South/Django: not recognizing the Django App | 2,665,161 | 3 | 2 | 2,042 | 0 | python,macos,migration,django-south | Am I doing something really stupid?
Well, let's start with the "is it plugged in" questions:
Is your project directory in your Python path?
Are you running python manage.py and not, say, python some/path/i/am/omitting/manage.py? (This is a great way to not have the project in the Python path.)
What is the output of .... | 0 | 0 | 0 | 0 | 2010-04-19T02:42:00.000 | 1 | 0.53705 | false | 2,664,942 | 0 | 0 | 1 | 1 | I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example:
$ python manage.py convert_to_south thisLocator
/Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha >module is deprecated; use the hashlib module instea... |
In SqlAlchemy, how to ignore m2m relationship attributes when merge? | 2,667,004 | 0 | 0 | 396 | 1 | python,sqlalchemy | You'd better fix your code to avoid setting role.users for the item you are going to merge. But there is another way - setting cascade='none' for this relation. Then you lose an ability to save relationship from Role side, you'll have to save User with roles attribute set. | 0 | 0 | 0 | 0 | 2010-04-19T05:01:00.000 | 1 | 1.2 | true | 2,665,253 | 0 | 0 | 1 | 1 | There is a m2m relation in my models, User and Role.
I want to merge a role, but i DO NOT want this merge has any effect on user and role relation-ship. Unfortunately, for some complicate reason, role.users if not empty.
I tried to set role.users = None, but SA complains None is not a list.
At this moment, I use... |
How Can I Store My Images On The Server | 2,665,989 | 1 | 0 | 191 | 0 | python,django,photo-upload | There are two common options.
1) Store them on the file system on the server, preferably not all in one directory - but split logically.
2) Store the images in a database, if you are using MySql you would do this using the "blob" type. | 0 | 0 | 0 | 0 | 2010-04-19T07:52:00.000 | 2 | 0.099668 | false | 2,665,921 | 0 | 0 | 1 | 1 | How do I store a photo on the server.
I store them in a directory - "D:\zjm_code\basic_project\pinax\media\default\pinax\images\upload" but this now a lot of images.
Is there another simple way?
Thanks |
Pylons: question about websetup.py use | 2,668,235 | 2 | 0 | 496 | 0 | python,pylons,paster | Ok, I was wrong. The websetup is used by the setup script and before the test are executed.
A controller make an import for a test module, and then setup_app is called.
Thanks!. | 0 | 0 | 0 | 0 | 2010-04-19T12:57:00.000 | 1 | 1.2 | true | 2,667,529 | 0 | 0 | 1 | 1 | reading pylons documentations I did understand that websetup:setup_app is only called when the application is setup at first time by paster script. But, I found now, setup_app is call every time that application starts. Debugging the code, this behaviour seems right because in appinstall.setup_config the module is load... |
Large Django application layout | 2,670,177 | 33 | 26 | 10,378 | 0 | python,django,conventions | The best way that I have found to go about this is to create applications and then a project to glue them together. Most of my projects have similar apps which are included in each. Emails, notes, action reminders, user auth, etc. My preferred layout is like so:
project/
settings.py
urls.py
views.py
...
apps/
... | 0 | 0 | 0 | 0 | 2010-04-19T19:02:00.000 | 3 | 1.2 | true | 2,670,031 | 0 | 0 | 1 | 1 | I am in a team developing a web-based university portal, which will be based on Django. We are still in the exploratory stages, and I am trying to find the best way to lay the project/development environment out.
My initial idea is to develop the system as a Django "app", which contains sub-applications to separate out... |
Web Security: Worst-Case Situation | 2,670,489 | 1 | 3 | 263 | 0 | python,security | Https is a must, but you also have to come to terms with the fact that no site can be 100% secure. The only other way for you to get a significant improvement in security is to have very short session timeouts and provide you users with hardware tokens, but even tokens can be stolen. | 0 | 0 | 1 | 0 | 2010-04-19T19:49:00.000 | 4 | 0.049958 | false | 2,670,346 | 0 | 0 | 1 | 2 | I currently have built a system that checks user IP, browser, and a random-string cookie to determine if he is an admin.
In the worst case, someone steals my cookie, uses the same browser I do, and masks his IP to appear as mine. Is there another layer of security I should add onto my script to make it more secure?
EDI... |
Web Security: Worst-Case Situation | 2,670,747 | 1 | 3 | 263 | 0 | python,security | THe one thing I miss besides everything that is mentioned is fixing "all other security problems".
If you have a SQL injection, you're effort on the cookies is a waste of time.
If you have a XSRF vuln, you're effort on the cookies is a waste of time.
If you have XSS, ....
If you have HPP, ...
If you have ...., ....
... | 0 | 0 | 1 | 0 | 2010-04-19T19:49:00.000 | 4 | 0.049958 | false | 2,670,346 | 0 | 0 | 1 | 2 | I currently have built a system that checks user IP, browser, and a random-string cookie to determine if he is an admin.
In the worst case, someone steals my cookie, uses the same browser I do, and masks his IP to appear as mine. Is there another layer of security I should add onto my script to make it more secure?
EDI... |
Enforce unique upload file names using django? | 43,329,765 | 9 | 66 | 39,098 | 0 | python,django,pinax,file-rename | As of the writing of this answer it seems like you no longer need to do anything special to make this happen. If you set up a FileField with a static upload_to property, the Django storage system will automatically manage naming so that if a duplicate filename is uploaded, Django will randomly generate a new unique fil... | 0 | 0 | 0 | 0 | 2010-04-20T08:30:00.000 | 7 | 1 | false | 2,673,647 | 0 | 0 | 1 | 2 | What's the best way to rename photos with a unique filename on the server as they are uploaded, using django? I want to make sure each name is used only once. Are there any pinax apps that can do this, perhaps with GUID? |
Enforce unique upload file names using django? | 57,465,077 | 0 | 66 | 39,098 | 0 | python,django,pinax,file-rename | django enforce unique filename automatically.
if the file already exists, seven unique characters are appended to the filename
tested on django 2.2 | 0 | 0 | 0 | 0 | 2010-04-20T08:30:00.000 | 7 | 0 | false | 2,673,647 | 0 | 0 | 1 | 2 | What's the best way to rename photos with a unique filename on the server as they are uploaded, using django? I want to make sure each name is used only once. Are there any pinax apps that can do this, perhaps with GUID? |
Stealing Cookies with no user input? | 2,676,818 | 1 | 1 | 1,146 | 0 | python,security,xss | If there's no user input (no links to click that have any effects, etc.), how does the admin backend qualify as "dynamic"?
But basically: No, not unless you're using HTTPS. Even if you're not accepting input, the cookie is transmitted in plaintext and so can be captured (by a man-in-the-middle attack, etc.) and used. (... | 0 | 0 | 0 | 0 | 2010-04-20T16:15:00.000 | 2 | 1.2 | true | 2,676,747 | 0 | 0 | 1 | 1 | I'm creating a static site generator with a dynamic admin backend for one user. The site accepts no user input. Does this mean that I am safe from attackers who are trying to steal my admin cookie?
(there is no user input, so XSS and other methods don't work, right?) |
Regex for finding valid sphinx fields | 2,678,057 | 3 | 2 | 700 | 0 | python,regex,django,sphinx | To match all allowed fields, the following rather fearful looking regex works:
@((?:cat|mouse|dog|puppy)\b|\((?:(?:cat|mouse|dog|puppy)(?:, *|(?=\))))+\))
It returns these matches, in order: @cat, @(cat), @(cat, dog), @cat, @dog, @(cat, dog), @mouse.
The regex breaks down as follows:
@ ... | 0 | 0 | 0 | 0 | 2010-04-20T18:41:00.000 | 6 | 0.099668 | false | 2,677,713 | 1 | 0 | 1 | 1 | I'm trying to validate that the fields given to sphinx are valid, but I'm having difficulty.
Imagine that valid fields are cat, mouse, dog, puppy.
Valid searches would then be:
@cat search terms
@(cat) search terms
@(cat, dog) search term
@cat searchterm1 @dog searchterm2
@(cat, dog) searchterm1 @mouse searchterm2
... |
How to create simple web site with Python? | 2,684,119 | 3 | 22 | 60,467 | 0 | python,html,web-applications | Why don't you try out the Google AppEngine stuff? They give you a local environment (that runs on your local system) for developing the application. They have nice, easy intro material for getting the site up and running - your "hello, world" example will be trivial to implement.
From there on, you can either go with s... | 0 | 0 | 1 | 0 | 2010-04-21T09:40:00.000 | 6 | 1.2 | true | 2,681,754 | 0 | 0 | 1 | 1 | How to create simple web site with Python?
I mean really simple, f.ex, you see text "Hello World", and there are button "submit", which onClick will show AJAX box "submit successful".
I want to start develop some stuff with Python, and I don't know where to start. |
Can PyAMF support service deployment by way of the filesystem? | 2,684,503 | 0 | 2 | 296 | 0 | python,django,mod-wsgi,cherrypy,pyamf | I use PyAMF together with Django. A possible solution could roughly look like this:
Create a python module containing all your different AMF services py files
Create a view that wrapps the DjangoGateway and initialize all your services. Inside this view you could do the following:
reload() your service module
popu... | 0 | 0 | 0 | 0 | 2010-04-21T14:43:00.000 | 2 | 0 | false | 2,683,946 | 0 | 0 | 1 | 1 | I'm evaluating PyAMF to replace our current PHP (ugh) AMF services framework, and I'm unable to find the one crucial piece of information that would allow me to provide a compelling use case for changing over:
Right now, new PHP AMF services are deployed simply by putting the .php files in the filesystem; the next time... |
CherryPy and concurrency | 37,571,640 | 0 | 2 | 15,864 | 0 | python,concurrency,wsgi,cherrypy | Your client needs to actually READ the server's response. Otherwise the socket/thread will stay open/running until timeout and garbage collected.
use a client that behaves correctly and you'll see that your server will behave too. | 0 | 0 | 0 | 0 | 2010-04-21T17:20:00.000 | 3 | 0 | false | 2,685,089 | 1 | 0 | 1 | 1 | I'm using CherryPy in order to serve a python application through WSGI.
I tried benchmarking it, but it seems as if CherryPy can only handle exactly 10 req/sec. No matter what I do.
Built a simple app with a 3 second pause, in order to accurately determine what is going on... and I can confirm that the 10 req/sec has n... |
How to add a Facebook Event with new Graph API | 2,736,115 | 2 | 5 | 12,520 | 0 | python,django,facebook,facebook-graph-api | If you require access to user data while the user is not online, there is the offline_access extended privilege which gives you a longer lived session key. This can be used to perform updates while the user is offline.
While I can't help you with Django, most of the Graph API does seem to work for me (not tried events ... | 0 | 0 | 0 | 0 | 2010-04-22T13:03:00.000 | 4 | 0.099668 | false | 2,690,971 | 0 | 0 | 1 | 1 | I am trying to create an event using Facebooks api. (From a django app) Has anyone created an event with the new graph api? |
On App Engine, what does optimization for reads mean? | 2,694,726 | 0 | 1 | 115 | 0 | python,google-app-engine | "Optimize for reads, not writes" means that you should expect to see far more reads than writes, and so you should strive to make it as easy as possible to read your data, even if that might slow down the writes a little. Easy for the computer, that is, meaning that for example if you want to show names in all lowercas... | 0 | 1 | 0 | 0 | 2010-04-22T21:11:00.000 | 3 | 0 | false | 2,694,542 | 0 | 0 | 1 | 2 | In the documentation for Google App Engine, it says that when designing data models for the datastore, you should "optimize for reads, not writes". What exactly does this mean? What is more 'expensive', CPU intensive or time consuming? |
On App Engine, what does optimization for reads mean? | 2,695,382 | 0 | 1 | 115 | 0 | python,google-app-engine | agreed with @redtuna (expecting more reads than writes) and @Ilian Iliev (reads cheaper than writes & writes take more resources). another way you can optimize for reads is by using the Memcache service. since reads (usually) happen more often than writes, caching that data means that you don't even have to take a hit ... | 0 | 1 | 0 | 0 | 2010-04-22T21:11:00.000 | 3 | 0 | false | 2,694,542 | 0 | 0 | 1 | 2 | In the documentation for Google App Engine, it says that when designing data models for the datastore, you should "optimize for reads, not writes". What exactly does this mean? What is more 'expensive', CPU intensive or time consuming? |
Django ORM and multiprocessing | 2,707,816 | 0 | 1 | 1,276 | 0 | python,django,django-models,message-queue,multiprocessing | It's a little hard to say without more information, but the problem is probably caused by having an open database connection as you spawn new processes, and then trying to use that database connection in the separate processes. Don't re-use database connections from the parent process in multiprocessing workers you spa... | 0 | 0 | 0 | 0 | 2010-04-25T09:59:00.000 | 1 | 0 | false | 2,707,811 | 0 | 0 | 1 | 1 | I am using Django ORM in my python script in a decoupled fashion i.e. it's not running in context of a normal Django Project.
I am also using the multi processing module. And different process in turn are making queries.
The process ran successfully for an hr and exited with this message
"IOError: [Errno 32] Broken p... |
Python script repeated auto start up | 2,708,720 | 3 | 1 | 168 | 0 | python,email | Is it possible to have a setup, where
the script starts up automatically at
a give time, say 1 pm everyday, sends
out the email and then quits?
It's surely possible in general, but it entirely depends on what your shared web hosting provider is offering you. For these purposes, you'd use some kind of cron in an... | 0 | 0 | 0 | 1 | 2010-04-25T15:15:00.000 | 1 | 1.2 | true | 2,708,705 | 0 | 0 | 1 | 1 | I am designing a python web app, where people can have an email sent to them on a particular day. So a user puts in his emai and date in a form and it gets stored in my database.
My script would then search through the database looking for all records of todays date, retrive the email, sends them out and deletes the en... |
Javascript (and HTML rendering) engine without a GUI for automation? | 3,593,127 | 0 | 4 | 7,009 | 0 | javascript,python,automation,rendering,mechanize | Try HtmlUnit !!! | 0 | 0 | 0 | 0 | 2010-04-26T19:26:00.000 | 7 | 0 | false | 2,716,230 | 0 | 0 | 1 | 1 | Are there any libraries or frameworks that provide the functionality of a browser, but do not need to actually render physically onto the screen?
I want to automate navigation on web pages (Mechanize does this, for example), but I want the full browser experience, including Javascript. Thus, I'd like to have a virtual ... |
Can python code (say if I used djangno) be obfuscated to the same 'level' as c#/java? | 2,724,925 | 0 | 0 | 293 | 0 | c#,java,python,obfuscation | Python code gets compiled to bytecode (.pyc) files as it is imported. You can distribute those .pyc files instead of the .py source code files, and the Python interpreter should be able to load them. While Python bytecode is more "obfuscated" than Python source code, it's still relatively easy to disassemble Python byt... | 0 | 0 | 0 | 1 | 2010-04-27T20:34:00.000 | 4 | 0 | false | 2,724,885 | 1 | 0 | 1 | 2 | If I obfuscated python code, would it provide the same level of 'security' as c#/java obfuscating?
i.e it makes things a little hard, but really you can still reverse engineer if you really wanted to, its just a bit cryptic. |
Can python code (say if I used djangno) be obfuscated to the same 'level' as c#/java? | 2,725,016 | 0 | 0 | 293 | 0 | c#,java,python,obfuscation | Obfuscation doesn't provide security. What you describe isn't security.
If you distribute your Python program or your Java program or your C program, it is vunerable. What protects you from people using what you distributed unfairly is the law and people not being jerks.
Obfuscation not only provides no security, it ha... | 0 | 0 | 0 | 1 | 2010-04-27T20:34:00.000 | 4 | 0 | false | 2,724,885 | 1 | 0 | 1 | 2 | If I obfuscated python code, would it provide the same level of 'security' as c#/java obfuscating?
i.e it makes things a little hard, but really you can still reverse engineer if you really wanted to, its just a bit cryptic. |
Automatic logout in python web app | 2,731,905 | 1 | 1 | 646 | 0 | python,mysql,logging,web-applications | You can encode the expiration time as part of your session id.
Then when you validate the session id, you can also check if it has expired, and if so force the user to log-in again.
You can also clean your database periodically, removing expired sessions. | 0 | 0 | 0 | 0 | 2010-04-28T17:44:00.000 | 2 | 0.099668 | false | 2,731,871 | 0 | 0 | 1 | 1 | I have a web application in python wherein the user submits their email and password. These values are compared to values stored in a mysql database. If successful, the script generates a session id, stores it next to the email in the database and sets a cookie with the session id, with allows the user to interact with... |
Is there anyway to get pdb and Mac Terminal to play nicely? | 2,745,035 | 8 | 9 | 1,601 | 0 | python,django,macos,terminal,pdb | OK - this works for me I created a ~/.pdbrc and added
import os
os.system("stty sane")
Now each time pdb is run it sets the line settings back to sane.
If I fall out to the terminal then I still have to do it manually - but it solves having to quit runserver and reset all the time. | 0 | 1 | 0 | 0 | 2010-04-29T08:34:00.000 | 3 | 1.2 | true | 2,735,828 | 0 | 0 | 1 | 2 | When debugging my django apps I use pdb for interactive debugging with pdb.set_trace().
However, when I amend a file the local django webserver restarts and then I cant see what I type in the terminal, until I type reset.
Is there anyway for this to happen automatically? It can be real annoying, having to cancel the ru... |
Is there anyway to get pdb and Mac Terminal to play nicely? | 2,743,003 | 1 | 9 | 1,601 | 0 | python,django,macos,terminal,pdb | The best I've found is doing a reset inside pdb like so:
import os; os.system("reset"); | 0 | 1 | 0 | 0 | 2010-04-29T08:34:00.000 | 3 | 0.066568 | false | 2,735,828 | 0 | 0 | 1 | 2 | When debugging my django apps I use pdb for interactive debugging with pdb.set_trace().
However, when I amend a file the local django webserver restarts and then I cant see what I type in the terminal, until I type reset.
Is there anyway for this to happen automatically? It can be real annoying, having to cancel the ru... |
How to get debugging of an App Engine application working? | 2,735,992 | 1 | 3 | 865 | 0 | python,eclipse,debugging,google-app-engine,pydev | In fact setting a breakpoint in eclipse is very easy. You have two options:
In the grey area next to your line numbers, doubleclick or right mouseclick -> toggle breakpoint. | 0 | 1 | 0 | 0 | 2010-04-29T09:00:00.000 | 1 | 1.2 | true | 2,735,968 | 0 | 0 | 1 | 1 | I've got 10+ years in C/C++, and it appears Visual Studio has spoilt me during that time. In Visual Studio, debbuging issimple: I just add a breakpoint to a line of code, and as soon as that code is executed, my breakpoint triggers, at which point I can view a callstack, local/member variables, etc.
I'm trying to achi... |
A simple Python deployment problem - a whole world of pain | 2,743,196 | 2 | 20 | 5,069 | 0 | python,linux,deployment,pylons | Have a look at Buildout for reproducible deployments. | 0 | 1 | 0 | 0 | 2010-04-29T23:55:00.000 | 8 | 0.049958 | false | 2,741,507 | 0 | 0 | 1 | 2 | We have several Python 2.6 applications running on Linux. Some of them are Pylons web applications, others are simply long-running processes that we run from the command line using nohup. We're also using virtualenv, both in development and in production. What is the best way to deploy these applications to a productio... |
A simple Python deployment problem - a whole world of pain | 2,805,604 | 0 | 20 | 5,069 | 0 | python,linux,deployment,pylons | I would use rsync to synchronize outwards from your production "prime" server to the others, and from your "beta test" platform, to your production "prime" server.
rsync has the benefit of copying only those files which changed, and copying only parts of files that changed partially, and verifying the integrity and ide... | 0 | 1 | 0 | 0 | 2010-04-29T23:55:00.000 | 8 | 0 | false | 2,741,507 | 0 | 0 | 1 | 2 | We have several Python 2.6 applications running on Linux. Some of them are Pylons web applications, others are simply long-running processes that we run from the command line using nohup. We're also using virtualenv, both in development and in production. What is the best way to deploy these applications to a productio... |
Url for the current page from a Mako template in Pylons | 2,742,016 | 4 | 1 | 2,612 | 0 | python,templates,pylons,mako | Not sure if this is the Pylons way of doing things but ${request.url} seems to work for me. | 0 | 0 | 0 | 0 | 2010-04-30T02:05:00.000 | 2 | 1.2 | true | 2,741,893 | 0 | 0 | 1 | 1 | I need to know the full url for the current page from within a Mako template file in Pylons.
The url will be using in an iframe contained within the page so it needs to be known when the page is being generated rather than after the page hits the server or from the environment. (Not sure if I am communicating that last... |
Change text_factory in Django/sqlite | 64,263,492 | 0 | 6 | 4,701 | 1 | python,django,sqlite,pysqlite | Incompatible Django version. Check Django version for solving this error first. I was running on Django==3.0.8 and it was producing an error. Than I ran virtualenv where I have Django==3.1.2 and the error was removed. | 0 | 0 | 0 | 0 | 2010-04-30T13:00:00.000 | 6 | 0 | false | 2,744,632 | 0 | 0 | 1 | 1 | I have a django project that uses a sqlite database that can be written to by an external tool. The text is supposed to be UTF-8, but in some cases there will be errors in the encoding. The text is from an external source, so I cannot control the encoding. Yes, I know that I could write a "wrapping layer" between the e... |
Is www.example.com/post/21/edit a RESTful URI? I think I know the answer, but have another question | 2,750,368 | 2 | 4 | 267 | 0 | python,rest,web.py | Instead of calling it /post/52/edit, what if you called it /post/52/editor?
Now it is a resource. Dilemma averted. | 0 | 0 | 1 | 1 | 2010-05-01T14:43:00.000 | 4 | 0.099668 | false | 2,750,341 | 0 | 0 | 1 | 2 | I'm almost afraid to post this question, there has to be an obvious answer I've overlooked, but here I go:
Context: I am creating a blog for educational purposes (want to learn python and web.py). I've decided that my blog have posts, so I've created a Post class. I've also decided that posts can be created, read, upda... |
Is www.example.com/post/21/edit a RESTful URI? I think I know the answer, but have another question | 2,750,379 | 4 | 4 | 267 | 0 | python,rest,web.py | Another RESTful approach is to use the query string for modifiers: /post/52?edit=1
Also, don't get too hung up on the purity of the REST model. If your app doesn't fit neatly into the model, break the rules. | 0 | 0 | 1 | 1 | 2010-05-01T14:43:00.000 | 4 | 0.197375 | false | 2,750,341 | 0 | 0 | 1 | 2 | I'm almost afraid to post this question, there has to be an obvious answer I've overlooked, but here I go:
Context: I am creating a blog for educational purposes (want to learn python and web.py). I've decided that my blog have posts, so I've created a Post class. I've also decided that posts can be created, read, upda... |
Google App Engine Python Unit Tests | 4,059,206 | 1 | 17 | 5,767 | 0 | python,unit-testing,google-app-engine | Since, gae is based on webhooks it can be easy to set your own testing framework for all relevant urls in your app.yaml. You can test it on sample dataset on development server ( start devel server with --datastore_path option ) and assert writes to database or webhook responses. | 0 | 1 | 0 | 1 | 2010-05-01T17:32:00.000 | 4 | 0.049958 | false | 2,750,911 | 0 | 0 | 1 | 1 | I'd like to write some Python unit tests for my Google App Engine. How can I set that up? Does someone happen to have some sample code which shows how to write a simple test? |
Validity of GUI design patterns under linux | 2,751,881 | 2 | 0 | 894 | 0 | python,ruby,linux,design-patterns,mvvm | Given how you explain your application in a comment, while fully endorsing Qt, I would also recommend you consider the many advantages that could come your way from making your application a web app.
Since you say it's a client-server app, it needs (at least) local network connectivity at least, so the first objection ... | 0 | 1 | 0 | 0 | 2010-05-01T21:11:00.000 | 5 | 0.07983 | false | 2,751,548 | 0 | 0 | 1 | 3 | I am investigating a switch from windows to linux and i struggle to find samples of design patterns applied in this world.
The application is a classic client server with detailed forms for each business entity.
It will be taking user input, do some validation checks, a few calculations, and save them to database.
It w... |
Validity of GUI design patterns under linux | 2,751,596 | 1 | 0 | 894 | 0 | python,ruby,linux,design-patterns,mvvm | The two main UI toolkits in Linux these days are Qt and GTK+. Qt is widely used by the KDE desktop, while GTK+ is widely used by Gnome. But a Qt app will run in Gnome and vise-versa. Both toolkits have bindings to a massive amount of languages. | 0 | 1 | 0 | 0 | 2010-05-01T21:11:00.000 | 5 | 0.039979 | false | 2,751,548 | 0 | 0 | 1 | 3 | I am investigating a switch from windows to linux and i struggle to find samples of design patterns applied in this world.
The application is a classic client server with detailed forms for each business entity.
It will be taking user input, do some validation checks, a few calculations, and save them to database.
It w... |
Validity of GUI design patterns under linux | 2,753,393 | 0 | 0 | 894 | 0 | python,ruby,linux,design-patterns,mvvm | Design (or architectural) patterns have nothing to do with the target programming language or operating system. Ook at you problem, if you can see you requirements which will be fulfilled by some solution provided by a pattern and the consequences will be good, jsut use the pattern. If you aks MVC, MVP, MVVM etc. look ... | 0 | 1 | 0 | 0 | 2010-05-01T21:11:00.000 | 5 | 0 | false | 2,751,548 | 0 | 0 | 1 | 3 | I am investigating a switch from windows to linux and i struggle to find samples of design patterns applied in this world.
The application is a classic client server with detailed forms for each business entity.
It will be taking user input, do some validation checks, a few calculations, and save them to database.
It w... |
Appengine (python) returns empty for valid queries | 2,752,566 | 0 | 2 | 161 | 0 | python,google-app-engine | When this has happened to me it's because I've been using a TextField, which cannot be queried (but confusingly just gets ignored). Try switching to StringField. | 0 | 1 | 0 | 0 | 2010-05-02T00:10:00.000 | 1 | 0 | false | 2,752,008 | 0 | 0 | 1 | 1 | EDIT: Figured it out. For whatever reason the field in the index was called strWord instead of wordStr. I didn't notice because of the similarities. The file was auto generated, so I must have called the field that in a previous development version.
I've got an app with around half a million 'records', each of which on... |
Google App Engine - Document Editor Creation/Tap Into Google Docs? | 2,758,807 | 2 | 1 | 655 | 0 | python,ajax,google-app-engine,tinymce,text-editor | It sounds to me like you want to use the Google Docs editor like a widget within your application. To the best of my knowledge you can't do this. | 0 | 1 | 0 | 0 | 2010-05-02T21:27:00.000 | 2 | 0.197375 | false | 2,755,069 | 0 | 0 | 1 | 1 | What is the best way to create a custom document editor in GAE? I'm making a website meant for a School Robotics Club (With support for any other organization - DRY).
We currently use Google services for online collaboration, I'm wondering if there is a way to tap into Google Docs and allow users to edit a Google Docum... |
Does Mailman have an API or an export lists, users and owners option? | 3,154,975 | 4 | 2 | 2,988 | 0 | python,api,mailman | probably too late, but the list_members LISTNAME command (executed from a shell) will give you all the members of a list.
list_admins LISTNAME will give you the owners
What do you mean by membership type? list_members does have an option to filter on digest vs non-digest members. I don't think there's a way to get the ... | 0 | 0 | 1 | 1 | 2010-05-03T05:41:00.000 | 3 | 0.26052 | false | 2,756,311 | 0 | 0 | 1 | 1 | I am trying to migrate a legacy mailing list to a new web forum software and was wondering if mailman has an export option or an API to get all lists, owners, members and membership types. |
Beginning python for the web | 4,735,025 | 0 | 2 | 617 | 0 | php,python | I just started Python for web myself. I also came from a PHP background and felt that PHP is fine when it comes to making regular stuff like forums, blogs and stuff like that. Sadly though I didn't like PHP when it came to create more complex systems.
I looked at a few of the different frameworks out there and came to ... | 0 | 0 | 0 | 1 | 2010-05-05T03:33:00.000 | 4 | 0 | false | 2,770,426 | 0 | 0 | 1 | 1 | I'm looking for a nice tutorial or framework for developing Python written web applications.
I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically. |
Can I use django.contrib.gis on GAE? | 2,775,206 | 4 | 4 | 523 | 0 | python,django,google-app-engine,gis | No. You can't use Django models on App Engine, and therefore, can't use anything else that uses them, such as django.contrib.gis. | 0 | 0 | 0 | 0 | 2010-05-05T15:45:00.000 | 3 | 1.2 | true | 2,774,723 | 0 | 0 | 1 | 2 | Can I use GeoDjango with GAE / BigTable? |
Can I use django.contrib.gis on GAE? | 2,775,406 | 5 | 4 | 523 | 0 | python,django,google-app-engine,gis | Another limitation is that the GEOS and GDAL libs aren't available on App Engine. | 0 | 0 | 0 | 0 | 2010-05-05T15:45:00.000 | 3 | 0.321513 | false | 2,774,723 | 0 | 0 | 1 | 2 | Can I use GeoDjango with GAE / BigTable? |
Why doesn't IronRuby have the same tools that IronPython does? | 2,789,483 | 1 | 0 | 580 | 0 | ironpython,ironruby,ironpython-studio | Shortly the same support for IronRuby is arriving to visual studio. It will take maybe another couple of months but then it will get there. They first needed to get the language implementation right. | 0 | 0 | 0 | 1 | 2010-05-05T20:57:00.000 | 3 | 0.066568 | false | 2,776,721 | 1 | 0 | 1 | 2 | I've been using Ruby as my main scripting language for years but switched to .NET several years ago. I'd like to continue using Ruby (primarily for testing) BUT the toolset for IronRuby is really nonexistent. Why?
In Python, meanwhile, there are project templates and full intellisense support. Why isn't there someth... |
Why doesn't IronRuby have the same tools that IronPython does? | 2,778,756 | 1 | 0 | 580 | 0 | ironpython,ironruby,ironpython-studio | IronRuby has been out for 4 weeks, IronPython for 4 years. Developing an IDE takes months, if not years. When exactly where they supposed to squeeze that in?
Also, I believe the IronRuby team is smaller than the IronPython team.
There actually is a Ruby plugin for Visual Studio produced by SapphireSteel. It's called Ru... | 0 | 0 | 0 | 1 | 2010-05-05T20:57:00.000 | 3 | 0.066568 | false | 2,776,721 | 1 | 0 | 1 | 2 | I've been using Ruby as my main scripting language for years but switched to .NET several years ago. I'd like to continue using Ruby (primarily for testing) BUT the toolset for IronRuby is really nonexistent. Why?
In Python, meanwhile, there are project templates and full intellisense support. Why isn't there someth... |
page separator in Kate editor | 2,780,096 | 2 | 3 | 582 | 0 | python,coding-style,kate | Ctrl-L simply refers to the character with ASCII code 12 (form feed, new page). It is called Ctrl-L only because some editors allow you to enter it with Ctrl-L. (For instance, in vim, one can type Ctrl-Q Ctrl-L to enter that character, and it also appears as ^L). In Kate, Ctrl-L is a shortcut for saving all files, so y... | 0 | 0 | 0 | 0 | 2010-05-06T09:29:00.000 | 3 | 1.2 | true | 2,779,970 | 1 | 0 | 1 | 2 | PEP 8 says:
Python accepts the control-L (i.e. ^L)
form feed character as whitespace;
Many tools treat these characters as
page separators, so you may use them
to separate pages of related sections
of your file
This look like a great idea for me, but in the text editor I use(kate) "control+L" is for save al... |
page separator in Kate editor | 18,721,903 | 2 | 3 | 582 | 0 | python,coding-style,kate | As a Kate developer, I unfortunately have to tell you that such control sequences are not supported. In fact, Kate often treats these files as binary files, since such characters are not human readable text. So in short: Try to avoid ^L. | 0 | 0 | 0 | 0 | 2010-05-06T09:29:00.000 | 3 | 0.132549 | false | 2,779,970 | 1 | 0 | 1 | 2 | PEP 8 says:
Python accepts the control-L (i.e. ^L)
form feed character as whitespace;
Many tools treat these characters as
page separators, so you may use them
to separate pages of related sections
of your file
This look like a great idea for me, but in the text editor I use(kate) "control+L" is for save al... |
django authentication .htaccess static | 2,780,948 | 1 | 2 | 1,305 | 0 | python,django,apache | Use python to rewrite the .htaccess automatically?
Use a database with users and use a Apache sessions to authenticate? | 0 | 0 | 0 | 0 | 2010-05-06T12:03:00.000 | 5 | 0.039979 | false | 2,780,893 | 0 | 0 | 1 | 1 | In my app users can upload files for other users.
To make the uploaded files accesible only for the addresse I need some kind of static files authentication system.
My idea, is to create the apache hosted directory for each user and to limit access to this derectory using .htaccess.
This means that each time new django... |
Print string as HTML | 2,786,862 | 0 | 1 | 764 | 0 | python,html,newline,genshi | Maybe use a <pre> tag. | 0 | 0 | 0 | 1 | 2010-05-07T07:03:00.000 | 4 | 0 | false | 2,786,803 | 0 | 0 | 1 | 1 | I would like to know if is there any way to convert a plain unicode string to HTML in Genshi, so, for example, it renders newlines as <br/>.
I want this to render some text entered in a textarea.
Thanks in advance! |
Can you authenticate Facebook Graph entirely from command line with Python? | 7,356,440 | 1 | 4 | 1,483 | 0 | python,facebook,oauth | If you only need to authenticate as one user, you can get an access token with the offline_access permission that will last forever and just bake that into the script. | 0 | 0 | 1 | 0 | 2010-05-07T21:04:00.000 | 2 | 0.099668 | false | 2,791,683 | 0 | 0 | 1 | 1 | I'm writing a (tabbed) application for Facebook that requires a background process to run on a server and, periodically, upload images to an album on this application's page.
What I'm trying to do is create a script that will:
a) authenticate me with the app
b) upload an image to a specific album
All of this entirely ... |
How to add a context processor from a Django app | 2,797,899 | -1 | 1 | 933 | 0 | python,django,django-apps | Yeah, adding a context processor is the most recommended approach to achieve this. | 0 | 0 | 0 | 0 | 2010-05-09T14:12:00.000 | 3 | -0.066568 | false | 2,797,878 | 0 | 0 | 1 | 2 | Say I'm writing a Django app, and all the templates in the app require a certain variable.
The "classic" way to deal with this, afaik, is to write a context processor and add it to TEMPLATE_CONTEXT_PROCESSORS in the settings.py.
My question is, is this the right way to do it, considering that apps are supposed to be "i... |
How to add a context processor from a Django app | 2,797,969 | 1 | 1 | 933 | 0 | python,django,django-apps | Your assumption that apps can just be added in a project without touching the project's settings is not correct.
If you add an application to a project, you have to edit the settings, since you must add it in the INSTALLED_APPS tuple.
So why not edit the context processor list? | 0 | 0 | 0 | 0 | 2010-05-09T14:12:00.000 | 3 | 1.2 | true | 2,797,878 | 0 | 0 | 1 | 2 | Say I'm writing a Django app, and all the templates in the app require a certain variable.
The "classic" way to deal with this, afaik, is to write a context processor and add it to TEMPLATE_CONTEXT_PROCESSORS in the settings.py.
My question is, is this the right way to do it, considering that apps are supposed to be "i... |
Django Python Macports | 7,845,384 | 1 | 1 | 3,721 | 0 | python,django,uninstallation,macports | django with Macport should work. py26-django or py27-django. It is the python version you are using that causes the problem.
Check to see if you are using the python comes with Mac or python installed via macport. Try python, python2.6, python2.7 from the terminal.
On my Mac (OSX 10.6.8) the default python version i... | 0 | 0 | 0 | 0 | 2010-05-10T13:06:00.000 | 2 | 0.099668 | false | 2,802,782 | 0 | 0 | 1 | 1 | I installed Django via Macports.
I wasted a lot of time on making it work.
It still does not work.
I would like to COMPLETELY uninstall Django (Macports) and install with the easy install (DJANGO).
I would like to keep Macports and not uninstall it, because I read it SHOULD be useful.
How can I achieve this?
Thank yo... |
Whats the best way to extend Anonymous User in Django? | 2,809,873 | 14 | 14 | 5,125 | 0 | python,django,authentication | Your middleware suggestion got me thinking, and I now think the best idea is to overwrite the standard AuthenticationMiddleware. That class assigns a LazyUser object to the request, which is resolved to the correct user, when accessed, by calling contrib.auth.get_user. This is probably the right place to override thing... | 0 | 0 | 0 | 0 | 2010-05-11T07:15:00.000 | 6 | 1.2 | true | 2,808,723 | 0 | 0 | 1 | 2 | I want to make my User objects all have the same base behaviour and to do so I need to add a couple of methods / properties to Anonymous User.
I've already subclassed User to make richer user objects but I was wondering if anyone has done the same for Anonymous User? And if there are any preferred ways of doing it! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.