Title
stringlengths
11
150
A_Id
int64
518
72.5M
Users Score
int64
-42
283
Q_Score
int64
0
1.39k
ViewCount
int64
17
1.71M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
14
4.78k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
0
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
55
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
469
42.4M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
1
1
Available Count
int64
1
15
Question
stringlengths
17
21k
How limiting are web frameworks
2,125,979
5
7
653
0
python,ruby-on-rails,django,rest
You can still use the full potential of the language in question, even if you also use a framework. A framework isn't a limiting factor, it's basically a tool to ease development of certain parts of your application. Django and rails, for instance, abstract away some database functionality, so you'll only have to worry...
0
0
0
0
2010-01-24T03:53:00.000
11
0.090659
false
2,125,865
0
0
1
7
This is a general question about how limiting are web development frameworks such as Django and ruby-on-rails. I am planning on building a RESTful web service which will have a purely JSON/XML interface, no GUI. The service will rely on a database however for a few of the more important operations there is no clear way...
How limiting are web frameworks
2,126,030
1
7
653
0
python,ruby-on-rails,django,rest
I have used Ruby/Rails for years now, and unlike just about every other language/framework I have used (across nearly 15 years of Java, PHP, ColdFusion, ASP, etc etc) it gets out of the way when you need it to. It sounds like you might benefit from a "lighter-weight" framework like Sinatra, but with the upcoming Rails ...
0
0
0
0
2010-01-24T03:53:00.000
11
0.01818
false
2,125,865
0
0
1
7
This is a general question about how limiting are web development frameworks such as Django and ruby-on-rails. I am planning on building a RESTful web service which will have a purely JSON/XML interface, no GUI. The service will rely on a database however for a few of the more important operations there is no clear way...
How limiting are web frameworks
2,126,628
2
7
653
0
python,ruby-on-rails,django,rest
In average, the more complete and helpful the web framework is, the more limiting it is when you try to do things another way than the way the web framework thinks is The Right Way. Some web frameworks try to be very helpful and still not restrictive, and some do that better than others. And the general recommendation ...
0
0
0
0
2010-01-24T03:53:00.000
11
0.036348
false
2,125,865
0
0
1
7
This is a general question about how limiting are web development frameworks such as Django and ruby-on-rails. I am planning on building a RESTful web service which will have a purely JSON/XML interface, no GUI. The service will rely on a database however for a few of the more important operations there is no clear way...
How limiting are web frameworks
2,129,721
1
7
653
0
python,ruby-on-rails,django,rest
If you know you're not going to use an ORM, or create a user interface, then you've just eliminated about 90% of what you'd use a web application framework for in the first place. If you look at the feature set of Django, for instance: what parts of that would you use to implement a web service that you couldn't get ...
0
0
0
0
2010-01-24T03:53:00.000
11
0.01818
false
2,125,865
0
0
1
7
This is a general question about how limiting are web development frameworks such as Django and ruby-on-rails. I am planning on building a RESTful web service which will have a purely JSON/XML interface, no GUI. The service will rely on a database however for a few of the more important operations there is no clear way...
Using Django's Model API without having to *include* the full Django stack
2,127,512
1
0
191
1
python,django,deployment,size,sqlalchemy
The Django ORM is usable on its own - you can use "settings.configure()" to set up the database settings. That said, you'll have to do the stripping down and repackaging yourself, and you'll have to experiment with how much you can actually strip away. I'm sure you can ditch contrib/, forms/, template/, and probably se...
0
0
0
0
2010-01-24T08:27:00.000
2
0.099668
false
2,126,433
0
0
1
2
Currently an application of mine is using SQLAlchemy, but I have been considering the possibility of using Django model API. Django 1.1.1 is about 3.6 megabytes in size, whereas SQLAlchemy is about 400 kilobytes (as reported by PyPM - which is essentially the size of the files installed by python setup.py install). I ...
Using Django's Model API without having to *include* the full Django stack
2,130,014
1
0
191
1
python,django,deployment,size,sqlalchemy
You may be able to get a good idea of what is safe to strip out by checking which files don't have their access time updated when you run your application.
0
0
0
0
2010-01-24T08:27:00.000
2
0.099668
false
2,126,433
0
0
1
2
Currently an application of mine is using SQLAlchemy, but I have been considering the possibility of using Django model API. Django 1.1.1 is about 3.6 megabytes in size, whereas SQLAlchemy is about 400 kilobytes (as reported by PyPM - which is essentially the size of the files installed by python setup.py install). I ...
web2py - my application doesn' login
2,391,381
1
2
199
0
python,web2py
I have seen something like this happen with cookie based load balancing. The cookie was being set too late, so the user would switch frontends sometimes when they logged it. If you have a load balancer over 2 frontends, you might see this happen 50% of the time. Check the logs and make sure the hits are all going to th...
0
0
0
0
2010-01-24T11:24:00.000
1
0.197375
false
2,126,824
0
0
1
1
i have a web2py application and am using default/user/login to login to my application but sometimes when i login the application redirect to the login page agin and sometimes the system logged fine and there is no problem i dont know why ? so please can anyone tell me ? Thanks in advance
Can you really scale up with Django...given that you can only use one database? (In the models.py and settings.py)
2,127,162
3
5
1,742
0
python,django,web-services,scalability
Read scaling to millions of users is not a database problem, but is fixed with load balancing and caching, etc, see S. Lott above. Write scaling can indeed be a database problem. "Sharding" and having multiple databases can be one solution, but that's hard with SQL while still retaining the relationality of the databas...
0
0
0
0
2010-01-24T12:46:00.000
6
0.099668
false
2,127,067
0
0
1
2
Django only allows you to use one database in settings.py. Does that prevent you from scaling up? (millions of users)
Can you really scale up with Django...given that you can only use one database? (In the models.py and settings.py)
2,127,160
0
5
1,742
0
python,django,web-services,scalability
If you find out that the DB is the bottlenck of your app, and their is now way around it (like using caching) then you should scale your DB as well. Django has nothing to do with this
0
0
0
0
2010-01-24T12:46:00.000
6
0
false
2,127,067
0
0
1
2
Django only allows you to use one database in settings.py. Does that prevent you from scaling up? (millions of users)
TextMate and Django Integration - Supporting {% %} markup
2,133,642
2
3
796
0
python,django,textmate
It's possible - the Rails bundle does this for ERB (<% automatically gets closing %> tags). So that's a place you could go look.
0
0
0
0
2010-01-24T17:17:00.000
2
0.197375
false
2,127,956
0
0
1
2
I have installed a TextMate bundle that I believe enables the ability for automatic closing of the "{{" markup (so that it will automatically close the markup with "}}"), but this does not seem to be possible with the other markup that uses "{%" and "%}". So, I was wondering if anyone out there knows how to get TextMat...
TextMate and Django Integration - Supporting {% %} markup
2,128,058
1
3
796
0
python,django,textmate
I don't think that's possible, but the Django bundle for TextMate does allow you to insert the opening and closing tags in one go, placing the cursor in the middle, with ctrl-% (ctrl-shift-5). Click the Bundles -> Python Django Templates menu to see all the shortcuts that are available.
0
0
0
0
2010-01-24T17:17:00.000
2
0.099668
false
2,127,956
0
0
1
2
I have installed a TextMate bundle that I believe enables the ability for automatic closing of the "{{" markup (so that it will automatically close the markup with "}}"), but this does not seem to be possible with the other markup that uses "{%" and "%}". So, I was wondering if anyone out there knows how to get TextMat...
Django-registration, force unique e-mail
37,694,543
1
16
8,343
0
python,django
For unique e-mail addresses in django-registration-redux 1.4. In url.py add following from registration.forms import RegistrationFormUniqueEmail from registration.backends.default.views import RegistrationView urlpatterns = [ url(r'^accounts/register/$',RegistrationView.as_view(form_class=RegistrationFormUniqueEmail...
0
0
0
0
2010-01-25T10:16:00.000
7
0.028564
false
2,131,533
0
0
1
1
Can I force users to make unique e-mail addresses in django-registration?
Which technology is preferable to build a web based GUI Client?
2,140,012
0
5
2,943
0
python,django,gwt,extjs,webclient
How about Pylons + SQLAlchemy + ExtJS? We use it and it works great!
0
0
1
0
2010-01-26T10:51:00.000
5
0
false
2,138,868
0
0
1
2
I've well developed Python Server having workflows, views, object - ORM/OSV, etc... Server/Client communication based on socket protocol, can be done by any of service 1. XMLRPC Service 2. Socket Service now I want to develop a Fully Ajax based GUI web Client.. I've web/socket services to communicate with server. wh...
Which technology is preferable to build a web based GUI Client?
2,138,949
1
5
2,943
0
python,django,gwt,extjs,webclient
I'm not sure I understood exactly on the server side, but i'm a big fan of Flex as a way to develop proper software for the browser, rather than mess of trying to make HTML do things it was never made for. Partly an idealistic reasoning, but I also am still not impressed by the 'feel' of JS-based GUIs. Flex has good se...
0
0
1
0
2010-01-26T10:51:00.000
5
0.039979
false
2,138,868
0
0
1
2
I've well developed Python Server having workflows, views, object - ORM/OSV, etc... Server/Client communication based on socket protocol, can be done by any of service 1. XMLRPC Service 2. Socket Service now I want to develop a Fully Ajax based GUI web Client.. I've web/socket services to communicate with server. wh...
PyFacebook Infinite Session
2,140,233
0
2
819
0
python,facebook,pyfacebook
I've never used PyFacebook. Or tried to resume sessions in this manner. But I'd imagine just storing session_key and uid is not enough. There are other params too, and a signature param that's calculated based on all the fb_* params. So you might need to store all of them. But even so, they might only work for 20-30 mi...
0
0
0
1
2010-01-26T14:53:00.000
3
0
false
2,140,142
0
0
1
2
I am trying to set a cron task to read updates for a Facebook application. I have prompted the user to grant Offline Access permissions and i have store the session_key in the db. I am crearing a new Facebook object and besides api and secret key I also use the session_key (previously stored in db) and the fb uid. When...
PyFacebook Infinite Session
11,015,676
1
2
819
0
python,facebook,pyfacebook
I faced the same problem where the error displayed was: "facebook.FacebookError: Error 104: Incorrect signature" Just reset your APP Secret_key and make corresponding change in the code and that sgould fix the problem. Cheers!
0
0
0
1
2010-01-26T14:53:00.000
3
0.066568
false
2,140,142
0
0
1
2
I am trying to set a cron task to read updates for a Facebook application. I have prompted the user to grant Offline Access permissions and i have store the session_key in the db. I am crearing a new Facebook object and besides api and secret key I also use the session_key (previously stored in db) and the fb uid. When...
IronPython and Targetting to MS Framework 1.1
2,140,900
3
1
58
0
ironpython,.net-1.1
IronPython since version 1.0 is only compatible with .NET 2.0 and higher, it uses Generic and features only available since .NET 2.0.
0
0
0
0
2010-01-26T16:38:00.000
1
1.2
true
2,140,869
1
0
1
1
In IronPython Studio -> Properties -> General Tab i see a Property with Name Target Plataform and found Microsoft Framework 1.0, 1.1 and 2.0, selected 1.1 and next opened my Visual Studio 2003 -> Add Reference and for my surprise this not work. Not compatibility. Why? What i do wrong?
Fastest Way to Update a bunch of records in queryset in Django
4,230,081
0
7
1,711
1
python,database,django,django-queryset
Actually, that didn't work out for me. The following did: Entry.objects.all().update(value=(F('value')==False))
0
0
0
0
2010-01-26T18:50:00.000
3
0
false
2,141,769
0
0
1
1
I have a queryset with a few million records. I need to update a Boolean Value, fundamentally toggle it, so that in the database table the values are reset. What's the fastest way to do that? I tried traversing the queryset and updating and saving each record, that obviously takes ages? We need to do this very fast, an...
How do I detect when a user has been idle for a certain time and destroy their session in PHP?
2,145,413
1
1
2,505
0
php,session,python-idle
I assume you mean 'idle' time. There is no need to calculate that, but you have to store the last (authenticated) access made by that user and reset the counter. Typically, one would should issue an authentication cookie with a certain timestamp. Upon authentication of the cookie, you compare the current time with the ...
0
0
0
1
2010-01-27T08:23:00.000
4
0.049958
false
2,145,365
0
0
1
4
I would like to have my PHP website destroy a users session if they have been idle for 5 minutes. If this does happen, I'd like to present the user with a message stating why they were logged out and redirect them to the login page. What is the best way to handle this? I am running on php and myadmin. Thanks Avinash
How do I detect when a user has been idle for a certain time and destroy their session in PHP?
2,145,866
1
1
2,505
0
php,session,python-idle
Can you not just use PHP's built-in session functions to set session expiry time to 5 mins. and re-direct if a session no longer exists?
0
0
0
1
2010-01-27T08:23:00.000
4
0.049958
false
2,145,365
0
0
1
4
I would like to have my PHP website destroy a users session if they have been idle for 5 minutes. If this does happen, I'd like to present the user with a message stating why they were logged out and redirect them to the login page. What is the best way to handle this? I am running on php and myadmin. Thanks Avinash
How do I detect when a user has been idle for a certain time and destroy their session in PHP?
2,145,390
7
1
2,505
0
php,session,python-idle
Every time you load a page, store a timestamp in a session variable. When the user goes to a page, check to see if $SESSION['lastActivity'] < time() - <your idle time>. If true, then redirect to a 'your session has expired' page or similar. If not, continue loading the page.
0
0
0
1
2010-01-27T08:23:00.000
4
1.2
true
2,145,365
0
0
1
4
I would like to have my PHP website destroy a users session if they have been idle for 5 minutes. If this does happen, I'd like to present the user with a message stating why they were logged out and redirect them to the login page. What is the best way to handle this? I am running on php and myadmin. Thanks Avinash
How do I detect when a user has been idle for a certain time and destroy their session in PHP?
2,145,652
0
1
2,505
0
php,session,python-idle
Create a javascript function that has a x minute timeout that pops up and redirects. Also on the server make sure their session expires so that in the case of Javascript not being available, they cannot continue actions after their idle time has passed.
0
0
0
1
2010-01-27T08:23:00.000
4
0
false
2,145,365
0
0
1
4
I would like to have my PHP website destroy a users session if they have been idle for 5 minutes. If this does happen, I'd like to present the user with a message stating why they were logged out and redirect them to the login page. What is the best way to handle this? I am running on php and myadmin. Thanks Avinash
scrape html generated by javascript with python
2,148,595
4
18
17,188
0
javascript,python,browser,screen-scraping
I have had to do this before (in .NET) and you are basically going to have to host a browser, get it to click the button, and then interrogate the DOM (document object model) of the browser to get at the generated HTML. This is definitely one of the downsides to web apps moving towards an Ajax/Javascript approach to ge...
0
0
1
0
2010-01-27T16:20:00.000
5
0.158649
false
2,148,493
0
0
1
1
I need to scrape a site with python. I obtain the source html code with the urlib module, but I need to scrape also some html code that is generated by a javascript function (which is included in the html source). What this functions does "in" the site is that when you press a button it outputs some html code. How can ...
Is PHP the only choice re: massive and rapid uptake of a re-deployable, extensible web application?
2,150,982
3
3
181
0
php,python,wordpress,deployment,hosting
As far as points #1 and #2 go, you are probably right. No other platform is so widely, easily and cheaply available in terms of hosting companies and packages like the LAMP stack. Plus, most incompatibilities that can occur when deploying an application to a completely unknown web space are well documented, their numbe...
0
0
0
1
2010-01-27T22:55:00.000
1
1.2
true
2,150,947
0
0
1
1
My own answer to this question is YES, but I'd like to hear from others. Put another way the question could be: Would the success of 1-click-install WordPress (not WordPress.com, which is SaaS) be possible if it weren't written in PHP, all other things being equal? The critical associated requirements I believe suppor...
Can I get my instance of mechanize.Browser to stay on the same page after calling b.form.submit()?
2,167,177
7
3
1,070
0
python,screen-scraping,mechanize
The answer to my immediate question in the headline is yes, with mechanize.Browser.open_novisit(). It works just like open(), but it doesn't change the state of the Browser instance -- that is, it will retrieve the page, and your Browser object will stay where it was.
0
0
1
0
2010-01-28T03:24:00.000
1
1.2
true
2,152,098
0
0
1
1
In Python's mechanize.Browser module, when you submit a form the browser instance goes to that page. For this one request, I don't want that; I want it just to stay on the page it's currently on and give me the response in another object (for looping purposes). Anyone know a quick to do this? EDIT: Hmm, so I have this ...
Django Haystack exact filtering
18,338,048
0
5
2,527
0
python,django,xapian,django-haystack
For solr backend I need to use _exact (just one underline instead of two).
0
0
0
0
2010-01-28T17:35:00.000
5
0
false
2,156,559
0
0
1
3
I have a haystack search which has the following SearchIndex: class GrantIndex(indexes.SearchIndex): """ This provides the search index for the Grant application. """ text = indexes.CharField(document=True, use_template=True) year = indexes.IntegerField(model_attr='year__year') date = indexes.D...
Django Haystack exact filtering
2,990,433
3
5
2,527
0
python,django,xapian,django-haystack
You've problably solved the problem already, but I just stumbled over the same problem with the Whoosh backend. Maybe the Xapian and Whoosh backends behave the same? Seems Whoosh is stemming all CharFields by default, and searching inside them with some kind of contains-query. Switching to a custom backend, without ste...
0
0
0
0
2010-01-28T17:35:00.000
5
0.119427
false
2,156,559
0
0
1
3
I have a haystack search which has the following SearchIndex: class GrantIndex(indexes.SearchIndex): """ This provides the search index for the Grant application. """ text = indexes.CharField(document=True, use_template=True) year = indexes.IntegerField(model_attr='year__year') date = indexes.D...
Django Haystack exact filtering
8,370,572
0
5
2,527
0
python,django,xapian,django-haystack
use "prepare_data" for program field and get rid of health\blabla things
0
0
0
0
2010-01-28T17:35:00.000
5
0
false
2,156,559
0
0
1
3
I have a haystack search which has the following SearchIndex: class GrantIndex(indexes.SearchIndex): """ This provides the search index for the Grant application. """ text = indexes.CharField(document=True, use_template=True) year = indexes.IntegerField(model_attr='year__year') date = indexes.D...
which is a minimalistic python wsgi development server with support for code reload?
2,270,464
1
11
4,339
0
python,wsgi
Also, you missed web.py, which is both small and supports code reload.
0
0
0
0
2010-01-29T12:13:00.000
7
0.028564
false
2,161,778
0
0
1
4
From what I can tell wsgiref - no code reload CherryPy - more than just the server mod_wsgi - all the apache overhead paste.httpserver - paste is a huge package with other stuff in it flup - same as paste, too much stuff. Spawning - never used it but seems lightweight enough. Tornado - not really wsgi + full "framewor...
which is a minimalistic python wsgi development server with support for code reload?
2,161,869
1
11
4,339
0
python,wsgi
So far I've been using CherryPy, and compared to Django (which, while not in your list, is the only other dev server I used) I like it heaps more. It does what is says: it is only there when you need it, and gets out of the way for the rest of the time. Using Django seemed like I needed to subscribe to the Django way o...
0
0
0
0
2010-01-29T12:13:00.000
7
0.028564
false
2,161,778
0
0
1
4
From what I can tell wsgiref - no code reload CherryPy - more than just the server mod_wsgi - all the apache overhead paste.httpserver - paste is a huge package with other stuff in it flup - same as paste, too much stuff. Spawning - never used it but seems lightweight enough. Tornado - not really wsgi + full "framewor...
which is a minimalistic python wsgi development server with support for code reload?
2,161,981
1
11
4,339
0
python,wsgi
I'd recommend paste or CherryPy. They're the easiest to get up and running with.
0
0
0
0
2010-01-29T12:13:00.000
7
0.028564
false
2,161,778
0
0
1
4
From what I can tell wsgiref - no code reload CherryPy - more than just the server mod_wsgi - all the apache overhead paste.httpserver - paste is a huge package with other stuff in it flup - same as paste, too much stuff. Spawning - never used it but seems lightweight enough. Tornado - not really wsgi + full "framewor...
which is a minimalistic python wsgi development server with support for code reload?
2,270,443
0
11
4,339
0
python,wsgi
You can use paste.reloader with any wsgi-server, aside of other paste modules. # run paste reloader import paste.reloader as reloader reloader.install() # run wsgiref server from wsgiref import simple_server simple_server.make_server('', 8080, main_wsgi_app).serve_forever() Is that minimalistic enough?
0
0
0
0
2010-01-29T12:13:00.000
7
0
false
2,161,778
0
0
1
4
From what I can tell wsgiref - no code reload CherryPy - more than just the server mod_wsgi - all the apache overhead paste.httpserver - paste is a huge package with other stuff in it flup - same as paste, too much stuff. Spawning - never used it but seems lightweight enough. Tornado - not really wsgi + full "framewor...
Can access AppEngine SDK sites via local ip-address when localhost works just fine and a MacOSX
29,235,036
0
10
6,718
0
python,google-app-engine,facebook,macos
In Android Studio with Google App Engine plugin. Just add httpAddress = '0.0.0.0' to app cfg in build.grade file.
0
1
0
0
2010-01-30T15:47:00.000
5
0
false
2,168,409
0
0
1
1
Can access AppEngine SDK sites via local ip-address when localhost works just fine and a MacOSX using the GoogleAppEngineLauncher. I'm trying to setup facebook development site (using a dyndns.org hostname pointing at my firewall which redirects the call to my mac book). It seems like GoogleAppEngineLauncher defaults t...
How to check if a user is logged on in mediawiki in a different app?
2,456,365
0
4
4,553
0
python,authentication,mediawiki
All you need to do is essentially forward the session, cookies and all, to the API as if it's the user querying. How would one go about doing that? I can access the API directly and see my login info, but if I access it via PHP, it shows me as not being logged in (anonymous user id "0"). How do I forward the session, ...
0
0
0
1
2010-01-31T08:01:00.000
5
0
false
2,170,990
0
0
1
1
Here is the situation: I have a Mediawiki installation, and a few additional server-side scripts that require more resources and were already written in a different language (python). The python code will be very loosely coupled with the Mediawiki code (only called by clicking on a link here or there) What I would like...
How to implement a client admin in Django?
2,171,917
3
4
537
0
python,django,django-admin
+1 for custom app, hacking admin can take more time than just putting together your own admin from generic views.
0
0
0
0
2010-01-31T13:32:00.000
2
0.291313
false
2,171,820
0
0
1
1
I'm building a simple app, a sort of project/tasks manager where I can have several projects and several tasks that are assigned to one project. I enabled Django admin for all this sort of tasks and it's working like a charm. Also, I have some users that have projects assigned to them. So what I want now is to enable a...
Problem deploying Django-Mingus with Flup and Cherokee. Strange admin behaviour
2,236,822
0
1
298
0
python,django,cherokee,scgi
I dropped all tables from the database, upgraded to last version of django-mingus after having deleted some dependencies to get them clean installed and I launched the scgi process using a shell script that activate the virtual environment before. Now everything seems to be stable.
0
0
0
0
2010-02-01T08:13:00.000
1
0
false
2,175,377
0
0
1
1
I have a django-mingus blog running perfectly fine with the integrated development web server of django. It's installed in a virtualenv. Once deployed using the django app wizard of cherokee 0.99.42 the admin pannel is displaying a strange behaviour. Sometimes all apps are displayed in the admin pannel sometime only a ...
Using Jython with Django?
2,191,492
2
5
462
0
python,jython
I use Jython in testing and rapid-development. From my point of view it is stable.
0
0
0
0
2010-02-01T19:19:00.000
3
0.132549
false
2,179,395
1
0
1
2
I am planning to use Jython with Django. I want to know how stable the Jython project is, how easy to use it is, and how large its developer community is.
Using Jython with Django?
2,181,008
3
5
462
0
python,jython
I have not used Django with Jython, so I can't speak to that specific issue, but I've used Jython for other things and I've found it quite stable of late, and just as easy as plain Python. I believe the "core committers" in Jython are substantially fewer than in C-Python (maybe 1/3 the number or less), if that's what ...
0
0
0
0
2010-02-01T19:19:00.000
3
0.197375
false
2,179,395
1
0
1
2
I am planning to use Jython with Django. I want to know how stable the Jython project is, how easy to use it is, and how large its developer community is.
Django templates condition check
2,182,519
0
1
3,034
0
python,django
Not as shown. Use the ifequal and with template tags instead.
0
0
0
0
2010-02-02T07:42:00.000
2
0
false
2,182,512
0
0
1
1
All, Can t we do the following in templates {% if subject.id == selected_id %} and also cannot we assign variable like {{selected="selected"}} Thank........
Pylons and Flex 3
2,258,476
0
0
251
0
python,apache-flex,pylons,twisted
I'm working on webapp which has client-side UI coded in Flex 3 and backend is Pylons app. Our client communicates with backend using HTTP GET and POST requests, POST request bodies and all response bodies carry data in JSON format. Works well, just few gotchas: Flex apps cannot do PUT and DELETE requests. We work arou...
0
1
0
0
2010-02-02T15:45:00.000
1
0
false
2,185,329
0
0
1
1
Has anyone used Python/Pylons as the server backend for a Flex 3 application? Does anyone have any thoughts on how well this would work? I read Bruce Eckel's article about tying Flex 3 to Twisted, and I've done Twisted programming, but for just a web service I think Pylons is simpler to use. Thanks in advance, Doug
how to check if request is ajax in turbogears
2,187,227
1
0
1,369
0
python,ajax,mako,turbogears2
jQuery, YUI, Prototype, Dojo, and MooTools all set the header X-Requested-With: XMLHttpRequest. You should be able to check for that header.
0
0
0
0
2010-02-02T19:45:00.000
1
1.2
true
2,187,115
0
0
1
1
How do I go about checking if a request is an ajax request in a controller method in Turbogears? Further, is it possible to return a 'partial' much like in rails or symfony if the request is an ajax request. I know about the json decorator but I need a way to return a partial of a mako template (because I need to forma...
How can I render a Django template that has UTF8 characters in it?
2,187,606
1
2
4,616
0
python,django,django-templates
0x94 is not part of î in UTF-8. The UTF-8 encoding for î is 0xc3 0xae.
0
0
0
0
2010-02-02T20:47:00.000
2
0.099668
false
2,187,561
0
0
1
2
I'm trying to send a django email with UTF-8 characters in the template, specifically: S'il vous plaît I get the error: UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in position 147: unexpected code byte When trying to encode the special "î" character (that is the character at that position.) Here is my c...
How can I render a Django template that has UTF8 characters in it?
2,187,613
6
2
4,616
0
python,django,django-templates
The editor you're using has saved the file using Mac Roman encoding. Open the template, re-save it as UTF-8, and it should work fine.
0
0
0
0
2010-02-02T20:47:00.000
2
1.2
true
2,187,561
0
0
1
2
I'm trying to send a django email with UTF-8 characters in the template, specifically: S'il vous plaît I get the error: UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in position 147: unexpected code byte When trying to encode the special "î" character (that is the character at that position.) Here is my c...
Which is web.py killer app?
2,205,554
0
4
3,386
0
python,web.py
A killer app isn't necessarily defined by whether it makes the framework/language famous. The Killer 'App' is an application that disrupts its industry in such a way that the rules or status quo of that industry is changed forever. E.g. the iPhone. It is 'killer' because it 'kills' off market leaders in its industry. ...
0
0
0
0
2010-02-02T20:53:00.000
3
0
false
2,187,610
0
0
1
1
A killer app is an app that make a library or framework famous. I think web.py is quite famous, but I don't know any big, widely used app written in web.py. Could you point out any? I've head that the first version of youtube.com was coded using web.py but I'd like you to mention an open source one so I can see its cod...
django csv import threading
2,196,168
2
0
570
0
python,django,multithreading,csv
Django is Python, so yeah you can use threads, processing etc. Look at python docs on this matter. But, spawning threads in web environment might be not be such a good idea, try searching here for "django asynchronous" - you'll get many ideas of how to this without threading.
0
0
0
0
2010-02-03T06:19:00.000
1
1.2
true
2,190,075
1
0
1
1
Is it possible to use threading when importing data from csv files to django.
Screen scraping with Python
2,190,517
-2
14
10,580
0
python,screen-scraping,htmlunit,pycurl
I have not found anything for this. I use a combination of beautifulsoup and custom routines...
0
0
1
0
2010-02-03T08:11:00.000
7
-0.057081
false
2,190,502
0
0
1
1
Does Python have screen scraping libraries that offer JavaScript support? I've been using pycurl for simple HTML requests, and Java's HtmlUnit for more complicated requests requiring JavaScript support. Ideally I would like to be able to do everything from Python, but I haven't come across any libraries that would allo...
Recommended Django setup?
2,193,943
2
1
703
0
python,django,apache
Ubuntu is far and away a better platform nowadays. I'm a refugee from RHEL and Fedora. Get Ubuntu 9.10, and if you'd like, spawn it on Amazon ec2 for total flexibility (i.e. launch it in about 90 seconds, play around, do what you want, delete it, and only pay a buck). Otherwise, just use Ubuntu on the desktop. Ubunt...
0
0
0
0
2010-02-03T14:40:00.000
4
1.2
true
2,192,685
0
0
1
2
I am about to embark a major django project. If I install the latest stable release... is the a suggested setup ie. this OS, this RDBMS, this version of python etc?? I'm normally a CentOS man but their repos don't play too well with the django requirements...
Recommended Django setup?
2,192,712
1
1
703
0
python,django,apache
We use Fedora 11, MySQL, Apache, mod_wsgi, Python 2.6. Works great.
0
0
0
0
2010-02-03T14:40:00.000
4
0.049958
false
2,192,685
0
0
1
2
I am about to embark a major django project. If I install the latest stable release... is the a suggested setup ie. this OS, this RDBMS, this version of python etc?? I'm normally a CentOS man but their repos don't play too well with the django requirements...
Linux development/minimal smtp and pop3 server
2,195,237
2
1
839
0
python,ruby-on-rails,linux,email
Why does it need to be a simple mail server? Can't you just use something like postfix which is very easy for simple configurations
0
0
0
1
2010-02-03T20:31:00.000
1
1.2
true
2,195,203
0
0
1
1
I use python based as well as rails applications on ubuntu linux. We have functionalities like register, forgot password, reset password, email alerts etc features based on emails. Since now a days, we go on offline development, we want to run a local smtp & pop3 server to send and receive emails. Emails shall be send ...
DB Permissions with Django unit testing
2,195,979
2
2
1,622
0
python,database,django,unit-testing
Don't force Django to do something unnatural. Allow it to create the test schema. It's a good thing. From your existing schema, do an unload to create .JSON dump files of the data. These files are your "fixtures". These fixtures are used by Django to populate the test database. This is The Greatest Testing Tool Ev...
0
0
0
0
2010-02-03T21:58:00.000
5
1.2
true
2,195,791
0
0
1
2
Disclaimer: I'm very new to Django. I must say that so far I really like it. :) (now for the "but"...) But, there seems to be something I'm missing related to unit testing. I'm working on a new project with an Oracle backend. When you run the unit tests, it immediately gives a permissions error when trying to creat...
DB Permissions with Django unit testing
2,197,772
2
2
1,622
0
python,database,django,unit-testing
After I read David's (OP) question, I was curious about this too, but I don't see the answer I was hoping to see. So let me try to rephrase what I think at least part of what David is asking. In a production environment, I'm sure his Django models probably will not have access to create or drop tables. His DBA will p...
0
0
0
0
2010-02-03T21:58:00.000
5
0.07983
false
2,195,791
0
0
1
2
Disclaimer: I'm very new to Django. I must say that so far I really like it. :) (now for the "but"...) But, there seems to be something I'm missing related to unit testing. I'm working on a new project with an Oracle backend. When you run the unit tests, it immediately gives a permissions error when trying to creat...
no procedural code and non mvc in ruby and python?
2,198,673
3
0
116
0
python,ruby,model-view-controller,oop
They don't require OOP, but they do require procedural code, as they are imperative languages, and not functional ones. You can use some functional techniques. There are plenty of frameworks that use MVC for both languages, yes.
0
0
0
0
2010-02-04T09:35:00.000
2
0.291313
false
2,198,562
1
0
1
2
i know that these 2 languages require oop. but inside the classes, could you have procedural code? and for the mvc part, that pattern comes with their frameworks right? nothing to do with the actual language itself?
no procedural code and non mvc in ruby and python?
2,198,616
4
0
116
0
python,ruby,model-view-controller,oop
Neither of these languages require OOP, especially Python. In Python you can write as many ordinary functions as you want, and there are plenty of modules which don't define any classes. In Ruby you can do the same thing, except instead of functions you have methods on a module. You are correct that MVC is related to...
0
0
0
0
2010-02-04T09:35:00.000
2
1.2
true
2,198,562
1
0
1
2
i know that these 2 languages require oop. but inside the classes, could you have procedural code? and for the mvc part, that pattern comes with their frameworks right? nothing to do with the actual language itself?
Need a way to count entities in GAE datastore that meet a certain condition? (over 1000 entities)
4,088,516
3
4
4,016
0
python,google-app-engine,google-cloud-datastore
Results of datastore count() queries and offsets for all datastore queries are no longer capped at 1000. Since Version 1.3.6
0
1
0
0
2010-02-04T17:02:00.000
6
0.099668
false
2,201,580
0
0
1
1
I'm building an app on GAE that needs to report on events occurring. An event has a type and I also need to report by event type. For example, say there is an event A, B and C. They occur periodically at random. User logs in and creates a set of entities to which those events can be attributed. When the user comes back...
S60 camera focusing
2,203,194
0
0
202
0
python,camera,s60
This is just a guess. Are you maybe getting low-res images that are suitable for sending via MMS? I would look at the API.
0
0
0
0
2010-02-04T20:34:00.000
1
1.2
true
2,202,991
1
0
1
1
In my project I have to use mobile camera from my own program. I use python with S60 platform under NOKIA 6220 Classic. It has 5mp-camera. The problem is that photos quality are very-very low. Seems that auto-focusing doesn't work. I'd like to know maybe anyone from you made something before. I can buy new telephone if...
What's a good web framework and/or tool for a software developer?
2,204,294
0
4
335
0
php,python,ruby
django on Google App Engine gets you free(up to a point) and scalable hosting
0
0
0
1
2010-02-05T00:19:00.000
5
0
false
2,204,223
0
0
1
2
I'd like to make a website, it's not a huge project, but I'm a bit out of the web design loop. The last time I made a website was probably around 2002. I figure the web frameworks and tools have come a ways since then. It's mostly the design aspect that I'd like it to make easier. I can do the backend language in a...
What's a good web framework and/or tool for a software developer?
2,204,292
0
4
335
0
php,python,ruby
It really depends on a couple things: What are you familiar with? You indicated that you've done some web development in the past. What did you use? If you were using classic ASP, then learning ASP.NET should be less of a jump for you. What are you trying to create? If all you need are static HTML files with a tin...
0
0
0
1
2010-02-05T00:19:00.000
5
0
false
2,204,223
0
0
1
2
I'd like to make a website, it's not a huge project, but I'm a bit out of the web design loop. The last time I made a website was probably around 2002. I figure the web frameworks and tools have come a ways since then. It's mostly the design aspect that I'd like it to make easier. I can do the backend language in a...
best (python) setup for cpu / memory intensive task
2,205,899
2
3
839
0
c#,java,.net,python,memory
Since you can install all of those for free and it sounds like you already have the code implemented in both .Net and Java then I suggest you benchmark the program on all four platforms (windows/linux * java/.net). It sounds like all the heavy lifting is done in Java/C#, so I suspect the relative performance of Jytho...
0
0
0
1
2010-02-05T08:19:00.000
2
1.2
true
2,205,832
1
0
1
2
i'm doing simulation which generates thousands of result objects. Each object size is around 1mb, and all the result objects should be on memory to be queried for various ad hoc reports. And it takes 1~2 secs to make one result object. So it takes more than 5 minutes to get one simulation done even though i fully use m...
best (python) setup for cpu / memory intensive task
2,205,986
2
3
839
0
c#,java,.net,python,memory
@Dave is spot on, if you really care benchmark each combination and see. Personally I'd suggest you stick with the tool set that you are most comfortable with, be that Windows, Java, Linux, .Net or any random combination there of. Your level of productivity in maintaining and developing your software usually trumps any...
0
0
0
1
2010-02-05T08:19:00.000
2
0.197375
false
2,205,832
1
0
1
2
i'm doing simulation which generates thousands of result objects. Each object size is around 1mb, and all the result objects should be on memory to be queried for various ad hoc reports. And it takes 1~2 secs to make one result object. So it takes more than 5 minutes to get one simulation done even though i fully use m...
global variable from django to javascript
2,206,464
1
5
1,966
0
javascript,python,django
I'm not familiar with django, so this might be completely incorrect. Can you write out the variables to hidden HTML fields on the page. This will allow you to access them from JavaScript, or utilise them in form posts should you require that.
0
0
0
0
2010-02-05T09:57:00.000
3
0.066568
false
2,206,353
0
0
1
2
I would like some variables from my settings.py to be available in every javascript running across my project. What is the most elegant way of achieving this? Right now I can think of two: write a context processor and declare those globals in a base template. All templates must extend the base template. declare those...
global variable from django to javascript
2,206,532
6
5
1,966
0
javascript,python,django
I would use option 1. You should use a base template in any case, and a context processor is probably the best way of getting the variables into it.
0
0
0
0
2010-02-05T09:57:00.000
3
1.2
true
2,206,353
0
0
1
2
I would like some variables from my settings.py to be available in every javascript running across my project. What is the most elegant way of achieving this? Right now I can think of two: write a context processor and declare those globals in a base template. All templates must extend the base template. declare those...
How to write dynamic Django models?
2,207,718
0
1
580
0
python,django
One, popular, option would be to use something like tags. So you'd have the stuff that's common to all items, like an item ID, name, description, price. Then you'd have some more generic tags or described tags in another table, associated with those items. You could have a tag that represents the season, or automobi...
0
0
0
0
2010-02-05T13:44:00.000
2
0
false
2,207,562
0
0
1
1
what i want, is to receive advices to define a re-usefull Product model, for a shopping site app, nowadays I know that the store is going to commerce with "clothing", so the product model will have a "season or collections" relationship, but in the future I should use that app to commerce with X product, e.g: "cars" wh...
how do people normally deal with class variables in django?
2,213,602
1
2
680
0
python,django-models
The default primary key will already be a unique monotonic integer (even in SQLite if you don't delete any records), so you can just use that for it.
0
0
0
0
2010-02-06T15:27:00.000
3
1.2
true
2,213,595
0
0
1
1
I can't see any provision for this in the django docs, so how do people go about doing this. My specific case is this. I have a shopping cart, each cart instance has an invoice number field, however the invoice number is only generated if the cart goes to a paid status, so not all shopping cart instances will have an i...
Django: Making ForeignKey not create a back-reference
2,214,882
1
1
1,714
0
python,django
Why would you want to do this? You don't have to use it if you don't want to. In any case, the back-reference is only a code shortcut - it's exactly equivalent to Car.objects.filter(person_id=person.id).
0
0
0
0
2010-02-06T20:59:00.000
2
0.099668
false
2,214,705
0
0
1
1
I know that I can use ForeignKey's related_name argument to control what the back-reference's name will be. But is it possible to avoid creating a back-reference completely? (e.g., I have in Car a field ForeignKey(Person), and I don't want Person to have an attribute that leads backs to Car.)
Python + Komodo Edit
2,219,126
1
1
654
0
python,scapy,komodoedit
Autocomplete in Python is a hit or miss proposition. It varies widely -- some things can be analyzed by Komodo and some can't. If it won't autocomplete, it's probably because it relies on too many metaclass techniques that seem to baffle Komodo.
0
0
0
0
2010-02-07T22:30:00.000
2
0.099668
false
2,218,637
0
0
1
2
I am trying to get scapy to auto complete in komodo edit with no success, has anyone successfully done this? Thanks, Python New Comer
Python + Komodo Edit
2,220,978
1
1
654
0
python,scapy,komodoedit
If you're in virtualenv or have some tricky python paths you have to add additional import directories in: Preferences -> Languages -> Python -> Additional Python Import Directories Komodo can't understand these things out of the box. Also make sure you have following option enabled: Preferences -> Code Intelligen...
0
0
0
0
2010-02-07T22:30:00.000
2
0.099668
false
2,218,637
0
0
1
2
I am trying to get scapy to auto complete in komodo edit with no success, has anyone successfully done this? Thanks, Python New Comer
Online identity verification solution
2,223,896
0
5
747
0
python,identity,verification
You should have a look at WS-Trust. A implementation of that is Windows Identity Foundation. But I'm sure You'll find more.
0
0
1
0
2010-02-08T18:12:00.000
4
0
false
2,223,790
0
0
1
2
I am building a Python web application and we will need a user identity verification solution... something to verify the users identity during account registration. I was wondering if anyone had any experience in integrating such a solution. What vendors/products out there have worked well with you? Any tips? I don't h...
Online identity verification solution
2,224,273
1
5
747
0
python,identity,verification
There are many different ways to implement a verification system, the concept is quite simple but actually building can be a hassle, especially if you are doing it from scratch. The best way to approach this is to find a framework that handles the aspect of verification. Turbogears and Pylons are both capable of this ...
0
0
1
0
2010-02-08T18:12:00.000
4
0.049958
false
2,223,790
0
0
1
2
I am building a Python web application and we will need a user identity verification solution... something to verify the users identity during account registration. I was wondering if anyone had any experience in integrating such a solution. What vendors/products out there have worked well with you? Any tips? I don't h...
RSS Feed aggregator using Google App Engine - Python
2,253,676
1
4
3,392
0
python,rss,feed
I found a way to work around this issue, though I am not sure if this is the optimal solution. Instead of Minidom I have used cElementTree to parse the RSS feed. I process each "item" tag and its children in a seperate task and add these tasks to the task queue. This has helped me avoid the DeadlineExceededError. I ge...
0
1
0
0
2010-02-08T19:20:00.000
3
0.066568
false
2,224,219
0
0
1
1
I am trying to build a GAE app that processes an RSS feed and stores all the data from the feed into Google Datastore. I use Minidom to extract content from the RSS feed. I also tried using Feedparser and BeautifulSoup but they did not work for me. My app currently parses the feed and saves it in the Google datastore ...
Interpreting WAV Data
2,226,925
2
7
12,203
0
python,audio,pcm
The duration is simply the number of frames divided by the number of frames per second. From your data this is: 96333 / 44100 = 2.18 seconds.
0
0
0
0
2010-02-09T05:01:00.000
6
0.066568
false
2,226,853
0
0
1
2
I'm trying to write a program to display PCM data. I've been very frustrated trying to find a library with the right level of abstraction, but I've found the python wave library and have been using that. However, I'm not sure how to interpret the data. The wave.getparams function returns (2 channels, 2 bytes, 44100 Hz,...
Interpreting WAV Data
2,226,910
2
7
12,203
0
python,audio,pcm
Each sample is 16 bits and there 2 channels, so the frame takes 4 bytes
0
0
0
0
2010-02-09T05:01:00.000
6
0.066568
false
2,226,853
0
0
1
2
I'm trying to write a program to display PCM data. I've been very frustrated trying to find a library with the right level of abstraction, but I've found the python wave library and have been using that. However, I'm not sure how to interpret the data. The wave.getparams function returns (2 channels, 2 bytes, 44100 Hz,...
Does anyone know of a Urwid like environment that is cross-platform for Python 3.x?
2,239,928
0
0
322
0
python,cross-platform,python-3.x
Help port Urwid to Python 3! That is most likely more work that just running 2to3 on it, though.
0
1
0
0
2010-02-09T05:18:00.000
3
0
false
2,226,913
0
0
1
1
I would like it to run on Linux, OS X, and Windows (XP/Vista/7). Thanks for any input.
Python Django simple site
2,229,018
0
4
926
0
python,django
I have python scripts which provides output and I need to have this output on the web. What is Django for? Use either CGI script on python (probably you already have one) or WSGI application (which is a bit harder to deploy)
0
0
0
0
2010-02-09T12:30:00.000
6
0
false
2,228,966
0
0
1
3
I'm trying to create site using Django framework. I looked on tutorial on Django project site but contains much information which I don't need. I have python scripts which provides output and I need to have this output on the web. My question is how simply manage Django to have link which start the script and provides ...
Python Django simple site
2,229,044
0
4
926
0
python,django
Django is a frame work. Just use CGI scripts.
0
0
0
0
2010-02-09T12:30:00.000
6
0
false
2,228,966
0
0
1
3
I'm trying to create site using Django framework. I looked on tutorial on Django project site but contains much information which I don't need. I have python scripts which provides output and I need to have this output on the web. My question is how simply manage Django to have link which start the script and provides ...
Python Django simple site
2,228,989
0
4
926
0
python,django
That's not how Django works. Do the tutorial, you'll save a lot of time and frustration.
0
0
0
0
2010-02-09T12:30:00.000
6
0
false
2,228,966
0
0
1
3
I'm trying to create site using Django framework. I looked on tutorial on Django project site but contains much information which I don't need. I have python scripts which provides output and I need to have this output on the web. My question is how simply manage Django to have link which start the script and provides ...
Python CDROM Production
2,228,998
0
0
214
0
python,adobe,media,dvd,cd-rom
It sounds like you're not asking so much for mass-copying of CDs/DVDs (which is what I assumed from reading the title), but for a Python-based replacement for Adobe Director? I don't think anything like that presently exists. However, Python could certainly help you out with the scripting and control of various element...
0
0
0
1
2010-02-09T12:36:00.000
3
0
false
2,228,988
0
0
1
2
I have been using Macromedia / Adobe Director & Lingo since 1998. I am extremely familiar with using this software to create CDROMs and DVDs and also have a good knowledge of design elements and their integration such as flash videos, images & audio etc. I am always keen to explore other technologies and understand tha...
Python CDROM Production
2,229,023
1
0
214
0
python,adobe,media,dvd,cd-rom
Python isn't the tool you are looking for... [waves hand across in front of Mindblip's face] Stick with Director or try Flash with either MPlayer or Zinc.
0
0
0
1
2010-02-09T12:36:00.000
3
0.066568
false
2,228,988
0
0
1
2
I have been using Macromedia / Adobe Director & Lingo since 1998. I am extremely familiar with using this software to create CDROMs and DVDs and also have a good knowledge of design elements and their integration such as flash videos, images & audio etc. I am always keen to explore other technologies and understand tha...
Django ModelForm with extra fields that are not in the model
2,230,669
5
65
49,864
0
python,django,forms
First, you shouldn't have artist_id and artist fields. They are build from the model. If you need some artist name, add artist_name field, that is CharField. Furthermore, you are trying to retrieve something from cleaned_data inside clean value. There might not be data you need - you should use values from self.data, w...
0
0
0
0
2010-02-09T12:44:00.000
7
0.141893
false
2,229,039
0
0
1
1
I have done a ModelForm adding some extra fields that are not in the model. I use these fields for some calcualtions when saving the form. The extra fields appear on the form and they are sent in the POST request when uploading the form. The problem is they are not added to the cleaned_data dictionary when I validate t...
Django: Setting one page as the main page
2,229,654
1
0
327
0
python,django
Create MAIN_PAGE setting inside settings.py with primary key. Then create view main_page nad retrieve the main_page object from the database using the setting. EDIT: You can also do it like this: add a model, which will reference a SimplePage and point to the main page. In main page view, you will retrieve the wanted S...
0
0
0
0
2010-02-09T14:13:00.000
2
1.2
true
2,229,640
0
0
1
1
I'm a newbie at Django and I want to do something that I'm not sure how to do. I have a model SimplePage, which simply stands for a webpage that is visible on the website and whose contents can be edited in the admin. (I think this is similar to FlatPage.) So I have a bunch of SimplePages for my site, and I want one of...
Get all related Django model objects
40,207,709
2
96
54,612
0
python,django,django-models,merge
Unfortunately, user._meta.get_fields() returns only relations accessible from user, however, you may have some related object, which uses related_name='+'. In such case, the relation would not be returned by user._meta.get_fields(). Therefore, if You need generic and robust way to merge objects, I'd suggest to use the ...
0
0
0
0
2010-02-10T01:46:00.000
9
0.044415
false
2,233,883
0
0
1
1
How can I get a list of all the model objects that have a ForeignKey pointing to an object? (Something like the delete confirmation page in the Django admin before DELETE CASCADE). I'm trying to come up with a generic way of merging duplicate objects in the database. Basically I want all of the objects that have Fore...
SQLAlchemy ForeignKey relation via an intermediate table
2,248,806
1
0
928
1
python,sqlalchemy
Assuming I understand you question correctly, then No, you can't model that relationship as you have suggested. (It would help if you described your desired result, rather than your perceived solution) What I think you may want is a many-to-many mapping table called ArticleCategories, consisting of 2 int columns, Arti...
0
0
0
0
2010-02-10T02:30:00.000
1
0.197375
false
2,234,030
0
0
1
1
Suppose that I have a table Articles, which has fields article_id, content and it contains one article with id 1. I also have a table Categories, which has fields category_id (primary key), category_name, and it contains one category with id 10. Now suppose that I have a table ArticleProperties, that adds properties to...
How do I prevent duplicating code with pylons html table updated via ajax?
2,234,168
1
0
118
0
python,ajax,html-table,pylons
One possibility would be to actually generate the AJAX HTML server-side (instead of generating JSON), and insert it right into the DOM tree (instead of parsing the JSON and generating the HTML on the client). Then you could use the same functions on the server side to generate the AJAX rows before they are shipped off....
0
0
0
0
2010-02-10T03:06:00.000
1
0.197375
false
2,234,153
0
0
1
1
I have a pylons web-page with a table. I have created python functions in the template which help with the construction of the table html. One of these functions takes an 'item' and generates an html row while also adding css zebra striping. The other def generates the header row's html. This works perfectly for lo...
Django user impersonation by admin
2,242,953
-2
25
10,136
0
python,django,impersonation
Set up so you have two different host names to the same server. If you are doing it locally, you can connect with 127.0.0.1, or localhost, for example. Your browser will see this as three different sites, and you can be logged in with different users. The same works for your site. So in addition to www.mysite.com you ...
0
0
0
0
2010-02-11T07:35:00.000
6
-0.066568
false
2,242,909
0
0
1
2
I have a Django app. When logged in as an admin user, I want to be able to pass a secret parameter in the URL and have the whole site behave as if I were another user. Let's say I have the URL /my-profile/ which shows the currently logged in user's profile. I want to be able to do something like /my-profile/?__user_id=...
Django user impersonation by admin
2,249,857
1
25
10,136
0
python,django,impersonation
i don't see how that is a security hole any more than using su - someuser as root on a a unix machine. root or an django-admin with root/admin access to the database can fake anything if he/she wants to. the risk is only in the django-admin account being cracked at which point the cracker could hide tracks by becoming...
0
0
0
0
2010-02-11T07:35:00.000
6
0.033321
false
2,242,909
0
0
1
2
I have a Django app. When logged in as an admin user, I want to be able to pass a secret parameter in the URL and have the whole site behave as if I were another user. Let's say I have the URL /my-profile/ which shows the currently logged in user's profile. I want to be able to do something like /my-profile/?__user_id=...
WSGI/Django: pass username back to Apache for access log
2,244,295
1
9
2,209
1
python,django,apache,authentication,mod-wsgi
This probably isn't what you're expecting, but you could use the username in your URL scheme. That way the user will be in the path section of your apache logs. You'd need to modify your authentication so that auth-required responses are obvious in the apache logs, otherwise when viewing the logs you may attribute unau...
0
0
0
0
2010-02-11T12:03:00.000
5
0.039979
false
2,244,244
0
0
1
2
My Django app, deployed in mod_wsgi under Apache using Django's standard WSGIHandler, authenticates users via form login on the Django side. So to Apache, the user is anonymous. This makes the Apache access log less useful. Is there a way to pass the username back through the WSGI wrapper to Apache after handling the r...
WSGI/Django: pass username back to Apache for access log
10,406,967
1
9
2,209
1
python,django,apache,authentication,mod-wsgi
Correct me if I'm wrong, but what's stopping you from creating some custom middleware that sets a cookie equal to the display name of the current user logged in. This middleware will run on every view, so even though technically the user could spoof his username to display whatever he wants it to display, it'll just be...
0
0
0
0
2010-02-11T12:03:00.000
5
0.039979
false
2,244,244
0
0
1
2
My Django app, deployed in mod_wsgi under Apache using Django's standard WSGIHandler, authenticates users via form login on the Django side. So to Apache, the user is anonymous. This makes the Apache access log less useful. Is there a way to pass the username back through the WSGI wrapper to Apache after handling the r...
GeoModel with Google App Engine - queries
7,342,144
1
5
941
0
python,google-app-engine,geolocation,geospatial
There's no practical way to do this, because a call to geoquery devolves into multiple datastore queries, which it merges together into a single result set. If you were able to specify an offset, geoquery would still have to fetch and discard all the first n results before returning the ones you requested. A better opt...
0
0
0
0
2010-02-11T22:41:00.000
2
0.099668
false
2,248,341
0
0
1
1
I'm trying to use GeoModel python module to quickly access geospatial data for my Google App Engine app. I just have a few general questions for issues I'm running into. There's two main methods, proximity_fetch and bounding_box_fetch, that you can use to return queries. They actually return a result set, not a filter...
Django Master-Detail View Plugins
2,250,366
2
2
2,025
0
python,django,django-templates,django-views,master-detail
2 common solution I use for this problem: Partial Templates: Create a template for rendering "social" and "financial" that does not need stuff from the view, other than the object it is working on (and uses the objects functions or template tags to render it). then you can easily {% include %} it (and set the needed ...
0
0
0
0
2010-02-12T02:23:00.000
1
1.2
true
2,249,285
0
0
1
1
Let's say I have 3 django apps, app Country, app Social and app Financial. Country is a 'master navigation' app. It lists all the countries in a 'index' view and shows details for each country on its 'details' view. Each country's details include their Social details (from the social app) and their Financial details (...
How to improve the throughput of request_logs on Google App Engine
2,249,540
1
1
499
0
python,google-app-engine,logging
You can increase the per-request batch size of logs. In the latest SDK (1.3.1), check out google_appengine/google/appengine/tools/appcfg.py around like 861 (RequestLogLines method of LogsRequester class). You can modify the "limit" parameter. I am using 1000 and it works pretty well.
0
1
0
0
2010-02-12T03:40:00.000
1
1.2
true
2,249,530
0
0
1
1
Downloading logs from App Engine is nontrivial. Requests are batched; appcfg.py does not use normal file IO but rather a temporary file (in reverse chronological order) which it ultimately appends to the local log file; when appending, the need to find the "sentinel" makes log rotation difficult since one must leave en...
Running script on server start in google app engine, in Python
2,253,428
4
5
2,804
0
python,google-app-engine
I use appengine python with the django helper. As far as I know you cannot hook anything on the deploy, but you could put a call to check if you need to do your setup in the main function of main.py. This is how the helper initializes itself on the first request. I haven't looked at webapp in a while, but I assume m...
0
1
0
0
2010-02-12T15:03:00.000
4
1.2
true
2,252,672
0
0
1
3
Is it possible to run a script each time the dev server starts? Also at each deploy to google? I want the application to fill the database based on what some methods returns. Is there any way to do this? ..fredrik
Running script on server start in google app engine, in Python
2,252,697
2
5
2,804
0
python,google-app-engine
You can do this by writing a script in your favorite scripting language that performs the actions that you desire and then runs the dev server or runs appcfg.py update.
0
1
0
0
2010-02-12T15:03:00.000
4
0.099668
false
2,252,672
0
0
1
3
Is it possible to run a script each time the dev server starts? Also at each deploy to google? I want the application to fill the database based on what some methods returns. Is there any way to do this? ..fredrik
Running script on server start in google app engine, in Python
2,259,561
1
5
2,804
0
python,google-app-engine
Try to make wrapper around the server runner and script that run deployment. So you will be able to run custom code when you need.
0
1
0
0
2010-02-12T15:03:00.000
4
0.049958
false
2,252,672
0
0
1
3
Is it possible to run a script each time the dev server starts? Also at each deploy to google? I want the application to fill the database based on what some methods returns. Is there any way to do this? ..fredrik
cron job and Long process problem
3,487,091
0
0
253
0
python,django,cron
I'd advice to avoid launching threads inside the django application. Most of the times you can run the thread as a separate application. If you deploy the app in a Apache server and you don't control it properly each Apache process will assume that a request is the first one and you could end up with more than one inst...
0
0
0
1
2010-02-12T17:23:00.000
1
0
false
2,253,714
0
0
1
1
Via django iam launching a thread (via middle ware the moment the first request comes) which continously fetches the twitter public steam and puts it down into the database.Assume the thread name is twitterthread. I also have have several cron jobs which periodically interacts with other third party api services. Obser...
Django-tinymce not working; Getting a normal textarea instead
2,254,470
0
1
919
0
javascript,python,django,django-admin,tinymce
What are your webserver and web browser. Perhaps it is trying to set the gzip/bzip header and the server isn't processing it... so it goes out plaintext but the client expects compressed?
0
0
0
0
2010-02-12T19:06:00.000
1
0
false
2,254,398
0
0
1
1
I'm trying to use django-tinymce to make fields that are editable through Django's admin with a TinyMCE field. I am using tinymce.models.HTMLField as the field for this. The problem is it's not working. I get a normal textarea. I check the HTML source, and it seems like all the code needed for TinyMCE is there. I also ...
Recommended Django Deployment
2,257,323
4
9
3,882
0
python,linux,django,deployment,webserver
Update your question to remove the choices that don't work. If it has Python 2.4, and an installation is a headache, just take it off the list, and update the question to list the real candidates. Only list the ones that actually fit your requirements. (You don't say what your requirements are, but minimal upgrades ...
0
1
0
0
2010-02-13T08:47:00.000
4
0.197375
false
2,256,987
0
0
1
3
Short version: How do you deploy your Django servers? What application server, front-end (if any, and by front-end I mean reverse proxy), and OS do you run it on? Any input would be greatly appreciated, I'm quite a novice when it comes to Python and even more as a server administrator. Long version: I'm migrating betwe...
Recommended Django Deployment
2,257,450
3
9
3,882
0
python,linux,django,deployment,webserver
At the place I rent server, they have shaved down the Ubuntu images to bare minimum. Presumably because they had to make a special image anyway with just the right drivers and such in it, but I don't know exactly. They have even removed wget and nano. So you get all the apt-get goodness and not a whole lot of "cookie-c...
0
1
0
0
2010-02-13T08:47:00.000
4
0.148885
false
2,256,987
0
0
1
3
Short version: How do you deploy your Django servers? What application server, front-end (if any, and by front-end I mean reverse proxy), and OS do you run it on? Any input would be greatly appreciated, I'm quite a novice when it comes to Python and even more as a server administrator. Long version: I'm migrating betwe...
Recommended Django Deployment
2,259,882
0
9
3,882
0
python,linux,django,deployment,webserver
Personally I find one of the BSD systems far superior to Linux distros for server related tasks. Give OpenBSD or perhaps FreeBSD a chance. Once you do you´ll never go back.
0
1
0
0
2010-02-13T08:47:00.000
4
0
false
2,256,987
0
0
1
3
Short version: How do you deploy your Django servers? What application server, front-end (if any, and by front-end I mean reverse proxy), and OS do you run it on? Any input would be greatly appreciated, I'm quite a novice when it comes to Python and even more as a server administrator. Long version: I'm migrating betwe...
Generating & Merging PDF Files in Python
2,263,276
1
4
6,428
0
python,pdf,merge,reportlab,pypdf
You could generate a document through, for example, TeX, or OpenOffice, or whatever gives you the most comfortable bindings and then print the document with a pdf printer. This allows you not to have to figure out where to put fields precisely or figure out what to do if your content overflows the space allocated for i...
0
0
0
0
2010-02-14T23:19:00.000
3
0.066568
false
2,263,263
1
0
1
1
I want to automatically generate booking confirmation PDF files in Python. Most of the content will be static (i.e. logos, booking terms, phone numbers), with a few dynamic bits (dates, costs, etc). From the user side, the simplest way to do this would be to start with a PDF file with the static content, and then usin...
How to upload all .html files to a remote server using FTP and preserving file structure?
2,263,804
0
0
409
0
python,networking,scripting,ftp
umm, maybe by pressing F5 in mc for linux or total commander for windows?
0
0
1
1
2010-02-15T02:37:00.000
4
0
false
2,263,782
0
0
1
2
I have edited about 100 html files locally, and now I want to push them to my live server, which I can only access via ftp. The HTML files are in many different directories, but hte directory structure on the remote machine is the same as on the local machine. How can I recursively descend from my top-level directory f...
How to upload all .html files to a remote server using FTP and preserving file structure?
2,299,546
0
0
409
0
python,networking,scripting,ftp
if you have a mac, you can try cyberduck. It's good for syncing remote directory structures via ftp.
0
0
1
1
2010-02-15T02:37:00.000
4
0
false
2,263,782
0
0
1
2
I have edited about 100 html files locally, and now I want to push them to my live server, which I can only access via ftp. The HTML files are in many different directories, but hte directory structure on the remote machine is the same as on the local machine. How can I recursively descend from my top-level directory f...