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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PyDev project for Google App Engine not finding webapp2 | 7,789,156 | 3 | 6 | 5,907 | 0 | python,eclipse,google-app-engine,pydev | The current SDK does not support the Python 2.7 runtime on the dev_appserver, so it doesn't bundle new libraries like webapp2. If all you need is the libraries, you can download them and include them in your app yourself, but if you need extra runtime features like multithreading and PIL, you will need to do your devel... | 0 | 1 | 0 | 0 | 2011-10-13T16:00:00.000 | 5 | 0.119427 | false | 7,756,981 | 0 | 0 | 1 | 3 | I am attempting to try out Google App Engine with python. Being familiar with Eclipse, I decided to use PyDev. After some trouble, I have a hello world program working... almost. It cannot find the webapp2 import, telling me it is unresolved. I have followed all of the instructions I can find, and have the google a... |
PyDev project for Google App Engine not finding webapp2 | 8,238,441 | 3 | 6 | 5,907 | 0 | python,eclipse,google-app-engine,pydev | I encounter this problem, too.
And I follow TorelTwiddler's instruction -> he's right, there's no webapp2.
You have to add ${GOOGLE_APP_ENGINE}/lib/webapp2 to the "External Libraries".
This occurs because(I guess) you only change the interpreter of the project, not create a whole new GAE project with PyDev.
This action... | 0 | 1 | 0 | 0 | 2011-10-13T16:00:00.000 | 5 | 0.119427 | false | 7,756,981 | 0 | 0 | 1 | 3 | I am attempting to try out Google App Engine with python. Being familiar with Eclipse, I decided to use PyDev. After some trouble, I have a hello world program working... almost. It cannot find the webapp2 import, telling me it is unresolved. I have followed all of the instructions I can find, and have the google a... |
Keep python module in memory | 7,766,483 | 2 | 3 | 292 | 0 | python,persistence,nltk | I believe that the most efficient and quick way to accomplish that is to have a separate server or process which receives text and replies with the results of post_tag() function, or whatever function you want. | 0 | 0 | 0 | 0 | 2011-10-13T21:14:00.000 | 1 | 1.2 | true | 7,760,513 | 0 | 0 | 1 | 1 | I'm using the Natural Language Toolkit for python and in it there is a useful function called pos_tag. You can run nltk.pos_tag() on any a list of words that were tokenized from a sentence and it will return a list of tuples with each word in the sentence and its part of speech (POS).
Well thats great, but I need to r... |
which is better for production with web2py? | 9,021,132 | 0 | 2 | 1,454 | 1 | python,web2py | I say. Whatever you can work with from console. Some events may require fixing db from fingertip, you may also want to have some other ongoing actions in db and it might need to be done outside web2py.
PosgreSQL is my choice as there are much less irregular behaviours thus its easier to grasp... | 0 | 0 | 0 | 0 | 2011-10-13T22:50:00.000 | 4 | 0 | false | 7,761,339 | 0 | 0 | 1 | 1 | which is better for production with web2py? please more insights.
I'm very new 2 web2py and i am working on a small pharmacy mgt system.
pls which is better for production postgres or mysql? if postgres, step by step installation guide pls so to smoothly work with web2py. thanks |
Trouble with parsing HTML with unicodes through Beautiful Soup | 7,769,860 | 1 | 1 | 147 | 0 | python,regex,html-parsing,beautifulsoup | The problem is not with parsing the file. Using the link you gave in your comment to Marco, doing soup = BeautifulSoup(urllib.urlopen(your_link)) works absolutely fine.
It's just when you try and print that parsed data to the console that you get a problem, because it's now been converted to Unicode, and Python will tr... | 0 | 0 | 0 | 0 | 2011-10-14T14:43:00.000 | 1 | 0.197375 | false | 7,769,322 | 0 | 0 | 1 | 1 | Beautiful Soup doesn't seem to work properly(for me) in case HTML contains unicodes whose ascii exceeds 128. What suitable decoding-encoding should be used for this ?
raw = open('index.html').read()
BeautifulSoup.BeautifulSoup(raw)
Error
...stacktrace...
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9'... |
reliable way to deploy new code into a production celery cluster without pausing service | 13,168,517 | 4 | 9 | 1,747 | 0 | python,django,celery | The challenging part here seems to be identifying which celery tasks are new versus old. I would suggest creating another vhost in rabbitmq and performing the following steps:
Update django web servers with new code and reconfigure to point to the new vhost.
While tasks are queuing up in the new vhost, wait for celer... | 0 | 1 | 0 | 0 | 2011-10-14T19:05:00.000 | 2 | 1.2 | true | 7,772,378 | 0 | 0 | 1 | 2 | I have a few celery nodes running in production with rabbitmq and I have been handling deploys with service interruption. I have to take down the whole site in order to deploy new code out to celery. I have max tasks per child set to 1, so in theory, if I make changes to an existing task, they should take effect when t... |
reliable way to deploy new code into a production celery cluster without pausing service | 7,780,065 | 0 | 9 | 1,747 | 0 | python,django,celery | a kind of work around for you can be to set the config variable MAX_TASK_PER_CHILD.
This variable specify the number of task that a Pool Worker execute before kill himself.
Off course when a new Pool Worker is executed this will load the new code.
On my system normally I use to restart celery leaving other task running... | 0 | 1 | 0 | 0 | 2011-10-14T19:05:00.000 | 2 | 0 | false | 7,772,378 | 0 | 0 | 1 | 2 | I have a few celery nodes running in production with rabbitmq and I have been handling deploys with service interruption. I have to take down the whole site in order to deploy new code out to celery. I have max tasks per child set to 1, so in theory, if I make changes to an existing task, they should take effect when t... |
Case insensitive unique model fields in Django? | 31,082,203 | 3 | 63 | 26,513 | 0 | python,django,postgresql,model | You can use citext postgres type instead and not bother anymore with any sort of iexact. Just make a note in model that underlying field is case insensitive.
Much easier solution. | 0 | 0 | 0 | 0 | 2011-10-14T20:41:00.000 | 9 | 0.066568 | false | 7,773,341 | 0 | 0 | 1 | 1 | I have basically a username is unique (case insensitive), but the case matters when displaying as provided by the user.
I have the following requirements:
field is CharField compatible
field is unique, but case insensitive
field needs to be searchable ignoring case (avoid using iexact, easily forgotten)
field is stor... |
Using Django/Python to CONSUME existing web services | 7,774,952 | 2 | 2 | 2,113 | 0 | python,django,web-services,rest | Inside your Django app, you can easily use the urllib and json modules in the Python standard library to pull data from URLs, and then parse them as JSON. | 0 | 0 | 0 | 0 | 2011-10-15T00:36:00.000 | 1 | 1.2 | true | 7,774,930 | 0 | 0 | 1 | 1 | I have an existing REST application serving either JSON or XML. I can use the framework (Play) to render templates directly, but I'm not allowed to (arbitrary homework requirement they just invented), and forced to use a second layer to consume, process and render the REST objects.
I want to use Django/Python if possib... |
Using Sqlite3 on Heroku Cedar stack | 7,784,785 | 22 | 12 | 3,398 | 0 | python,sqlite,heroku | The cedar stack's filesystem is not readonly.
However, you still mustn't store any data on it because the filesystem is ephemeral.
Any time your application restarts, whatever you had written to your application's filesystem disappears forever.
Any time you add a dyno, the two dynos each have their own ephemeral system... | 0 | 0 | 0 | 0 | 2011-10-16T13:07:00.000 | 2 | 1.2 | true | 7,784,471 | 0 | 0 | 1 | 1 | Is there a way to use Sqlite3 with Django on Heroku? |
PyDev Auto-Complete Doesn't Work | 7,784,801 | 0 | 1 | 2,773 | 0 | python,django,pydev | I had the some problem when I upgraded my Ubuntu, it was fixed when i installed the aptana studio package fully. | 0 | 0 | 0 | 0 | 2011-10-16T13:21:00.000 | 2 | 0 | false | 7,784,555 | 0 | 0 | 1 | 1 | Today I reinstalled my OS (Ubuntu 11.10) and installed Django and PyDev.
I ran one of my programs that import Django framework. It works, but PyDev doesn't detect my project, Django, Simple Django Captcha and most Python libraries.
What can I do to fix this problem?
Actually, I must say I configured my PYTHONPATH in Py... |
How to control the "Updating skeletons" background task in PyCharm for IronPython interpreter? | 8,680,085 | -8 | 44 | 23,741 | 0 | ironpython,pycharm,python | Please upgrade to PyCharm 2.0. It's likely that the problem with generating skeletons of binary modules is already fixed. | 0 | 0 | 0 | 0 | 2011-10-17T19:35:00.000 | 3 | -1 | false | 7,798,623 | 1 | 0 | 1 | 1 | Is there a way to suppress, stop or, otherwise, control the settings for, or display of, background tasks in PyCharm? Selecting the IronPython interpreter causes it to update skeletons (seemingly) every time the interpreter is selected and usually takes 20-30 minutes to complete, rendering the IDE nearly unusable. Most... |
Best practice for decoupling a database from a message queue | 7,802,664 | 2 | 0 | 639 | 1 | python,database,pylons,message-queue,celery | It seems that your goal is not to decouple the database from the MQ, but rather from the workers. As such, you can create another queue that receives completion notifications, and have another single worker that picks up the notifications and updates the database appropriately. | 0 | 0 | 0 | 0 | 2011-10-18T04:41:00.000 | 1 | 1.2 | true | 7,802,504 | 0 | 0 | 1 | 1 | I am building a web application that allows a user to upload an image. When the image is uploaded, it needs to be resized to one or more sizes, each of which needs to be sent to Amazon s3 for storage. Metadata and urls for each size of the image are stored in a single database record on the web server. I'm using a mess... |
Bespoke CMS or 3rd Party? | 7,804,591 | 0 | 1 | 591 | 0 | php,python,zend-framework,content-management-system | Sounds like Symfony would be just what you're looking for - with the recent Symfony 2 release, it's also very easy and convenient to integrate additional libraries like Zend, so you can have the best of both worlds for any custom components.
That said, the studio I work for run all our CMS work as Zend apps, so we can ... | 0 | 0 | 0 | 0 | 2011-10-18T08:35:00.000 | 2 | 0 | false | 7,804,468 | 0 | 0 | 1 | 1 | I am planning a side project and I want to know your experiences with CMS builds. The project is a fairly straightforward CMS with no e-commerce functionality needed. I know I can build something like this using Zend Framework quite simply. As it is a side project I don't want to spending time doing the tedious stuff l... |
Overwrite getter to act differently depending on where it was called in template o not. Django | 7,816,060 | 0 | 0 | 71 | 0 | python,django | No. It is not possible. You could write a custom template tag like {% divwrapper model.attr %} or you could write a model method like "html_dump_all_attrs" that returned something. But no, your solution won't work. | 0 | 0 | 0 | 0 | 2011-10-18T14:13:00.000 | 1 | 1.2 | true | 7,808,650 | 0 | 0 | 1 | 1 | Is it posible object to know if it getter called in template or not?
Check for same global variables or any ideas?
I wanna Moddel to give field attributes wrapped in div when it is called in template. |
How do I convert a Django QuerySet into list of dicts? | 54,346,385 | -2 | 170 | 211,404 | 0 | python,django | Simply put list(yourQuerySet). | 0 | 0 | 0 | 0 | 2011-10-18T17:52:00.000 | 11 | -0.036348 | false | 7,811,556 | 0 | 0 | 1 | 2 | How can I convert a Django QuerySet into a list of dicts? I haven't found an answer to this so I'm wondering if I'm missing some sort of common helper function that everyone uses. |
How do I convert a Django QuerySet into list of dicts? | 69,901,744 | 0 | 170 | 211,404 | 0 | python,django | If you already have a query set you just use the list function to turn it into a list of dicts, eg:
list(MyModel.objects.values()) | 0 | 0 | 0 | 0 | 2011-10-18T17:52:00.000 | 11 | 0 | false | 7,811,556 | 0 | 0 | 1 | 2 | How can I convert a Django QuerySet into a list of dicts? I haven't found an answer to this so I'm wondering if I'm missing some sort of common helper function that everyone uses. |
Exist a diference in use django-admin.py or manage.py | 7,818,084 | 1 | 2 | 1,552 | 0 | python,django | manage.py is a file that excists in a project environment and is created after starting a project. It's purpose is to control project commands. Django-admin.py is a script to start a project ( you can put it anyhwhere, or shortcut it via .bash or .profile ) | 0 | 0 | 0 | 0 | 2011-10-19T07:39:00.000 | 3 | 1.2 | true | 7,818,002 | 0 | 0 | 1 | 2 | I'm learning something about Django.In some tutorials that i've read is used django-admin.py for execute commands like " syncdb, startapp and startproject", in the others tutorials is used manage.py, So exist any important diference between use django-admin.py or manage.py ? |
Exist a diference in use django-admin.py or manage.py | 7,818,099 | 1 | 2 | 1,552 | 0 | python,django | manage.py is django-admin fitted in your project: it uses settings.py in your project dir | 0 | 0 | 0 | 0 | 2011-10-19T07:39:00.000 | 3 | 0.066568 | false | 7,818,002 | 0 | 0 | 1 | 2 | I'm learning something about Django.In some tutorials that i've read is used django-admin.py for execute commands like " syncdb, startapp and startproject", in the others tutorials is used manage.py, So exist any important diference between use django-admin.py or manage.py ? |
Override specific admin css files in Django | 7,820,620 | 0 | 3 | 3,643 | 0 | python,css,django,django-admin | Probably you can hack your urls.py file and point only a single media URL to be served from a local folder while the others are served from the Django directory(in development mode). | 0 | 0 | 0 | 0 | 2011-10-19T10:14:00.000 | 3 | 0 | false | 7,819,730 | 0 | 0 | 1 | 1 | Overriding admin templates is as easy as creating a folder admin in your templates directory and copying whatever template files you'd like to override into it. I simply want to play with the admin style sheets however, so I made a folder admin in my static files folder and put css/base.css into it. Unlike the template... |
Django i18n not working | 7,830,439 | 2 | 5 | 3,330 | 0 | python,django,internationalization | Django's LocaleMiddleware tries to determine the locale from the given request and replaces the LANGUAGE_CODE accordingly. It goes through the following steps:
Checks the session for a session variable called django_language. Set the language to the given locale in this session. If not existing it goes to 2.
Checks th... | 0 | 0 | 0 | 0 | 2011-10-19T23:19:00.000 | 3 | 0.132549 | false | 7,829,384 | 0 | 0 | 1 | 2 | I cannot get translations to show up for my templates. Here is what I have done:
In my template file (index.html), I have loaded i18n and used the trans tag where I want translations.
In my project directory, I rand ./manage.py makemessages -l es
My django.po file is in ./conf/locale/es/LC_MESSAGES/django.po
I edited... |
Django i18n not working | 7,838,833 | 0 | 5 | 3,330 | 0 | python,django,internationalization | Ok, I found the problem... My po files were in ./conf/locale instead of just ./locale.
The reason I created ./conf/locale was because when I rand django-admin.py makemessages, it instructed me to do so. However, if it's in your local project directory, then it is just simply ./locale. | 0 | 0 | 0 | 0 | 2011-10-19T23:19:00.000 | 3 | 1.2 | true | 7,829,384 | 0 | 0 | 1 | 2 | I cannot get translations to show up for my templates. Here is what I have done:
In my template file (index.html), I have loaded i18n and used the trans tag where I want translations.
In my project directory, I rand ./manage.py makemessages -l es
My django.po file is in ./conf/locale/es/LC_MESSAGES/django.po
I edited... |
fetch text from a web site and displaying it back | 7,853,614 | 1 | 0 | 105 | 0 | python,screen-scraping | I have something similiar to what you have, but you left out what my main question revolves around. I looked at htmlparser and bs, but I am unsure how to do something like if($posttext == gold) echo "gold in so and so".. seems like bs deals a lot with tags..i suppose since facebook posts can use a variety of tags, how ... | 0 | 0 | 1 | 0 | 2011-10-20T00:21:00.000 | 2 | 0.099668 | false | 7,829,768 | 0 | 0 | 1 | 1 | Currently, there's a game that has different groups, and you can play for a prize 'gold' every hour. Sometimes there is gold, sometimes there isn't. It is posted on facebook every hour ''gold in group2" or "gold in group6'', and other times there isn't a post due to no gold being a prize for that hour. I want to write ... |
Django: Does unique_together imply db_index=True in the same way that ForeignKey does? | 7,834,946 | 14 | 29 | 9,904 | 0 | python,django,django-models,database-indexes | If unique_together does add an index, it will be a multiple column index.
If you want one of the columns to be indexed individually, I believe you need to specify db_index=True in the field definition. | 0 | 0 | 0 | 0 | 2011-10-20T01:17:00.000 | 5 | 1 | false | 7,830,091 | 0 | 0 | 1 | 1 | A field on a model, foo = models.ForeignKey(Foo) will automatically add a database index for the column, in order to make look-ups faster. That's good and well, but Django's docs don't state whether the fields in a model-meta's unique_together receive the same treatment. I happen to have a model in which one char field... |
how to synchronize data between two connects | 7,841,692 | 0 | 0 | 58 | 0 | javascript,python,ajax | Thanks Prusse,It works now - I have increased time limit from 1 to 200 on function queue(s) | 0 | 0 | 0 | 0 | 2011-10-20T15:31:00.000 | 1 | 1.2 | true | 7,838,401 | 0 | 0 | 1 | 1 | I'm using a python tool called "Ajaxterm"(http://wiki.kartbuilding.net/index.php/Ajaxterm). After setting it up. The problem , I face is,when type few chars - they appear as jumbled character.For example,When i type "abcde" it may come as "cdbea" - but no character missing. From my understanding - I tried to debug t... |
Can I deploy a django app which uses sqlite3 as backend on google app engine? | 7,838,935 | 5 | 3 | 582 | 1 | python,django,google-app-engine,web-applications,sqlite | Unfortunately, no you can't. Google App Engine does not allow you to write files, and that is needed by SQLite.
Until recently, it had no support of SQL at all, preferring a home-grown solution (see the "CAP theorem" as for why). This motivated the creation of projects like "Django-nonrel" which is a version of Django ... | 0 | 1 | 0 | 0 | 2011-10-20T15:52:00.000 | 1 | 0.761594 | false | 7,838,667 | 0 | 0 | 1 | 1 | I created a simple bookmarking app using django which uses sqlite3 as the database backend.
Can I upload it to appengine and use it? What is "Django-nonrel"? |
How to use datastore id instead of key_name? | 7,855,122 | 2 | 0 | 147 | 0 | python,google-app-engine,google-cloud-datastore | get_by__id()
no change; it's still a key whether it has an ID or a name
key().id() | 0 | 0 | 0 | 0 | 2011-10-21T20:46:00.000 | 1 | 1.2 | true | 7,855,099 | 0 | 0 | 1 | 1 | How to define that?
What should be used instead of
get_by_key_name
SELECT __key__
key().name() |
RFID + Android --> where do I start? | 7,858,130 | 1 | 1 | 1,251 | 0 | java,android,python,rfid | Buy a Nexus-S, buy some tags.
Then take a look at the code of the 'Tags' application that comes with android. Play with it, modify it. Write some tags with your own application.
Learn what Ndef is and how you craft your own messages/records. Learn how to use the transceive function to do direct communication to the ta... | 0 | 0 | 1 | 0 | 2011-10-22T07:00:00.000 | 1 | 1.2 | true | 7,857,940 | 0 | 0 | 1 | 1 | I've heard that the Google Nexus S has RFID capabilities. I'd like to start learning about RFID and programmatically doing things. Where should I start? Good tutorials or code examples are what I'm after. (or hardware if it's not Android I suppose).
Doesn't have to be Android, could be python or java libraries as well.... |
Parse and interact with obfuscated javascript | 7,860,906 | 1 | 1 | 754 | 0 | python,screen-scraping,mechanize,web-scraping,deobfuscation | Rather than trying to process the page, how about just use Firebug to figure out the names of the form fields, and then use httplib or whatever to send a request with the necessary fields and settings?
If it's sent using ajax, you should be able to determine the values being sent to the server in Firebug as well. | 0 | 0 | 0 | 1 | 2011-10-22T09:25:00.000 | 1 | 0.197375 | false | 7,858,552 | 0 | 0 | 1 | 1 | I'm trying to interact with a HTML 4.0 website which uses heavily obfuscated javascript to hide the regular HTML elements. What I want to do is to fill out a form and read the returned results, and this is proving harder to do than expected.
When I read the page using Firebug, it gave me the source code deobfuscated, a... |
Mongo DB or Couch DB with django for building an app that is similar to top coder? | 10,204,764 | 3 | 3 | 2,560 | 1 | python,django,mongodb,couchdb | I've used mongo-engine with Django but you need to create a file specifically for Mongo documents eg. Mongo_models.py. In that file you define your Mongo documents. You then create forms to match each Mongo document. Each form has a save method which inserts or updates whats stored in Mongo. Django forms are designed t... | 0 | 0 | 0 | 0 | 2011-10-22T13:09:00.000 | 3 | 0.197375 | false | 7,859,775 | 0 | 0 | 1 | 1 | This is what I have :-
Ubuntu 11.10.
Django 1.3
Python 2.7
What I want to do is build an app that is similar to top-coder and I have the skeletal version of the app sketched out. The basic requirements would be:-
1. Saving the code.
2. Saving the user name and ranks.(User-profile)
3. Should allow a teacher to creat... |
To use unicode or not in web development project using flask and sqlalchemy | 7,860,959 | 2 | 2 | 293 | 0 | unicode,python-3.x,flask-sqlalchemy | No, but make sure you separate binary data from text data. That makes it easier to port.
It's easier to use Unicode from the start, but of course you can postpone it. But it's really not very difficult.
You replace everything that should be text data with Unicode, yes.
Only of you make loads of conversions of really ma... | 0 | 0 | 0 | 0 | 2011-10-22T15:43:00.000 | 1 | 1.2 | true | 7,860,643 | 0 | 0 | 1 | 1 | I am working on a web development project using flask and sqlalchemy orm. My post is related to use of unicode in developing this app.
What I have understood till now about unicode :
If I want my webapp to handle data in languages other than English I need to use unicode data type for my variables. Because string var... |
Why don't processes die after page load? - Django | 7,869,753 | 2 | 0 | 100 | 0 | python,django,memory,garbage-collection | mod_wsgi keeps loaded python process in memory to speed up any further requests. That is absolutely normal/ | 0 | 0 | 0 | 0 | 2011-10-23T22:15:00.000 | 1 | 0.379949 | false | 7,869,624 | 0 | 0 | 1 | 1 | It seems logical to me that processes should die and memory be cleared after the python scripts have run and the HTTP response has been sent.
however It seems I have four processes running, one of which is using over 100MB of memory.
It seems like way too much for what I am doing. Is there some garbage collector settin... |
Dealing with timezones for sending sms -python /django | 7,871,122 | 0 | 0 | 125 | 0 | python | You probably want to store each user's timezone in your database and then you can change a particular datetime object's timezone by using datetime.astimezone(tz) .
Now deciding what a good time to to sms them is entirely up to you. | 0 | 0 | 0 | 1 | 2011-10-24T03:10:00.000 | 1 | 0 | false | 7,870,966 | 0 | 0 | 1 | 1 | I need to send sms globally to different timezones to each customer registered online
The messages are scheduled to be send each month.
I have the country details of each cutomer . I would be writing a python script and add it to cronjobs for sending sms.
The issue I am facing is knowing a safe time ( sometime during ... |
Warning while saving opportunity in OpenERP | 23,337,385 | 0 | 1 | 1,027 | 0 | python,openerp | same problem here.I'm using Multi-company, I provid all permistion to the user | 0 | 0 | 0 | 0 | 2011-10-24T11:14:00.000 | 3 | 0 | false | 7,874,752 | 0 | 0 | 1 | 2 | After creating an opportunity, when I click on save, it gives me this warning for some users:
"Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: User Modification)."
What's causing this problem?
Update: I have created a new user of admin type and I add... |
Warning while saving opportunity in OpenERP | 19,397,247 | 0 | 1 | 1,027 | 0 | python,openerp | Hi these is due to the access right problem .So you give the proper access right to your user(for creating the oppurtunity) | 0 | 0 | 0 | 0 | 2011-10-24T11:14:00.000 | 3 | 0 | false | 7,874,752 | 0 | 0 | 1 | 2 | After creating an opportunity, when I click on save, it gives me this warning for some users:
"Operation prohibited by access rules, or performed on an already deleted document (Operation: read, Document type: User Modification)."
What's causing this problem?
Update: I have created a new user of admin type and I add... |
How do I exclude South migrations from Pylint? | 68,687,946 | 0 | 14 | 3,484 | 0 | python,django,django-south,pylint | The anser here didn't work for me, the ignore list doesn't work on directories.
I had to add
ignore-paths=.*/migrations | 0 | 0 | 0 | 0 | 2011-10-24T18:36:00.000 | 4 | 0 | false | 7,880,180 | 0 | 0 | 1 | 1 | I'm using South for migration in my Django project. When I run Pylint on my project I get a bunch of errors from the migration files. How can I exclude migration files from Pylint?
I'm on a Windows system so I can't use filename exclusions in the Pylint options. I've tried to resort to adding # pylint: disable-msg-cat=... |
deploying a WSGI application on mod_python | 7,881,775 | 1 | 5 | 1,117 | 0 | python,mod-wsgi,mod-python,mod-fastcgi | The best solution might be to use mod_proxy and run the Python web app in a different webserver. | 0 | 0 | 0 | 1 | 2011-10-24T20:19:00.000 | 4 | 0.049958 | false | 7,881,474 | 0 | 0 | 1 | 1 | I wrote a WSGI application which I need to deploy to a server, however I've been given a server that already has mod_python installed.
I am not allowed to remove mod_python since there are some mod_python applications running on it already.
One option I considered was installing mod_wsgi alongside mod_python, however I... |
Django Admin: let people test a regexp? | 7,883,376 | 1 | 1 | 66 | 0 | python,django,user-interface,django-admin | My guess is that it would be easiest to do this as a javascript widget--it'll be easier to wedge into the admin and there's tons of examples to work off of.
Daring to venture slightly off of the question though, I'll say I'd be pretty nervous trying to write regexes to parse human-generated responses of any complexity,... | 0 | 0 | 0 | 0 | 2011-10-24T21:52:00.000 | 1 | 1.2 | true | 7,882,442 | 0 | 0 | 1 | 1 | I'm building a Django app that will let researchers send text messages to study participants and parse the responses. While parsing, say, 'Y/N' and numbers is going to be pretty easy, we'll need to send messages that need more complex responses. Which, I think, means regular expressions.
All this is easy enough; the th... |
What programming language features are well suited for developing a live coding framework? | 7,898,079 | 4 | 13 | 1,317 | 0 | python,ruby,clojure,lua,livecoding | The only thing that’s necessary to make this work is a form of dynamic binding, e.g., message passing in Erlang or eval in many other languages.
If you have dynamic binding, then you can change the target of a message without affecting the message, or a message without affecting the target—provided that a target is def... | 1 | 0 | 0 | 0 | 2011-10-25T02:20:00.000 | 8 | 0.099668 | false | 7,884,010 | 0 | 0 | 1 | 3 | I would like to build a "live coding framework".
I should explain what is meant by "live coding framework". I'll do so by comparing live coding to traditional coding.
Generally put, in traditional programming you write code, sometimes compile it, then launch an executable or open a script in some sort of interpreter. I... |
What programming language features are well suited for developing a live coding framework? | 36,677,720 | 2 | 13 | 1,317 | 0 | python,ruby,clojure,lua,livecoding | Smalltalk is probably the best bet for this. As unlike the others, it has a whole IDE for live coding, not just a REPL | 1 | 0 | 0 | 0 | 2011-10-25T02:20:00.000 | 8 | 0.049958 | false | 7,884,010 | 0 | 0 | 1 | 3 | I would like to build a "live coding framework".
I should explain what is meant by "live coding framework". I'll do so by comparing live coding to traditional coding.
Generally put, in traditional programming you write code, sometimes compile it, then launch an executable or open a script in some sort of interpreter. I... |
What programming language features are well suited for developing a live coding framework? | 7,897,130 | 1 | 13 | 1,317 | 0 | python,ruby,clojure,lua,livecoding | Tcl has such a thing already. For example, you can write a gui program that creates a separate window that has an interactive prompt. From there you can reload your code, type in new code, etc.
You can do this with any gui toolkit, though some will be much harder than others. It should be easy with python, though the i... | 1 | 0 | 0 | 0 | 2011-10-25T02:20:00.000 | 8 | 0.024995 | false | 7,884,010 | 0 | 0 | 1 | 3 | I would like to build a "live coding framework".
I should explain what is meant by "live coding framework". I'll do so by comparing live coding to traditional coding.
Generally put, in traditional programming you write code, sometimes compile it, then launch an executable or open a script in some sort of interpreter. I... |
plone 4.1 - plone.app.caching issue - unable to reduce http requests | 7,888,725 | 1 | 2 | 181 | 0 | python,caching,plone | Firebug shows all resource responses, including those taken from the browser cache. The way to differentiate between the two is the colour of the entry; black means it required network access (e.g. the browser asked the server), gray is a cached response.
In other words, just because you see resources listed in Firebug... | 0 | 0 | 0 | 0 | 2011-10-25T10:10:00.000 | 1 | 1.2 | true | 7,887,707 | 0 | 0 | 1 | 1 | Problem: I'd like to reduce the number of http request just by caching in browser some resources.
I've succesfully configured plone.app.caching in plone4.1 (without caching proxy), and no debug/develop mode (css, js, kss) is active.
I'm getting correct "X-Cache-Operation" headers in responses, but the number of http re... |
django smart decimal field | 7,891,949 | 3 | 1 | 1,215 | 0 | python,django,django-models | TBH for a shoe size field I'd probably use a CharField with choices attribute - there are a relatively small number of valid shoe sizes and that way you can format them how you want to.
If it's part of a Product model that may contain things other than shoes, a CharField for 'size' is useful because you can also store ... | 0 | 0 | 0 | 0 | 2011-10-25T14:25:00.000 | 3 | 1.2 | true | 7,890,810 | 0 | 0 | 1 | 1 | I am creating an app that basically stores shoe sizes, along with other information. I have been using the Django Decimal field to store the sizes, however the decimal field stores sizes like 10 as 10.0, so my question is, is there a way to make or if already exists a field that when provided an int ( 10 ) it stores th... |
Run python script (with numpy dependency) from java | 7,892,106 | 3 | 1 | 2,255 | 0 | java,python,numpy,jython | If you're using Numpy you probably have to just use C Python, as it's a compiled extension. I'd recommend saving the image to disk, perhaps as a temporary file, and then calling the Python as a subprocess. If you're dealing with binary data you could even try memory mapping the data in Java and passing in in the path t... | 0 | 0 | 0 | 0 | 2011-10-25T15:19:00.000 | 3 | 1.2 | true | 7,891,586 | 0 | 1 | 1 | 1 | In a java application I need to use a specific image processing algorithm that is currently implemented in python.
What would be the best approach, knowing that this script uses the Numpy library ?
I alreayd tried to compile the script to java using the jythonc compiler but it seems that it doesn't support dependencies... |
Will a website recover from a Denial of Service attack on its own? | 7,909,570 | 0 | 2 | 702 | 0 | python,django,dos,recover | You should stop your screen-scraping software if you have not already.
Depending on what part of the system is down (Either the database, the server, the network or all), there is a chance it will recover by itself when the loads come back down.
If your application cannot sustain 250 simultaneous connections, you will ... | 0 | 0 | 0 | 0 | 2011-10-26T22:08:00.000 | 2 | 0 | false | 7,909,527 | 0 | 0 | 1 | 2 | I'm in a rather peculiar situation right now. To make a long story short, I'm part of a (real life) volunteer organization of about 2000 members. Our current website was built and maintained by a member who is no longer part of the organization (he quit). Unfortunately, he was the only one that actually had access t... |
Will a website recover from a Denial of Service attack on its own? | 7,909,619 | 1 | 2 | 702 | 0 | python,django,dos,recover | More than likely the system is not truly down for good, unless the guy might have gotten pissed or the hosting provider, etc disabled it due to the traffic load. But there are a number of things to think of. But 250 connections isn't that much load, even for a shared hosting account, unless you were just flooding the... | 0 | 0 | 0 | 0 | 2011-10-26T22:08:00.000 | 2 | 1.2 | true | 7,909,527 | 0 | 0 | 1 | 2 | I'm in a rather peculiar situation right now. To make a long story short, I'm part of a (real life) volunteer organization of about 2000 members. Our current website was built and maintained by a member who is no longer part of the organization (he quit). Unfortunately, he was the only one that actually had access t... |
How do I find the number of visitors to my web hosted django application? | 7,912,158 | 1 | 0 | 307 | 0 | python,django,web-applications,ubuntu | How about using some free statistics provider like Statcounter or Google Analytics? | 0 | 0 | 0 | 0 | 2011-10-27T05:50:00.000 | 4 | 0.049958 | false | 7,912,140 | 0 | 0 | 1 | 2 | I have a django application hosted on a server running on Apache + Ubuntu. I deployed the application using mod_wsgi. Is there any way to find out the number of visitors to my web site.
I realize that this query might have little to do with django and more do with the server. Any help would be appreciated. |
How do I find the number of visitors to my web hosted django application? | 7,912,159 | 1 | 0 | 307 | 0 | python,django,web-applications,ubuntu | Why not just use Google Analytics? You can easily monitor user behavior, traffic source, time spend on each page, etc.
If you really want to do this with Django you could write a context processor to record each request, but then you would have to write the user's IP and check if the user has not visited before and thi... | 0 | 0 | 0 | 0 | 2011-10-27T05:50:00.000 | 4 | 1.2 | true | 7,912,140 | 0 | 0 | 1 | 2 | I have a django application hosted on a server running on Apache + Ubuntu. I deployed the application using mod_wsgi. Is there any way to find out the number of visitors to my web site.
I realize that this query might have little to do with django and more do with the server. Any help would be appreciated. |
Turbogears2: analog of django context processors | 9,769,018 | 4 | 0 | 198 | 0 | python,django,turbogears,genshi | You have three possible solutions to achieve this.
First you can use tg.tmpl_context which is available inside every template as tmpl_context.
You can fill the variables inside the BaseController.__call__ so that they are available everywhere.
Another approach is to register base_config.variable_provider inside app_cf... | 0 | 0 | 0 | 0 | 2011-10-27T09:25:00.000 | 2 | 1.2 | true | 7,913,999 | 0 | 0 | 1 | 1 | Is there any analog of django context processors in turbogears2?
In tg1 was stdvars, but not in tg2 anymore.
Explaining:
I need to have some template tags, avaible on each page, without obvious declaring in each controller. |
PDF scraping using R | 7,918,885 | 11 | 10 | 4,014 | 0 | python,r,pdf,screen-scraping | Extracting text from PDFs is hard, and nearly always requires lots of care.
I'd start with the command line tools such as pdftotext and see what they spit out. The problem is that PDFs can store the text in any order, can use awkward font encodings, and can do things like use ligature characters (the joined up 'ff' and... | 0 | 0 | 1 | 0 | 2011-10-27T15:54:00.000 | 4 | 1.2 | true | 7,918,718 | 0 | 0 | 1 | 1 | I have been using the XML package successfully for extracting HTML tables but want to extend to PDF's. From previous questions it does not appear that there is a simple R solution but wondered if there had been any recent developments
Failing that, is there some way in Python (in which I am a complete Novice) to obtai... |
Deciding to WSGI or Django for new web app | 7,925,410 | 0 | 4 | 213 | 0 | python,django,wsgi,django-wsgi | I've worked a bit with some django "apps" ,its really easy, but setting up the "apps" can be a bit of a long process. Django has a lot of nice features that you won't be using and I agree that you might be on one "extreme" here. | 0 | 0 | 0 | 0 | 2011-10-27T17:34:00.000 | 3 | 0 | false | 7,919,968 | 0 | 0 | 1 | 1 | I'm in the process of setting up a new web app and deciding whether to just do it with WSGI or go the full framework route with Django.
The app's foremost requirements:
1) The app has no UI what so ever and all of the data is exposed to clients via a REST api with JSON.
2) It will have data to persist so MongoDB & pr... |
Pre-fill a form with attached file taken from some URL in Django | 7,929,052 | 1 | 0 | 851 | 0 | javascript,python,django | Most sites that do something like this implement it with a second form where you attach the file. Doing the upload via ajax means you do need to store the file on your server for some amount of time, and then your original form just needs a reference to that file so you know when you're done with it.
Then you just need... | 0 | 0 | 0 | 0 | 2011-10-28T12:06:00.000 | 2 | 0.099668 | false | 7,929,014 | 0 | 0 | 1 | 2 | I have a form with "subject", "body" and "file" fields on some page on my Django site.
If "subject" and/or "body" parameters exist in GET, I pre-fill them in the form from server side.
I want to do the same with "file" field - more exactly, I want if there is an "URL" parameter in request.GET, take the file from this U... |
Pre-fill a form with attached file taken from some URL in Django | 7,929,043 | 1 | 0 | 851 | 0 | javascript,python,django | You can't pre-fill a file field. But I don't think you need to use one at all, since you're getting the file from a URL, not from the user's local machine. Just use a normal text field for the URL, and get the file server-side (eg using urllib) after the form is submitted. | 0 | 0 | 0 | 0 | 2011-10-28T12:06:00.000 | 2 | 1.2 | true | 7,929,014 | 0 | 0 | 1 | 2 | I have a form with "subject", "body" and "file" fields on some page on my Django site.
If "subject" and/or "body" parameters exist in GET, I pre-fill them in the form from server side.
I want to do the same with "file" field - more exactly, I want if there is an "URL" parameter in request.GET, take the file from this U... |
Getting `django-registration` to send you to the page you were originally trying to visit | 7,937,107 | -4 | 9 | 2,566 | 0 | python,django,django-authentication,django-registration | You should use the same decorator @login_required, django-registration uses that too. | 0 | 0 | 0 | 0 | 2011-10-28T14:23:00.000 | 2 | -1 | false | 7,930,526 | 0 | 0 | 1 | 1 | django.contrib.auth has an awesome feature: When you try to access a page that's decorated by login_required, you get redirected to the login page with a next argument, so after you login you get redirected back to the page you were originally trying to access. That's good for the user flow.
But, apparently django-regi... |
get amount of used resources in app engine | 7,934,948 | 0 | 0 | 34 | 0 | python,google-app-engine | Unfortunately this is not possible, there is no API that you can use for this.
Looking at the App Engine roadmap there is no such feature coming along any time soon.
The only thing i can recommend is you sign up for billing and recieve the 50$ free quota, it's here till 31 october. You can enable billing and disable it... | 0 | 1 | 0 | 0 | 2011-10-28T16:15:00.000 | 1 | 1.2 | true | 7,931,936 | 0 | 0 | 1 | 1 | I am thinking about implementing resource throttling in my application in google app engine.
My idea is checking whether I am running out of resources (for example, bandwidth) and disabling part of the website, using the final part of the available daily traffic to inform the user that the site is running in a "resourc... |
Python or Java module to render HTML page on server side and obtain DOM object | 51,939,389 | 0 | 1 | 412 | 0 | java,python,webkit,rendering,server-side | If you want to process (execute) the javascript on headless server to generate the HTML snapshot, try using a tool like Selenium.
Selenium will allow you to fully render the HTML webpage on server side and then you can use the generated HTML to make a snapshot. | 0 | 0 | 1 | 0 | 2011-10-29T13:02:00.000 | 1 | 0 | false | 7,939,069 | 0 | 0 | 1 | 1 | I am looking for a library in Python OR Java that can use webkit or similar rendering engine on the server side (without GUI) and return the DOM object for further processing like selecting the elements etc. |
Using Python Flask, mod_wsgi, apache2 - unable to get custom 500 error page | 7,942,317 | 1 | 2 | 873 | 1 | python,apache,wsgi,flask | Are you sure the error is actually coming from Flask if you are getting a generic Apache 500 error page? You should look in the Apache error log to see what error messages are in there first. The problem could be configuration or your WSGI script file being wrong or failing due to wrong sys.path etc. | 0 | 0 | 0 | 0 | 2011-10-29T18:13:00.000 | 1 | 0.197375 | false | 7,940,745 | 0 | 0 | 1 | 1 | I am running Ubuntu, Flask 0.8, mod_wsgi 3 and apache2. When an error occurs, I am unable to get Flask's custom 500 error page to trigger (and not the debug mode output either). It works fine when I run it without WSGI via app.run(debug=True).
I've tried setting WSGIErrorOverride to both On and Off in apache settings... |
how do i create a database in psycopg2 and do i need to? | 7,942,855 | 0 | 0 | 1,391 | 1 | python,database,django,psycopg2 | Generally, you would create the database externally before trying to hook it up with Django.
Is this your private server? If so, there are command-line tools you can use to set up a PostgreSQL user and create a database.
If it is a shared hosting situation, you would use CPanel or whatever utility your host provides t... | 0 | 0 | 0 | 0 | 2011-10-29T20:52:00.000 | 2 | 0 | false | 7,941,623 | 0 | 0 | 1 | 2 | I'm create a blog using django.
I'm getting an 'operational error: FATAL: role "[database user]" does not exist.
But i have not created any database yet, all i have done is filled in the database details in setting.py.
Do i have to create a database using psycopg2? If so, how do i do it?
Is it:
python
import psycop... |
how do i create a database in psycopg2 and do i need to? | 7,941,712 | 0 | 0 | 1,391 | 1 | python,database,django,psycopg2 | before connecting to database, you need to create database, add user, setup access for user you selected.
Reffer to installation/configuration guides for Postgres. | 0 | 0 | 0 | 0 | 2011-10-29T20:52:00.000 | 2 | 0 | false | 7,941,623 | 0 | 0 | 1 | 2 | I'm create a blog using django.
I'm getting an 'operational error: FATAL: role "[database user]" does not exist.
But i have not created any database yet, all i have done is filled in the database details in setting.py.
Do i have to create a database using psycopg2? If so, how do i do it?
Is it:
python
import psycop... |
Should I ensure that all my web application code is UTF-8? | 7,945,023 | 3 | 4 | 101 | 0 | python,django,utf-8,file-encodings | The # coding: utf-8 line is only necessary for files which contain special characters directly. Depending on how you want to achieve l10n, you have to take care how you process the strings.
In Python2, you should use unicode() objects, while in Python3, normal str()ings are the thing to use. | 0 | 0 | 0 | 0 | 2011-10-30T12:49:00.000 | 1 | 1.2 | true | 7,944,992 | 1 | 0 | 1 | 1 | I have a Django site that contains only English language strings. I'll be localising this to other languages. I haven't set any sort of file encoding options. Do need to convert all my Python code to UTF-8? is this a good practice? If so, do I need to actually convert the file to be UTF-8 or do I simply need to add thi... |
Web application to sign PDF documents with digital certificates released by CAs | 7,959,329 | 0 | 3 | 4,082 | 0 | python,django,cryptography,certificate,digital-signature | This sounds like something from EU. Unfortunately there are countless of different existing online signature plugins. Keep in mind that many depend on the client side software as well (if the certificates come from a smart card, smart card middleware usually needs to be present as well). So you better study your target... | 0 | 0 | 0 | 0 | 2011-10-31T14:52:00.000 | 3 | 0 | false | 7,955,410 | 0 | 0 | 1 | 2 | Immagine a web application written in python/django in which users authenticate with digital certificates via apache+mod_ssl (and a custom django authentication backend), how can they sign files then? The certificates are released by government approved CAs.
If I'm not wrong, a file needs to be signed with the private ... |
Web application to sign PDF documents with digital certificates released by CAs | 7,955,645 | 0 | 3 | 4,082 | 0 | python,django,cryptography,certificate,digital-signature | As tawman described in his answer, the right approach is to have a client-side module in the browser, and have this module do actual signing. You can have signed Java applet or signed ActiveX control to do the job.
We offer such solution for distributed signing with ready to use client modules, but server-side part req... | 0 | 0 | 0 | 0 | 2011-10-31T14:52:00.000 | 3 | 0 | false | 7,955,410 | 0 | 0 | 1 | 2 | Immagine a web application written in python/django in which users authenticate with digital certificates via apache+mod_ssl (and a custom django authentication backend), how can they sign files then? The certificates are released by government approved CAs.
If I'm not wrong, a file needs to be signed with the private ... |
Boto: how to keep EMR job flow running after completion/failure? | 9,055,033 | 3 | 2 | 2,242 | 0 | python,boto,amazon-emr | If it finishes correctly, it should not terminate with keep_alive=True. That said, it would normally exit on failure, so you want to add terminate_on_failure="CONTINUE" to your add_job_steps arguments. | 0 | 0 | 0 | 0 | 2011-10-31T22:33:00.000 | 3 | 1.2 | true | 7,960,578 | 0 | 0 | 1 | 1 | How can I add steps to a waiting Amazon EMR job flow using boto without the job flow terminating once complete?
I've created an interactive job flow on Amazon's Elastic Map Reduce and loaded some tables. When I pass in new steps to the job flow using Boto's emr_conn.add_jobflow_steps(...), the job flow terminates after... |
Does Django password_reset support html email templates? | 51,285,099 | 1 | 10 | 6,136 | 0 | python,django | Here is the simple approach worked for me. Add our custom template path in such a way worked for me.
path('users/password/reset/', password_reset, {'html_email_template_name': 'registration/password_reset_email.html'},name='password_reset'), | 0 | 0 | 0 | 0 | 2011-11-01T11:14:00.000 | 9 | 0.022219 | false | 7,965,611 | 0 | 0 | 1 | 2 | It seems to me django only supports plain text messages for password reset emails out of the box. How can I use html templates for this purpose? |
Does Django password_reset support html email templates? | 7,965,953 | 5 | 10 | 6,136 | 0 | python,django | You can override save method of django.contrib.auth.forms.PasswordResetForm and pass new form as an argument to password_reset view. | 0 | 0 | 0 | 0 | 2011-11-01T11:14:00.000 | 9 | 0.110656 | false | 7,965,611 | 0 | 0 | 1 | 2 | It seems to me django only supports plain text messages for password reset emails out of the box. How can I use html templates for this purpose? |
HTML/Javascript/CSS GUI for the development of desktop applications with python? | 7,967,656 | 0 | 5 | 3,024 | 0 | python,html,css,user-interface | you could always use django, django templates support html, js, css, php etc. | 1 | 0 | 0 | 0 | 2011-11-01T13:59:00.000 | 3 | 0 | false | 7,967,575 | 0 | 0 | 1 | 2 | I wonder if there's a python GUI like pyqt etc. which works purely with html and javascript for layouting desktop applications...
Do you know if there are projects like this? Does this make sense at all ;-) Or it it just me finding that a nice tool... |
HTML/Javascript/CSS GUI for the development of desktop applications with python? | 7,967,652 | 2 | 5 | 3,024 | 0 | python,html,css,user-interface | Since you mention PyQt yourself, you could perhaps just create a simple GUI using these tools, with your entire application made up of a QtWebKit module. Then just point to some files you created locally, and browse them using your appliction? But, this would not be any different compared to using a normal browser, so ... | 1 | 0 | 0 | 0 | 2011-11-01T13:59:00.000 | 3 | 0.132549 | false | 7,967,575 | 0 | 0 | 1 | 2 | I wonder if there's a python GUI like pyqt etc. which works purely with html and javascript for layouting desktop applications...
Do you know if there are projects like this? Does this make sense at all ;-) Or it it just me finding that a nice tool... |
Django Translation : User data --vs-- Site Content --vs-- UI static text? | 7,977,014 | 0 | 1 | 493 | 0 | python,django,localization,internationalization | UI text: gettext is the way to go.
User Data (Dynamic): Very simple: you don't translate it at all. The only things you could do is asking the users to provide more than one language (only few will do) or using machine translations (will piss of people - usually they prefer english over a crappy translation). Especiall... | 0 | 0 | 0 | 0 | 2011-11-02T06:18:00.000 | 1 | 1.2 | true | 7,976,495 | 0 | 0 | 1 | 1 | I am confused with how to proceed on Internationalization & Localizations, so I categorized a website's data as follows :
Site Content : Content that is hosted by the website i.e. the data about the subject. Eg: Mobile Phone Site (Data about mobile models, specs, prices, etc.)
User Data : Data that is added by the use... |
scrapy script called from cron only constructor called | 7,984,842 | 1 | 0 | 359 | 0 | python,crontab,scrapy | Scrapy executes correctly, but doesn't output all its messages to STDOUT, so the simple pipe (>) doesn't redirect everything into your file, only that stuff that goes to STDOUT (which as you say, seems to be the constructor only).
With &> it fetches all messages from scrapy and puts them into your log. | 0 | 0 | 0 | 1 | 2011-11-02T17:29:00.000 | 1 | 0.197375 | false | 7,984,714 | 0 | 0 | 1 | 1 | scrapy crawler is called through a shell script, which is used as the command line in a crontab entry. The shell script looks like:
scrapy crawl targethost.com
when time is due and it did execute, but seems only the constructor is called (I verified with debug output). The problem is solved by re-write the shell script... |
interacting with an external django project from within another django project | 7,987,920 | -1 | 5 | 1,952 | 0 | python,django,django-models | Why not replicate the models from the crawler into your new project (so they are created in the same project space), then simply use django's manage.py to dump the data from the old crawler project into json files and migrate them over to your new project?
Provided your crawler project is settings/db type independent, ... | 0 | 0 | 0 | 0 | 2011-11-02T21:59:00.000 | 2 | -0.099668 | false | 7,987,845 | 0 | 0 | 1 | 1 | I'm looking for a way to interact with the models of a django project from within a separate django project. I don't mean different apps, I mean 2 separate projects with 2 separate settings files.
I'm in the process of migrating an old web store (really old, it's all static html) to our django based backend. To do this... |
How can I stop the debugger server from pydev? | 7,993,203 | 0 | 1 | 525 | 0 | python,eclipse,pydev | This was a bug -- and it was fixed in the latest version (PyDev 2.2.4), so, please upgrade to the latest version and that should be working already. | 0 | 1 | 0 | 0 | 2011-11-03T00:02:00.000 | 1 | 0 | false | 7,988,856 | 0 | 0 | 1 | 1 | I am using the pydev remote debugger feature for my application.
When I try to stop the debugger server via the stop button it shows on the console that the server is successfully terminated but it isn't because it is still accepting new connections on its default port (5678).
Do you know how can I stop the server in a... |
Funny issue; localStorage and MongoDB | 8,487,539 | -1 | 1 | 1,051 | 0 | javascript,python,html,mongodb | It's nothing about MongoDB, it's the AJAX call.
The string in response of an AJAX call will be converted to character entities, or they will break ur DOM with characters like '<'. All u need to do is converted them back. | 0 | 0 | 0 | 0 | 2011-11-03T03:48:00.000 | 2 | -0.099668 | false | 7,990,060 | 0 | 0 | 1 | 1 | I'm having a peculiar issue. I'm reading the HTML from a div contenteditable, and then sending an AJAX request to my backend that saves that HTML to a mongodb document, and I also save that exact same HTML to localStorage.
And, guess what happens? When the text is loaded back later, the localStorage renders fine, but,... |
Why are templatetags stored in directories? | 7,993,570 | 3 | 0 | 107 | 0 | python,django,django-templates | Django expects you to arrange your apps in certain ways. Requiring a templatetags directory in the app is not the exception. Some other requirements are:
ModelAdmin in admin.py (for autodiscovery)
Models in models.py
Management commands in management/commands directory
Fixtures in the fixtures directory
Unlike templa... | 0 | 0 | 0 | 0 | 2011-11-03T10:28:00.000 | 2 | 1.2 | true | 7,993,348 | 0 | 0 | 1 | 1 | I'm now working with template tags and one thing I haven't understood is why do template-tags have to be stored inside a templatetags directory in the app. Is there an underlying reason for this? Is it possible to store them in a templatetags.py file somehow so that I can reduce the extra bloat around having extra dire... |
Streaming audio and video with Python | 7,994,014 | 2 | 10 | 18,589 | 0 | python,video,streaming,live,ipv6 | You can use gstreamer's python module. I mean gst-python mentioned above. Use rtmp protocol to synchronize client/server videos. Last time I use gst-python, there was no support for rtmp. At the time, my solution was to limit buffer size. When buffer gets full oldest frames will be dropped. | 0 | 0 | 1 | 0 | 2011-11-03T10:51:00.000 | 3 | 1.2 | true | 7,993,624 | 1 | 0 | 1 | 1 | I need to make an application which streams live multimedia. At present my application is taking image frames from a webcam (using OpenCV) and sending it to the client. It is also sending audio using pymedia module. The problem is that both the image and audio packets that arrive at the client are out of sync.
So I hav... |
Android and Python | 7,995,273 | 0 | 4 | 1,064 | 0 | android,python,sl4a | I think, what you want to do is make an independently apk file, that includes the python interpret and your script code.
I don't know if this can be done in Android. The only whay I know is running your script from Android Scripting Environment. | 1 | 0 | 0 | 0 | 2011-11-03T12:53:00.000 | 4 | 0 | false | 7,995,202 | 0 | 0 | 1 | 2 | Can I port existing python scripts on android using SL4A or ASE ? What I specifically want to do is to create an android application with normal UI elements and run the python scripts from the application itself, get the output and display it. Is this possible ? |
Android and Python | 7,995,341 | 2 | 4 | 1,064 | 0 | android,python,sl4a | Personnaly I think that you ask implicitly for three points:
Compatibility Desktop/Mobile
The first is the compatibility between the python library on the phone and the python library in your computer. If you don't use third party library and be sure to include the extra python library provided by sl4a, you should gene... | 1 | 0 | 0 | 0 | 2011-11-03T12:53:00.000 | 4 | 1.2 | true | 7,995,202 | 0 | 0 | 1 | 2 | Can I port existing python scripts on android using SL4A or ASE ? What I specifically want to do is to create an android application with normal UI elements and run the python scripts from the application itself, get the output and display it. Is this possible ? |
How to become productive using Vim/Emacs | 8,001,512 | 3 | 6 | 1,355 | 0 | python,ruby,linux,vim,emacs | I am an Emacs guy (using vi only to edit configuration files under /etc). I think that with Emacs, you should start it at most daily (and it is very different with vim), and you should configure it in your .emacs file. For example, I compile using the F12 key, with (global-set-key [f12] 'recompile) in my .emacs. | 0 | 1 | 0 | 1 | 2011-11-03T20:24:00.000 | 5 | 0.119427 | false | 8,001,384 | 0 | 0 | 1 | 3 | I've been an Eclipse user for the last 3 years or more. I do Java EE (and Spring) development in it and so far I've done 90% of my tasks without having to touch the mouse. Typically my Eclipse setup is as follow:
Subclipse (or alternatively I use command line)
m2clipse (Maven Eclipse plugin)
Data Source Explorer (de... |
How to become productive using Vim/Emacs | 8,001,471 | 5 | 6 | 1,355 | 0 | python,ruby,linux,vim,emacs | If you ask a question which involves "vim OR emacs" you will never get an useful answer. It's a religious question, which does not have a correct answer! That said, you should clearly use Vim! ;-)
But seriously: Vim is much more lightweight, so it might better suite the scenario you are describing. Vim can be scripted ... | 0 | 1 | 0 | 1 | 2011-11-03T20:24:00.000 | 5 | 0.197375 | false | 8,001,384 | 0 | 0 | 1 | 3 | I've been an Eclipse user for the last 3 years or more. I do Java EE (and Spring) development in it and so far I've done 90% of my tasks without having to touch the mouse. Typically my Eclipse setup is as follow:
Subclipse (or alternatively I use command line)
m2clipse (Maven Eclipse plugin)
Data Source Explorer (de... |
How to become productive using Vim/Emacs | 8,001,983 | 1 | 6 | 1,355 | 0 | python,ruby,linux,vim,emacs | Either of those text editors will have a learning curve. That being said I have successfully used emacs to do the following tasks that are in line w/ what you've asked:
Write PL/SQL and execute it on an oracle DB all from the editor.
Write, Compile, Run java.
Edit pom files.
Keep a pretty good TODO list in org mode.... | 0 | 1 | 0 | 1 | 2011-11-03T20:24:00.000 | 5 | 0.039979 | false | 8,001,384 | 0 | 0 | 1 | 3 | I've been an Eclipse user for the last 3 years or more. I do Java EE (and Spring) development in it and so far I've done 90% of my tasks without having to touch the mouse. Typically my Eclipse setup is as follow:
Subclipse (or alternatively I use command line)
m2clipse (Maven Eclipse plugin)
Data Source Explorer (de... |
Django forms: reasons to use them? | 8,006,177 | 2 | 2 | 282 | 0 | python,django,django-forms | The more built-in forms, the less work for developers. You are free to implement them from 0 but it is always faster to use something that is already done and tested.
Anyway, you have something in the middle: inherit from built-in forms and customize them. | 0 | 0 | 0 | 0 | 2011-11-04T07:14:00.000 | 3 | 1.2 | true | 8,005,948 | 0 | 0 | 1 | 1 | Are there any real reason to use builtin forms in django?
One of them as I understand is validation. Ok. And maybe some convinience (but not for me).
Anything else?
Is there any acceleration in site work with forms? |
nohup not logging in nohup.out | 10,672,167 | 3 | 0 | 1,610 | 0 | python,logging,web2py,nohup | Nothing to worry. Actually the python process along with nohup was logging the file in batch mode and i could see the output only after quite some time and not instantaneously. | 0 | 1 | 0 | 0 | 2011-11-05T16:50:00.000 | 4 | 1.2 | true | 8,021,674 | 0 | 0 | 1 | 3 | I am running a python script of web2py and want to log its output. I am using following command
nohup python /var/www/web2py/web2py.py -S cloud -M -N -R applications/cloud/private/process.py >>/var/log/web2pyserver.log 2>&1 &
The process is running but it is not logging into the file. I have tried without nohup also bu... |
nohup not logging in nohup.out | 12,594,155 | 0 | 0 | 1,610 | 0 | python,logging,web2py,nohup | If you've got commas in your print statements there's a good chance it's due to buffering. You can put a sys command (forget which) in your code or when you run the nohup, just add the option -u and you'll disable std(in|out|err) buffering | 0 | 1 | 0 | 0 | 2011-11-05T16:50:00.000 | 4 | 0 | false | 8,021,674 | 0 | 0 | 1 | 3 | I am running a python script of web2py and want to log its output. I am using following command
nohup python /var/www/web2py/web2py.py -S cloud -M -N -R applications/cloud/private/process.py >>/var/log/web2pyserver.log 2>&1 &
The process is running but it is not logging into the file. I have tried without nohup also bu... |
nohup not logging in nohup.out | 8,022,039 | 0 | 0 | 1,610 | 0 | python,logging,web2py,nohup | nohup will try to create the file in the local directory. Can you create a file in the folder you are running it from ? | 0 | 1 | 0 | 0 | 2011-11-05T16:50:00.000 | 4 | 0 | false | 8,021,674 | 0 | 0 | 1 | 3 | I am running a python script of web2py and want to log its output. I am using following command
nohup python /var/www/web2py/web2py.py -S cloud -M -N -R applications/cloud/private/process.py >>/var/log/web2pyserver.log 2>&1 &
The process is running but it is not logging into the file. I have tried without nohup also bu... |
Datastore 'Response too large error' since migrated to Python27 | 8,034,730 | 3 | 4 | 190 | 0 | python,google-app-engine | This is a known bug in the Python 2.7 runtime - if the result of a datastore query is >1MB then you will get this response.
It will be fixed in 1.6.1. | 0 | 1 | 0 | 0 | 2011-11-06T01:24:00.000 | 1 | 1.2 | true | 8,024,609 | 0 | 0 | 1 | 1 | I just migrated my GAE/python app from M/S to HRD and then activated the new python27 runtime.
Now most of my datastore queries are failing with this error:
ResponseTooLargeError: The response from API call datastore_v3.RunQuery() was too large.
The same code is still running on older GAE app (M/S and python25) with no... |
mechanize could not retrieve all forms(including some generated by js) | 8,025,567 | 0 | 0 | 225 | 0 | python,perl,forms,mechanize | Use a browser that understands javascript as per WWW::Mechnize::FAQ, a browser like WWW::Mechanize::Firefox or WWW::Scripter | 0 | 0 | 0 | 0 | 2011-11-06T05:19:00.000 | 3 | 0 | false | 8,025,379 | 0 | 0 | 1 | 2 | it is a html including two forms. One of them is generated dynamic by js when the page is loaded
So, if I try to fetch them, only one form could be return, and the form generated dynamic not found.
the question is
how to fetch all forms even if they are generated by js. |
mechanize could not retrieve all forms(including some generated by js) | 8,026,558 | 1 | 0 | 225 | 0 | python,perl,forms,mechanize | Launch Firefox, use HTTP Live Headers to inspect what the javascript does, then imitate that using Mechanize / relevant HTTP requests. | 0 | 0 | 0 | 0 | 2011-11-06T05:19:00.000 | 3 | 0.066568 | false | 8,025,379 | 0 | 0 | 1 | 2 | it is a html including two forms. One of them is generated dynamic by js when the page is loaded
So, if I try to fetch them, only one form could be return, and the form generated dynamic not found.
the question is
how to fetch all forms even if they are generated by js. |
Android SL4A query | 8,026,521 | 0 | 1 | 432 | 0 | android,python,sl4a | You need a file explorer (I used andexplorer) to transfer the files to sl4a's install dir (ideally in a subdirectory), and unzip them there. | 0 | 0 | 0 | 0 | 2011-11-06T07:05:00.000 | 3 | 0 | false | 8,025,677 | 0 | 0 | 1 | 1 | How do I download zipped files containing python source code into the android SL4A ? I've tried going to the website and downloading it but the download always fails. Also can I install python-urwid in android? |
authentication on python for wsgi application | 8,026,738 | 0 | 0 | 320 | 0 | python,wsgi | If you are not going to use any frameworks or libraries, you just have to implement it manually: use some kind of storage for credentials, generate forms, check passwords preferrably using salted hashes, create and store session identifiers in cookies and so on.
But maybe if it's not intended to be a public application... | 0 | 0 | 0 | 0 | 2011-11-06T09:28:00.000 | 2 | 0 | false | 8,026,162 | 0 | 0 | 1 | 1 | I try to make simple wsgi application without any frameworks, only standard library (wsgiref). And now I looking for simple way to make authentication in my application. How I can make it?
Thanks. |
Do AWS Canonical UserIDs exist for AWS Federated Users (temporary security credentials)? | 8,074,814 | 1 | 2 | 718 | 1 | python,amazon-s3,amazon-web-services,boto,amazon-iam | Contacted the author of boto and learned of:
get_canonical_user_id() for the S3Connection class.
This will give you the canonical user ID for the credentials associated with the connection. The connection will have to have been used for some operation (e.g.: listing buckets).
Very awkward, but possible. | 0 | 0 | 0 | 0 | 2011-11-07T03:57:00.000 | 1 | 1.2 | true | 8,032,576 | 0 | 0 | 1 | 1 | Does a canonical user id exist for a federated user created using STS? When using boto I need a canonical user id to grant permissions to a bucket.
Here's a quick tour through my code:
I've successfully created temporary credentials using boto's STS module (using a "master" account), and this gives me back:
federa... |
What is an Object Oriented desktop application framework similar to Rails? | 8,032,682 | 2 | 0 | 228 | 0 | java,python,ruby-on-rails,ruby | My rule of thumb for personal (which I think this is) projects is to either use the language you're most familiar with OR the one you're most interested in learning. Java, python and ruby are all great languages and MVC frameworks such as RoR exist for all of them.
That being said if you're interested in trying C# (wh... | 0 | 0 | 0 | 0 | 2011-11-07T04:14:00.000 | 3 | 0.132549 | false | 8,032,655 | 0 | 0 | 1 | 1 | I'm building a Rails web app but I would like to start building a desktop version but I don't know what language or framework to use.
I've been thinking on developing it with Ruby too or Python or Java. I'm open to new languages as long as the framework is awesome and enjoyable to work with.
What LANGUAGE and FRAMEWOR... |
On what side is 'HTTP Error 403: request disallowed by robots.txt' generated? | 8,035,293 | 0 | 3 | 997 | 0 | python,mechanize | The server blocks your activity with such response.
Is it your site? If not, follow the rules:
Obey robots.txt file
Put a delay between request, even if robots.txt doesn't require it.
Provide some contact information (e-mail or page URL) in the User-Agent header.
Otherwise be ready site owner blocking you based on Us... | 0 | 0 | 0 | 1 | 2011-11-07T09:37:00.000 | 2 | 0 | false | 8,034,767 | 0 | 0 | 1 | 1 | I am trying out Mechanize to make some routine simpler. I have managed to bypass that error by using br.set_handle_robots(False). There are talks about how ethical it's to use it. What I wonder about is where this error is generated, on my side, or on server side? I mean does Mechanize throw the exception when it sees ... |
Resource usage of google Go vs Python and Java on Appengine | 8,038,951 | 23 | 53 | 12,094 | 0 | java,python,google-app-engine,go | The cost of instances is only part of the cost of your app. I only use the Java runtime right now, so I don't know how much more or less efficient things would be with Python or Go, but I don't imagine it will be orders of magnitude different. I do know that instances are not the only cost you need to consider. Depe... | 0 | 1 | 0 | 0 | 2011-11-07T14:26:00.000 | 5 | 1 | false | 8,037,783 | 0 | 0 | 1 | 4 | Will google Go use less resources than Python and Java on Appengine? Are the instance startup times for go faster than Java's and Python's startup times?
Is the go program uploaded as binaries or source code and if it is uploaded as source code is it then compiled once or at each instance startup?
In other words: Will... |
Resource usage of google Go vs Python and Java on Appengine | 10,370,469 | 17 | 53 | 12,094 | 0 | java,python,google-app-engine,go | The question is mostly irrelevant.
The minimum memory footprint for a Go app is less than a Python app which is less than a Java app. They all cost the same per-instance, so unless your application performs better with extra heap space, this issue is irrelevant.
Go startup time is less than Python startup time which i... | 0 | 1 | 0 | 0 | 2011-11-07T14:26:00.000 | 5 | 1 | false | 8,037,783 | 0 | 0 | 1 | 4 | Will google Go use less resources than Python and Java on Appengine? Are the instance startup times for go faster than Java's and Python's startup times?
Is the go program uploaded as binaries or source code and if it is uploaded as source code is it then compiled once or at each instance startup?
In other words: Will... |
Resource usage of google Go vs Python and Java on Appengine | 10,283,180 | 47 | 53 | 12,094 | 0 | java,python,google-app-engine,go | Will google Go use less resources than Python and Java on Appengine?
Are the instance startup times for go faster than Java's and Python's
startup times?
Yes, Go instances have a lower memory than Python and Java (< 10 MB).
Yes, Go instances start faster than Java and Python equivalent because the runtime only nee... | 0 | 1 | 0 | 0 | 2011-11-07T14:26:00.000 | 5 | 1 | false | 8,037,783 | 0 | 0 | 1 | 4 | Will google Go use less resources than Python and Java on Appengine? Are the instance startup times for go faster than Java's and Python's startup times?
Is the go program uploaded as binaries or source code and if it is uploaded as source code is it then compiled once or at each instance startup?
In other words: Will... |
Resource usage of google Go vs Python and Java on Appengine | 8,044,755 | 0 | 53 | 12,094 | 0 | java,python,google-app-engine,go | I haven't used Go, but I would strongly suspect it would load and execute instances much faster, and use less memory purely because it is compiled. Anecdotally from the group, I believe that Python is more responsive than Java, at least in instance startup time.
Instance load/startup times are important because when y... | 0 | 1 | 0 | 0 | 2011-11-07T14:26:00.000 | 5 | 0 | false | 8,037,783 | 0 | 0 | 1 | 4 | Will google Go use less resources than Python and Java on Appengine? Are the instance startup times for go faster than Java's and Python's startup times?
Is the go program uploaded as binaries or source code and if it is uploaded as source code is it then compiled once or at each instance startup?
In other words: Will... |
Getting login credentials when using webapp | 8,060,118 | 1 | 2 | 198 | 0 | python,google-app-engine,web-applications,authentication,credentials | Are you using the built in authentication, or trying to roll your own? If the former, you can't access a user's credentials - just get the information you need from the User object. If the latter, you can handle the credentials any way you wish - you're rolling your own, and App Engine has no magic way to detect that w... | 0 | 0 | 1 | 0 | 2011-11-07T16:24:00.000 | 2 | 1.2 | true | 8,039,374 | 0 | 0 | 1 | 2 | What is an accepted way to get authentication credentials (login and password) when using webapp?
I'm pretty sure that they get submitted and/or interpreted differently than the rest of the information coming through the request and I'm afraid I can't remember where exactly I'm supposed to get them from.
FYI: The reque... |
Getting login credentials when using webapp | 8,039,432 | 2 | 2 | 198 | 0 | python,google-app-engine,web-applications,authentication,credentials | If you've got HTTPS enabled, sending them along with the request (usually a POST) is acceptable, and the "standard" method of logging in.
If you want to get clever, you could hash the password using SHA1 on the client end so that even an sslstrip won't reveal the password in plaintext (though it won't prevent replay at... | 0 | 0 | 1 | 0 | 2011-11-07T16:24:00.000 | 2 | 0.197375 | false | 8,039,374 | 0 | 0 | 1 | 2 | What is an accepted way to get authentication credentials (login and password) when using webapp?
I'm pretty sure that they get submitted and/or interpreted differently than the rest of the information coming through the request and I'm afraid I can't remember where exactly I'm supposed to get them from.
FYI: The reque... |
How to develop a simple web application with server-side Python | 8,077,102 | 0 | 0 | 7,276 | 0 | python,scripting | Plain CGI is a good starting point to learn about server side scripting, but it is an outdated technology and gets difficult to maintain after certain level of complexity. I would think it is no longer used in industrial-grade web server anymore. Plus you have to setup a web server and then install some module to inter... | 0 | 0 | 0 | 0 | 2011-11-07T19:30:00.000 | 5 | 0 | false | 8,041,501 | 0 | 0 | 1 | 1 | I am wondering how to go about implementing a web application with Python.
For example, the html pages would link to python code that would give it increased functionality and allow it to write to a database.
Kind of like how Reddit does it. |
Alternatives to php for in-line web programming? | 8,045,724 | 3 | 12 | 7,993 | 0 | php,python,ruby,web-applications | I'd say given your requirement
Just relatively small amounts of dynamic content among otherwise HTML pages.
then, PHP is going to be hard to beat for getting going quickly and a minimum of learning overhead. It avoids all the CGI issues that you would otherwise have to deal with, and is in fact its own templating lan... | 0 | 0 | 0 | 1 | 2011-11-08T03:32:00.000 | 5 | 0.119427 | false | 8,045,630 | 0 | 0 | 1 | 1 | I first learned web programming with php a while back. It has some features that I find very helpful, but the overall language is not something I enjoy, just as a matter of personal preference. I am wondering what alternatives I could use to provide similar functionality using a different underlying programming languag... |
Is there a way to comment out python code in a django html file? | 8,047,122 | 8 | 4 | 3,772 | 0 | python,html,django | Django templates has {# ... #} as comments. NOTE: These comments are not multi-line. | 0 | 0 | 0 | 0 | 2011-11-08T07:17:00.000 | 4 | 1 | false | 8,047,092 | 0 | 0 | 1 | 1 | I'm curious, i have the following code {% code_goes_here %}, how do I comment it out in the html file? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.