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 do you make a case for Django [or Ruby on Rails] to non-technical clients
644,316
21
14
2,100
0
python,ruby-on-rails,ruby,django
It's easier to ask forgiveness than permission. First, build the initial release in Django. Quickly. Build the model well (really well!). But use as much default admin functionality as you can. Spend time only only reporting and display pages where the HTML might actually matter to the presentation. Show this and they'll only want more. Once they've gotten addicted to fast turnaround and correct out-of-the box operation, you can discuss technology with them. By then it won't matter any more.
0
0
0
0
2009-03-13T19:25:00.000
7
1.2
true
644,237
0
0
1
5
Businessmen typically want a web application developed. They are aware of .net or J2EE by names, without much knowledge about either. Altho' Rails and Django offer for a much better and faster development stack, it is a big task to convince businessmen to use these platforms. The task begins with introducing Django (or Rails), quoting some blog/research. Then making a case for the use of the framework for the specific project. Lot of the task is repetitive. What are the sources/blogs/whitepapers and other materials you use to make a case for django (or Rails) Don't you think there should be a common brochure developed that many development agencies could use to make the same case, over and again. Are there any such ones, now? There seems to be enough discussion on Django vs Rails. Whereas the need is (Django and Rails) vs (.net and J2EE), at least so, while making a business case. Both represent a faster pragmatic web development in a dynamic language.
Provide discount to preferred customer with Satchmo?
1,198,670
2
1
312
0
python,django,satchmo
Checkout the tiered pricing module
0
0
0
1
2009-03-15T03:46:00.000
1
1.2
true
647,257
0
0
1
1
I am new to Satchmo -- picked it up because I needed payment processing for site subscriptions and physical product. My site will have two classes of users: paid subscribers and free users. Both can order a physical product. Paid subscribers get an automatic discount on all orders. I don't see a configuration for this in the admin. (Discount looks like it would apply to all users. If I'm missing something here, let me know.) So what's the best place to automatically override the price depending on the user class? The displayed price should show up, say, 10% less for subscribers everywhere in the site, not just at the checkout. Thanks.
How to unlock an sqlite3 db?
652,758
6
1
4,579
1
python,django
Your database is locked because you have a transaction running somewhere. Stop all your Django apps. If necessary, reboot. It's also remotely possible that you crashed a SQLite client in the middle of a transaction and the file lock was left in place.
0
0
0
0
2009-03-17T01:33:00.000
2
1.2
true
652,750
0
0
1
1
OMG! What an apparent problem... my django based scripts have locked my sqlite db... Does anyone know how to fix?
Tired of ASP.NET, which of the following should I learn and why?
670,680
9
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Let's start by clarifying your question. Why are you "tired of ASP.NET?" Is it because of the tedious webforms model that tries so hard to protect you from the browser/server conversation that it ends up getting in the way? Or is it because you have been trying to work with one of the tiresome 3rd party enhancement controls that build on the tedium of the webforms model? Or do are you simply tired of working with five different languages at once: ASP.NET, HTML, CSS, Javascript, and C#/VB? If you answered yes to the first two of these questions here's some advice: Get some rest. Try ASP.NET MVC. It gets out of your way and lets you work with the browser and IIS Realize that changing web development models will be difficult no matter which one you choose to move to. The path is smoother the fewer things you change (see number 2). If you answered yes only to the 3rd question (five different languages) then all I can tell you is, welcome to web development. It will be this way for awhile.
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
657,138
12
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
OK, first, apparently we all need a pants check. Done? I'm of two minds: if you are looking for a practical language / platform to pick up that you hope to use to help you in your day-to-day then I'd go with Python/Django. Python has developed into a really sweat and powerful language and Django is as nice a web development MVC as any other and pretty easy to pick up and get going with. You can run it locally, its easy to deploy on Apache w/ mod_python. Did I mention that Python is a really nice language? Also good support in the tools world, google app engine etc.... if you are looking to expand your thinking/though processes about the way you program and think about programming then I'm with Joel Spolsky - choose HAppS (Joel would go Haslkell) or Clojure which I've not used but I've done a lot of lisp and it makes you think different and the language constructs like the macro capability will change the way you think of solving problems
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
657,002
8
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I recommend Clojure and Compojure because Clojure is awesome. Clojure is a new and modern LISP implemented on the JVM and can interact seamlessly with any Java library. It already has 3 IDE plugins in development, a book written about it, a very smart and open-minded person running the whole operation and a great newbie friendly community. The language is simple, easy to learn and yet really powerful. A good way to open your mind to new ideas without going as far as pure functional programming. Coding websites with Clojure is a breeze and really fun. It has a lot going for it and a lot of momentum. All the kool kids are doin' it so I recommend giving it a try!
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
656,999
30
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Have you considered turning off the computer and going outside instead? Remember to wear pants!
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
703,688
1
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I'll add in my vote for Groovy, as well as another one for Ruby. Both Grails and Rails are excellent frameworks, although Rails will get you a job a lot sooner than Grails. Both are truly a pleasure to work with, and have actually made me enjoy coding again. Groovy is nice because you can use any Java library. So, lightning-fast database access, XML parsing, PDF generation, and so on. In a nutshell, Groovy is Java, if Java had been written by a bunch of Ruby guys. Grails is also great, although it's a lot buggier than Rails, and if you want to do anything complicated you're going to need to learn a bit about Spring, Hibernate, and Java. Grails does have better internationalization support and more deployment options, as well as a really good integrated scheduler (Quartz) for long-running and scheduled tasks. Rails is Ruby all the way down, so you can very easily read the framework code and figure out how things worked -- I did this in order to figure out how to implement a graph (data structure), and was really pleased with how easy it was to figure out how to change things.
0
0
0
0
2009-03-18T04:41:00.000
18
0.011111
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
656,998
10
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I would probably learn Ruby on Rails. It has a lot of different methodologies compared to ASP.NET, and it might open your eyes to some different and very powerful approaches to web apps.
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
657,026
4
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
You should wait until you get an answer from someone who's used more than one of those. That said (I've only used rails, python, and javascript), one way to frame it would be as a balance between sheer intellectual joy and practicality. My thoughts on Rails and Python from that perspective: Rails is going to be different and interesting, and it was hip in 2005-2007. There may be something more hip now. (Hip counts when you want to get future colleagues excited about what you've done, when they haven't done it.) I'd venture that it's at least as eye-opening as something based on LISP or Smalltalk or Haskell, but probably more practical because you may actually end up using it at a job or for contract work. Clojure, Seaside, and HAppS sound really cool, but until one of them really catches on, you're unlikely to ever use any of that stuff again in your career unless you're a computer science PhD working with other PhD's. (Edit in response to comments: please don't read this as a disparagement of those frameworks. As Rayne and MarkusQ have noted, depending on your motivations, they may be just what you're looking for. I'm just trying to communicate one method for weighing the alternatives based on your goals.) Python is a great language to know all around. I haven't used Django, but it has some industry traction (not as much as rails). Python as a language though will serve you well no matter what you do -- it's great for banging out utility scripts and rapidly prototyping ideas. There's a huge community and tons of libraries. You can gauge a technology's potential usefulness for moneymaking by searching for it on craigslist, dice.com, monster.com, etc.
0
0
0
0
2009-03-18T04:41:00.000
18
0.044415
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
657,029
6
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Javascript, because the skills you learn will complement your current Asp.net skills.
0
0
0
0
2009-03-18T04:41:00.000
18
1
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
658,881
4
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Definitely clojure. It is the most different of all languages mentioned in the list, so it would be probably most fun to learn / use.
0
0
0
0
2009-03-18T04:41:00.000
18
0.044415
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
670,621
1
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I have worked with several technologies... not touched ASP. NET. Heard about it from other people who are under its influence. I have started working with Ruby on Rails and it is fun. Since you want to learn and develop web sites, you should go for Ruby on Rails. There are lot of things you can do with RoR on web. I like things that you can do with RMagick. (cropping images, thumbnails,slideshow etc) Talk about multi-lingual sites... and there you have "gettext". I vote for RoR.
0
0
0
0
2009-03-18T04:41:00.000
18
0.011111
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
1,138,746
1
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Learn Ruby on Rails. It'll change the way you see web development. It did for me! A valid alternative is Django and Python. I don't use it, but I consider it to be just as good as Rails.
0
0
0
0
2009-03-18T04:41:00.000
18
0.011111
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
681,944
0
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I've used Ruby on Rails but also have done quite a bit of Groovy and Grails work. If you don't have any previous experience I would go with either of those. They're both fun to learn, pretty easy, and are very powerful. They're both backed up by frameworks: Ruby had Rails/Merb Groovy has Grails They can both use jQuery. I don't know much about Python/Django combination.
0
0
0
0
2009-03-18T04:41:00.000
18
0
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
691,195
0
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
I've started to learn Ruby on Rails along with MVC (since conceptually there similar) and found it a great relief from the same routine with .Net.
0
0
0
0
2009-03-18T04:41:00.000
18
0
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
691,259
3
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Nobody seems to be voting for groovy. I'd go for that. I don't know anything about grails, but groovy the language is pretty cool. In the past nine months at my job I've been required to learn python and ruby. In the process I also took some time to understand groovy. groovy is the language that had me hooked before I finished reading the first chapter of Groovy in Action. Ruby is the one I'm actively using now, and while I did nothing but python for six months that's my least favorite of the bunch. Python is not a bad language per se, I just didn't enjoy using it. I find ruby to be a very pleasant language and am glad I had the opportunity to learn it. Fully learning javascript might be the more practical choice, but I'd still vote for Groovy. I'm anxious to find an opportunity to use it at work.
0
0
0
0
2009-03-18T04:41:00.000
18
0.033321
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Tired of ASP.NET, which of the following should I learn and why?
657,797
1
8
1,614
0
python,asp.net-mvc,ruby,groovy,clojure
Ruby on Rails, because that's what I use.
0
0
0
0
2009-03-18T04:41:00.000
18
0.011111
false
656,987
0
0
1
15
Which of the following technology is easy to learn and fun for developing a website? If you could only pick one which would it be and why Clojure/Compojure+Ring/Moustache+Ring Groovy/Grails Python/Django Ruby/Rails Turbogear Cappuccino or Sproutcore Javascript/jQuery
Preserve order of attributes when modifying with minidom
29,696,911
1
13
8,252
0
python,xml,minidom
1.Custom your own 'Element.writexml' method. from 'minidom.py' copy Element's writexml code to your own file. rename it to writexml_nosort, delete 'a_names.sort()' (python 2.7) or change 'a_names = sorted(attrs.keys())' to 'a_names = attrs.keys()'(python 3.4) change the Element's method to your own: minidom.Element.writexml = writexml_nosort; 2.custom your favorite order: right_order = ['a', 'b', 'c', 'a1', 'b1'] 3.adjust your element 's _attrs node._attrs = OrderedDict( [(k,node._attrs[k]) for k in right_order ] )
0
0
1
0
2009-03-19T15:23:00.000
9
0.022219
false
662,624
0
0
1
1
Is there a way I can preserve the original order of attributes when processing XML with minidom? Say I have: <color red="255" green="255" blue="233" /> when I modify this with minidom the attributes are rearranged alphabetically blue, green, and red. I'd like to preserve the original order. I am processing the file by looping through the elements returned by elements = doc.getElementsByTagName('color') and then I do assignments like this e.attributes["red"].value = "233".
Can I write Python web application for Windows and Linux platforms at the same time?
663,372
0
3
1,553
0
python,cgi,fastcgi,wsgi
Writing python web apps is a topic on itself, but I would say that by default, it will be portable on multiple servers / platforms. When developping python web applications, you will often use frameworks that provide their own web server. For performance reasons, you might want to place it behind apache, but it is not even necessary, however, you might get a performance boost by placing it behind an apache server. Some of the most popular frameworks for web python are : Plone, Zope, CherryPy and TurboGears, only to name a few. Under apache, you could also use python server pages through mod_python, and since apache runs on windows too, this would aslo be portable.
0
1
0
0
2009-03-19T15:52:00.000
6
0
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
663,304
0
3
1,553
0
python,cgi,fastcgi,wsgi
consider also the possibility of using web2Py, or XML-RPC implementation, or Twisted...
0
1
0
0
2009-03-19T15:52:00.000
6
0
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,791
2
3
1,553
0
python,cgi,fastcgi,wsgi
Yes, if you use CGI, FastCGI or depending on your framework, even a self-contained web server (so IIS and Apache would be a reverse-proxy) then that would all work. The difference will be the configuration of the OS-specific servers, and also your Python environment on each OS. So you may find yourself doing a small bit of work at the beginning to make sure your paths are right, etc.
0
1
0
0
2009-03-19T15:52:00.000
6
0.066568
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,784
2
3
1,553
0
python,cgi,fastcgi,wsgi
web.py includes a server... It will do the trick for small jobs. By the way, Apache works on windows.
0
1
0
0
2009-03-19T15:52:00.000
6
0.066568
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Can I write Python web application for Windows and Linux platforms at the same time?
662,789
7
3
1,553
0
python,cgi,fastcgi,wsgi
Yes you can. But you can also use apache on windows. If you go the IIS way there's only CGI and it's pretty hard to set up. You can also use python based server like CherryPy which is pretty good and will work on all platforms with python. Some frameworks like django support both CGI and WSGI, so you don't have to worry about the details of WSGI or CGI much. If you ask me, WSGI is the future for python web apps.
0
1
0
0
2009-03-19T15:52:00.000
6
1
false
662,762
0
0
1
5
Can I write web application that I can host on Windows(IIS web server) and Linux (Apache or lighttpd) without any changes? CGI? Maybe something new? WSGI | FastCGI ?
Is there a way to manually register a user with a py-transport server-side?
1,703,042
0
1
262
0
python,xmpp,ejabberd
Go through once for each transport and register yourself. Capture the XMPP packets. Dump the transport registration data from your current system into a csv file, xml file, or something else you can know the structure. Write a script using jabberpy, xmpppy, pyxmpp, or whatever, and emulate each of your users registering with the transports. One issue is you may have to be connected to the Internet for the transports to come online. Then you're going live with someone else's account. If you can't get their current password data for your jabber server, set it all to a default and then migrate it back after your transport registration.
0
0
0
0
2009-03-20T19:02:00.000
1
0
false
667,510
0
0
1
1
I'm trying to write some scripts to migrate my users to ejabberd, but the only way that's been suggested for me to register a user with a transport is to have them use their client and discover the service. Certainly there is a way, right?
Python: simple async download of url content?
668,772
2
9
10,221
0
python,asynchronous
I'd just build a service in twisted that did that concurrent fetch and analysis and access that from web.py as a simple http request.
0
0
1
0
2009-03-20T22:40:00.000
10
0.039979
false
668,257
1
0
1
3
I have a web.py server that responds to various user requests. One of these requests involves downloading and analyzing a series of web pages. Is there a simple way to setup an async / callback based url download mechanism in web.py? Low resource usage is particularly important as each user initiated request could result in download of multiple pages. The flow would look like: User request -> web.py -> Download 10 pages in parallel or asynchronously -> Analyze contents, return results I recognize that Twisted would be a nice way to do this, but I'm already in web.py so I'm particularly interested in something that can fit within web.py .
Python: simple async download of url content?
668,723
0
9
10,221
0
python,asynchronous
Actually you can integrate twisted with web.py. I'm not really sure how as I've only done it with django (used twisted with it).
0
0
1
0
2009-03-20T22:40:00.000
10
0
false
668,257
1
0
1
3
I have a web.py server that responds to various user requests. One of these requests involves downloading and analyzing a series of web pages. Is there a simple way to setup an async / callback based url download mechanism in web.py? Low resource usage is particularly important as each user initiated request could result in download of multiple pages. The flow would look like: User request -> web.py -> Download 10 pages in parallel or asynchronously -> Analyze contents, return results I recognize that Twisted would be a nice way to do this, but I'm already in web.py so I'm particularly interested in something that can fit within web.py .
Python: simple async download of url content?
668,486
0
9
10,221
0
python,asynchronous
I'm not sure I'm understanding your question, so I'll give multiple partial answers to start with. If your concern is that web.py is having to download data from somewhere and analyze the results before responding, and you fear the request may time out before the results are ready, you could use ajax to split the work up. Return immediately with a container page (to hold the results) and a bit of javascript to poll the sever for the results until the client has them all. Thus the client never waits for the server, though the user still has to wait for the results. If your concern is tying up the server waiting for the client to get the results, I doubt if that will actually be a problem. Your networking layers should not require you to wait-on-write If you are worrying about the server waiting while the client downloads static content from elsewhere, either ajax or clever use of redirects should solve your problem
0
0
1
0
2009-03-20T22:40:00.000
10
0
false
668,257
1
0
1
3
I have a web.py server that responds to various user requests. One of these requests involves downloading and analyzing a series of web pages. Is there a simple way to setup an async / callback based url download mechanism in web.py? Low resource usage is particularly important as each user initiated request could result in download of multiple pages. The flow would look like: User request -> web.py -> Download 10 pages in parallel or asynchronously -> Analyze contents, return results I recognize that Twisted would be a nice way to do this, but I'm already in web.py so I'm particularly interested in something that can fit within web.py .
Pagination of Date-Based Generic Views in Django
670,763
2
6
3,818
0
python,django,pagination
Date based generic views don't have pagination. It seems you can't add pagination via wrapping them as well since they return rendered result. I would simply write my own view in this case. You can check out generic views' code as well, but most of it will probably be unneeded in your case. Since your question is a valid one, and looking at the code; I wonder why they didn't decouple queryset generation as separate functions. You could just use them and render as you wish then.
0
0
0
0
2009-03-21T20:08:00.000
5
1.2
true
669,903
0
0
1
1
I have a pretty simple question. I want to make some date-based generic views on a Django site, but I also want to paginate them. According to the documentation the object_list view has page and paginate_by arguments, but the archive_month view does not. What's the "right" way to do it?
How do I develop against OAuth locally?
3,117,885
0
37
19,222
0
python,oauth
You could create 2 applications? 1 for deployment and the other for testing. Alternatively, you can also include an oauth_callback parameter when you requesting for a request token. Some providers will redirect to the url specified by oauth_callback (eg. Twitter, Google) but some will ignore this callback url and redirect to the one specified during configuration (eg. Yahoo)
0
0
1
0
2009-03-22T01:37:00.000
7
0
false
670,398
0
0
1
3
I'm building a Python application that needs to communicate with an OAuth service provider. The SP requires me to specify a callback URL. Specifying localhost obviously won't work. I'm unable to set up a public facing server. Any ideas besides paying for server/hosting? Is this even possible?
How do I develop against OAuth locally?
7,971,246
5
37
19,222
0
python,oauth
This was with the Facebook OAuth - I actually was able to specify 'http://127.0.0.1:8080' as the Site URL and the callback URL. It took several minutes for the changes to the Facebook app to propagate, but then it worked.
0
0
1
0
2009-03-22T01:37:00.000
7
0.141893
false
670,398
0
0
1
3
I'm building a Python application that needs to communicate with an OAuth service provider. The SP requires me to specify a callback URL. Specifying localhost obviously won't work. I'm unable to set up a public facing server. Any ideas besides paying for server/hosting? Is this even possible?
How do I develop against OAuth locally?
12,107,449
10
37
19,222
0
python,oauth
In case you are using *nix style system, create a alias like 127.0.0.1 mywebsite.dev in /etc/hosts (you need have the line which is similar to above mentioned in the file, Use http://website.dev/callbackurl/for/app in call back URL and during local testing.
0
0
1
0
2009-03-22T01:37:00.000
7
1
false
670,398
0
0
1
3
I'm building a Python application that needs to communicate with an OAuth service provider. The SP requires me to specify a callback URL. Specifying localhost obviously won't work. I'm unable to set up a public facing server. Any ideas besides paying for server/hosting? Is this even possible?
Using PiL to take a screenshot of HTML/CSS
673,958
1
1
1,584
0
jquery,python,css,xhtml,python-imaging-library
I assume you got Python on the server side. The best way imo is to somehow 'get' all the editing parameters from the client, then re-render it using PIL. Update: How I will do it On the server side, you need an url to handle posts. On the client side, (after each edit, )send a post to that url, with the editing parameters. I think there is not an easy solution to this. Maybe if you don't use PIL to render the final image, but only remember the parameters, each view from clients can render itself?
0
0
0
1
2009-03-23T15:00:00.000
4
0.049958
false
673,725
1
0
1
2
I want to enable a user on a website to upload an image, and write some text over it. Also, they should be able to crop/scale/move the image and text. For that stuff, I can do it in jQuery. After they've made the image the way they want it, is there a way i can take a screenshot of that image (using PiL) and save it on the server? What is the best/proper way to do this?
Using PiL to take a screenshot of HTML/CSS
674,283
0
1
1,584
0
jquery,python,css,xhtml,python-imaging-library
Well, even if others are trying to discourage you from doing this, it would probably not be that hard. On the client-side, you, you define a div that is floated/resizable over the image, with transparency, that can be scaled for the crop. Move, I assume it applies only to the text, so you dynamically create draggable spans on the client side, still easy. Scale, I have no Idea of a simple UI to do it. When you want to update your Image, you serialize your data (position of your cropping div and position of your text spans / scaling, relative to the position to the image.) Then, using json or anything similar you'd like, you transfer the data to the server. Then, on the server, using python/PIL, you reproduce the transformations that you have serialized.
0
0
0
1
2009-03-23T15:00:00.000
4
0
false
673,725
1
0
1
2
I want to enable a user on a website to upload an image, and write some text over it. Also, they should be able to crop/scale/move the image and text. For that stuff, I can do it in jQuery. After they've made the image the way they want it, is there a way i can take a screenshot of that image (using PiL) and save it on the server? What is the best/proper way to do this?
How can I make the Django contrib Admin change list for a particular model class editable with drop downs for related items displayed in the listing?
680,830
1
1
197
0
python,django,django-admin,django-templates,django-forms
Try Django 1.1 beta. It's got the option to make items in the changelist editable (as well as incorporating the django-batchadmin project)
0
0
0
0
2009-03-23T16:00:00.000
1
0.197375
false
673,970
0
0
1
1
Basically I want to have an editable form for related entries instead of a static listing.
Django syncdb locking up on table creation
21,254,637
0
3
985
1
python,django,django-syncdb
Strange here too, but simply restarting the PostgreSQL service (or server) solved it. I'd tried manually pasting the table creation code in psql too, but that wasn't solving it either (well, no way it could if it was a lock thing) - so I just used the restart: systemctl restart postgresql.service that's on my Suse box. Am not sure whether reloading the service/server might lift existing table locks too?
0
0
0
0
2009-03-23T16:16:00.000
3
0
false
674,030
0
0
1
3
I've added new models and pushed to our staging server, run syncdb to create their tables, and it locks up. It gets as far as 'Create table photos_photousertag' and postgres output shows the notice for creation of 'photos_photousertag_id_seq', but otherwise i get nothing on either said. I can't ctrl+c the syncdb process and I have no indication of what route to take from here. Has anyone else ran into this?
Django syncdb locking up on table creation
10,438,955
1
3
985
1
python,django,django-syncdb
I just experienced this as well, and it turned out to just be a plain old lock on that particular table, unrelated to Django. Once that cleared the sync went through just fine. Try querying the table that the sync is getting stuck on and make sure that's working correctly first.
0
0
0
0
2009-03-23T16:16:00.000
3
0.066568
false
674,030
0
0
1
3
I've added new models and pushed to our staging server, run syncdb to create their tables, and it locks up. It gets as far as 'Create table photos_photousertag' and postgres output shows the notice for creation of 'photos_photousertag_id_seq', but otherwise i get nothing on either said. I can't ctrl+c the syncdb process and I have no indication of what route to take from here. Has anyone else ran into this?
Django syncdb locking up on table creation
674,105
1
3
985
1
python,django,django-syncdb
We use postgres, and while we've not run into this particular issue, there are some steps you may find helpful in debugging: a. What version of postgres and psycopg2 are you using? For that matter, what version of django? b. Try running the syncdb command with the "--verbosity=2" option to show all output. c. Find the SQL that django is generating by running the "manage.py sql " command. Run the CREATE TABLE statements for your new models in the postgres shell and see what develops. d. Turn the error logging, statement logging, and server status logging on postgres way up to see if you can catch any particular messages. In the past, we've usually found that either option b or option c points out the problem.
0
0
0
0
2009-03-23T16:16:00.000
3
0.066568
false
674,030
0
0
1
3
I've added new models and pushed to our staging server, run syncdb to create their tables, and it locks up. It gets as far as 'Create table photos_photousertag' and postgres output shows the notice for creation of 'photos_photousertag_id_seq', but otherwise i get nothing on either said. I can't ctrl+c the syncdb process and I have no indication of what route to take from here. Has anyone else ran into this?
Web crawlers and Google App Engine Hosted applications
677,133
1
4
3,097
0
python,google-app-engine,web-crawler
App Engine code only runs in response to HTTP requests, so you can't run a persistent crawler in the background. With the upcoming release of scheduled tasks, you could write a crawler that uses that functionality, but it would be less than ideal.
0
1
0
0
2009-03-24T07:44:00.000
4
0.049958
false
676,460
0
0
1
2
Is it impossible to run a web crawler on GAE along side with my app considering the I am running the free startup version?
Web crawlers and Google App Engine Hosted applications
677,320
0
4
3,097
0
python,google-app-engine,web-crawler
It's possible. But that's not really an application for appengine just as Arachnid wrote. If you manage to get it working I'll doubt you'll stay in the qotas for free accounts.
0
1
0
0
2009-03-24T07:44:00.000
4
0
false
676,460
0
0
1
2
Is it impossible to run a web crawler on GAE along side with my app considering the I am running the free startup version?
Django or CodeIgniter for Turn-Key Web Application
691,231
4
8
6,522
0
php,python,django,codeigniter
Deployment is clearly a problem for all non-PHP based web apps, but I think things are getting better with the DreamHost/Engineyard type ISP's who provide Ruby/Python etc. out of the box. It also looks like there's going to be a lot of discussion at PyCon this week about ways to fix deployment problems. The growth in popularity of Django, Turbogears, and Pylons is driving demand for better deployment solutions. That said, if your target market are people hosting on the very low end $12 a year type ISP's then I don't think you have much choice other than PHP. Finally, one thing I disagree with you is running PHP and Django on the same server. I'm running a few PHP apps on my server with Apache and dozens of Django sites with mod_wsgi in daemon mode. Running it that way means the Python interpreter doesn't use up ram in the Apache workers and vice versa, the PHP interpreter isn't contaminating my mod_wsgi daemons :)
0
0
0
1
2009-03-27T18:05:00.000
3
0.26052
false
690,856
0
0
1
3
I'm going to build a turn-key solution for a vertical market, and would like to offer both options: software as a service, and give them the opportunity to host the application on their own. In other words, I'm aiming to have similar deployment options as Joel's FogBugz. I'm a Python programmer, and I could fly over the project with Django. There are several reasons I prefer PHP though: 1) Django installation, and configuration assumes you have access to a shell (my target is not the programmer type). Although I could offer installation service, but not on their servers. 2) Django runs only on some specific hosts that must take special care to enable it. Installing mod_python/mod_wsgi, and most likely the minority of my potential clients would have root access, or even a cpanel. 3) Using PHP would mean I could run it on their existing server. I would have no need to move them to a Django-enabled server, and no downtime for their emails, while the DNS updates. On the other hand, I have very little experience with PHP. Smarty as a templating language looks nice, and works similarly to Django templates. It doesn't offer template inheritance though, except in a very hackish way in which I wish not to use as it could break the application if the designer messes them up. What do you think? Thanks in advance!
Django or CodeIgniter for Turn-Key Web Application
691,549
3
8
6,522
0
php,python,django,codeigniter
If you want your application to be mainstream then your almost forced to go with PHP. Going from Django to PHP is alot easier than going from PHP to Django. You know the standards, you just need to learn the PHP syntax and functions. I would definitely use a PHP framework. Symfony and akelos are very similar to Rails (close to Django). On the other than theres Code Igniter which does what it should - organise your code.
0
0
0
1
2009-03-27T18:05:00.000
3
0.197375
false
690,856
0
0
1
3
I'm going to build a turn-key solution for a vertical market, and would like to offer both options: software as a service, and give them the opportunity to host the application on their own. In other words, I'm aiming to have similar deployment options as Joel's FogBugz. I'm a Python programmer, and I could fly over the project with Django. There are several reasons I prefer PHP though: 1) Django installation, and configuration assumes you have access to a shell (my target is not the programmer type). Although I could offer installation service, but not on their servers. 2) Django runs only on some specific hosts that must take special care to enable it. Installing mod_python/mod_wsgi, and most likely the minority of my potential clients would have root access, or even a cpanel. 3) Using PHP would mean I could run it on their existing server. I would have no need to move them to a Django-enabled server, and no downtime for their emails, while the DNS updates. On the other hand, I have very little experience with PHP. Smarty as a templating language looks nice, and works similarly to Django templates. It doesn't offer template inheritance though, except in a very hackish way in which I wish not to use as it could break the application if the designer messes them up. What do you think? Thanks in advance!
Django or CodeIgniter for Turn-Key Web Application
692,907
2
8
6,522
0
php,python,django,codeigniter
Based on your own conclusions, I would go with CodeIgniter. It seems like there would be a ton of work helping your customers install your web app, and I assume you don't want that. Build a simple-to-install web app so that you can concentrate your efforts on making it better and selling it, instead of working extra as a sysadmin or writing extensive installation tutorials. (With that said, FogBugz wasn't easy to install on our Linux server, even though it is written in PHP. It took me and my colleague (both programmers!) more than a full work day to install. So I think there will always be problems with installation of self-hosted web apps.)
0
0
0
1
2009-03-27T18:05:00.000
3
0.132549
false
690,856
0
0
1
3
I'm going to build a turn-key solution for a vertical market, and would like to offer both options: software as a service, and give them the opportunity to host the application on their own. In other words, I'm aiming to have similar deployment options as Joel's FogBugz. I'm a Python programmer, and I could fly over the project with Django. There are several reasons I prefer PHP though: 1) Django installation, and configuration assumes you have access to a shell (my target is not the programmer type). Although I could offer installation service, but not on their servers. 2) Django runs only on some specific hosts that must take special care to enable it. Installing mod_python/mod_wsgi, and most likely the minority of my potential clients would have root access, or even a cpanel. 3) Using PHP would mean I could run it on their existing server. I would have no need to move them to a Django-enabled server, and no downtime for their emails, while the DNS updates. On the other hand, I have very little experience with PHP. Smarty as a templating language looks nice, and works similarly to Django templates. It doesn't offer template inheritance though, except in a very hackish way in which I wish not to use as it could break the application if the designer messes them up. What do you think? Thanks in advance!
How do I configure Eclipse to launch a browser when Run or Debug is selected using Pydev plugin
698,968
1
14
12,436
0
python,eclipse,eclipse-plugin,pydev
project properties (right click project in left pane) Go to "run/debug settings", add a new profile. Setup the path and environment etc... you want to launch. The new configuration will show up in your build menu. You could also configure it as an "external tool"
0
0
0
0
2009-03-30T13:14:00.000
2
0.099668
false
697,142
0
0
1
1
I'm learning Python and Django using the Eclipse Pydev plugin. I want the internal or external browser to launch or refresh with the URL http:/127.0.0.1 when I press Run or Debug. I've seen it done with the PHP plugins but not Pydev.
How do I get the filepath for a class in Python?
697,405
5
121
56,627
0
python,class,introspection
This is the wrong approach for Django and really forcing things. The typical Django app pattern is: /project /appname models.py views.py /templates index.html etc.
0
0
0
1
2009-03-30T13:58:00.000
3
0.321513
false
697,320
0
0
1
1
Given a class C in Python, how can I determine which file the class was defined in? I need something that can work from either the class C, or from an instance off C. The reason I am doing this, is because I am generally a fan off putting files that belong together in the same folder. I want to create a class that uses a Django template to render itself as HTML. The base implementation should infer the filename for the template based on the filename that the class is defined in. Say I put a class LocationArtifact in the file "base/artifacts.py", then I want the default behaviour to be that the template name is "base/LocationArtifact.html".
abstracting the conversion between id3 tags, m4a tags, flac tags
698,252
0
14
4,835
0
python,bash,mp3,m4a
You can just write a simple app with a mapping of each tag name in each format to an "abstract tag" type, and then its easy to convert from one to the other. You don't even have to know all available types - just those that you are interested in. Seems to me like a weekend-project type of time investment, possibly less. Have fun, and I won't mind taking a peek at your implementation and even using it - if you won't mind releasing it of course :-) .
0
0
0
0
2009-03-30T15:49:00.000
5
0
false
697,776
1
0
1
2
I'm looking for a resource in python or bash that will make it easy to take, for example, mp3 file X and m4a file Y and say "copy X's tags to Y". Python's "mutagen" module is great for manupulating tags in general, but there's no abstract concept of "artist field" that spans different types of tag; I want a library that handles all the fiddly bits and knows fieldname equivalences. For things not all tag systems can express, I'm okay with information being lost or best-guessed. (Use case: I encode lossless files to mp3, then go use the mp3s for listening. Every month or so, I want to be able to update the 'master' lossless files with whatever tag changes I've made to the mp3s. I'm tired of stubbing my toes on implementation differences among formats.)
abstracting the conversion between id3 tags, m4a tags, flac tags
740,815
0
14
4,835
0
python,bash,mp3,m4a
There's also tagpy, which seems to work well.
0
0
0
0
2009-03-30T15:49:00.000
5
0
false
697,776
1
0
1
2
I'm looking for a resource in python or bash that will make it easy to take, for example, mp3 file X and m4a file Y and say "copy X's tags to Y". Python's "mutagen" module is great for manupulating tags in general, but there's no abstract concept of "artist field" that spans different types of tag; I want a library that handles all the fiddly bits and knows fieldname equivalences. For things not all tag systems can express, I'm okay with information being lost or best-guessed. (Use case: I encode lossless files to mp3, then go use the mp3s for listening. Every month or so, I want to be able to update the 'master' lossless files with whatever tag changes I've made to the mp3s. I'm tired of stubbing my toes on implementation differences among formats.)
Dilemma: Should I learn Seaside or a Python framework?
698,677
10
9
2,399
0
python,frameworks,seaside
Disclaimer: I really don't like PHP, Python is nice, but doesn't come close to Smalltalk in my book. But I am a biased Smalltalker. Some answers about Seaside/Squeak: Q: Which I guess runs on a squeak app server? Seaside runs in several different Smalltalks (VW, Gemstone, Squeak etc). The term "app server" is not really used in Smalltalk country. :) Q: From what I've heard it would permit good compartmentalization of users as each would have their own little private VM independent of all the systems other users which sounds wonderful from a security, scaling and redundancy standpoint. Yes, each user has its own WASession and all UI components the user sees are instances living on the server side in that session. So sharing of state between sessions is something you must do explicitly, typically through a db. Q: I've not done any Smalltalk since Uni 15 years back and I never dug too deep into it then. I don't see much entry level help for seaside or that many projects using it. Smalltalk is easy to get going with and there is a whole free online book on Seaside. Q: I suspect setting a server up to run it is hard for the same reason i.e. not because it's inherently hard but just cause there will be less help online and a presumption you are already rather au fait with Sqeak/Smalltalk. No, not hard. :) In fact, quite trivial. Tons of help - Seaside ml, IRC on freenode, etc. Q: Is Seaside as good as I think in terms of insulating users from each other? I would say so. Q: Might I be better off, security wise, sticking to the languages I'm most familiar with so I don't make any n00b mistakes or will Seaside be worth worth scaling the learning curve and prove more secure, comprehensible and maintainable in the long run? The killer argument in favor of Seaside IMHO is the true component model. It really, really makes it wonderful for complex UIs and maintenance. If you are afraid of learning "something different" (but then you wouldn't even consider it in the first place I guess) then I would warn you. But if you are not afraid then you will probably love it. Also - Squeak (or VW) is a truly awesome development environment - debugging live Seaside sessions, changing code in the debugger and resuming etc etc. It rocks.
0
0
0
1
2009-03-30T16:11:00.000
9
1.2
true
697,866
0
0
1
3
I know it's kinda subjective but, if you were to put yourself in my shoes which would you invest the time in learning? I want to write a web app which deals securely with relatively modest amounts of peoples private data, a few thousand records of a few Kb each but stuff that needs to be kept safe, addresses, phone numbers etc. I've done several web projects in PHP/MYSQL and have decided, handy though it is I really don't like PHP and don't want to do another large project in it... As such I figure I'd best learn something new and so I am considering 2 options (although I'll happily entertain others if you have suggestions). I'm having terrible trouble deciding though. They both look quite involved so rather than just jump in and potentially waste days getting up to speed enough on both of them to make an informed choice I thought I'd come here and canvas some opinion. So the two options I'm considering are... One of the PYTHON Web frameworks - TurboGears seems well regarded? Advantage: Of all the languages I ever tried Python is by far and away my favorite. There's loads of frameworks to choose from and I have done quite a lot of non web python coding over the last few years. Disadvantage: There's loads to choose from so it's hard to pick! Need to run single server process? or mod_python? which I don't like the sound of. What I do like is the notion of process separation and compartmentalization, i.e. if one users account is compromised it gives an attacker no leverage against the rest of the system. I'm not clear to what extent a python solution would handle that. Writing it as a SEASIDE app Which I guess runs on a squeak app server? Adv: From what I've heard it would permit good compartmentalization of users as each would have their own little private VM independent of all the systems other users which sounds wonderful from a security, scaling and redundancy standpoint. Dis: I've not done any Smalltalk since Uni 15 years back and I never dug too deep into it then. I don't see much entry level help for seaside or that many projects using it. I suspect setting a server up to run it is hard for the same reason i.e. not because it's inherently hard but just cause there will be less help online and a presumption you are already rather au fait with Sqeak/Smalltalk. So, what do people think? Would I be able to efficiently get the kind of strong separation and compartmentalization I'm after with a Python framework? Is Seaside as good as I think in terms of insulating users from each other? Might I be better off, security wise, sticking to the languages I'm most familiar with so I don't make any n00b mistakes or will Seaside be worth worth scaling the learning curve and prove more secure, comprehensible and maintainable in the long run? At the end of the day it's not a life or death decision and I can always bail if I start with one and then hate it so pls nobody get all holy language war and start flaming anyone! ;-) Cheers for any replies this gets, Roger :)
Dilemma: Should I learn Seaside or a Python framework?
698,940
6
9
2,399
0
python,frameworks,seaside
I've been getting into seaside myself but in many ways it is very hard to get started, which has nothing to do with the smalltalk which can be picked up extremely quickly. The challenge is that you are really protected from writing html directly. I find in most frameworks when you get stuck on how to do something there is always a work around of solving it by using the template. You may later discover that this solution causes problems with clarity down the road and there is in fact a better solutions built into the framework but you were able to move on from that problem until you learned the right way to do it. Seaside doesn't have templates so you don't get that crutch. No problems have permanently stumped me but some have taken me longer to solve than I would have liked. The flip side of this is you end up learning the seaside methodology much quicker because you can't cheat. If you decide to go the seaside route don't be afraid to post to the seaside mailing list at squeakfoundation.org. I found it intimidating at first because you don't see a lot of beginner questions there due to the low traffic but people are willing to help beginners there. Also there are a handful of seaside developers who monitor stackoverflow regularly. Good luck.
0
0
0
1
2009-03-30T16:11:00.000
9
1
false
697,866
0
0
1
3
I know it's kinda subjective but, if you were to put yourself in my shoes which would you invest the time in learning? I want to write a web app which deals securely with relatively modest amounts of peoples private data, a few thousand records of a few Kb each but stuff that needs to be kept safe, addresses, phone numbers etc. I've done several web projects in PHP/MYSQL and have decided, handy though it is I really don't like PHP and don't want to do another large project in it... As such I figure I'd best learn something new and so I am considering 2 options (although I'll happily entertain others if you have suggestions). I'm having terrible trouble deciding though. They both look quite involved so rather than just jump in and potentially waste days getting up to speed enough on both of them to make an informed choice I thought I'd come here and canvas some opinion. So the two options I'm considering are... One of the PYTHON Web frameworks - TurboGears seems well regarded? Advantage: Of all the languages I ever tried Python is by far and away my favorite. There's loads of frameworks to choose from and I have done quite a lot of non web python coding over the last few years. Disadvantage: There's loads to choose from so it's hard to pick! Need to run single server process? or mod_python? which I don't like the sound of. What I do like is the notion of process separation and compartmentalization, i.e. if one users account is compromised it gives an attacker no leverage against the rest of the system. I'm not clear to what extent a python solution would handle that. Writing it as a SEASIDE app Which I guess runs on a squeak app server? Adv: From what I've heard it would permit good compartmentalization of users as each would have their own little private VM independent of all the systems other users which sounds wonderful from a security, scaling and redundancy standpoint. Dis: I've not done any Smalltalk since Uni 15 years back and I never dug too deep into it then. I don't see much entry level help for seaside or that many projects using it. I suspect setting a server up to run it is hard for the same reason i.e. not because it's inherently hard but just cause there will be less help online and a presumption you are already rather au fait with Sqeak/Smalltalk. So, what do people think? Would I be able to efficiently get the kind of strong separation and compartmentalization I'm after with a Python framework? Is Seaside as good as I think in terms of insulating users from each other? Might I be better off, security wise, sticking to the languages I'm most familiar with so I don't make any n00b mistakes or will Seaside be worth worth scaling the learning curve and prove more secure, comprehensible and maintainable in the long run? At the end of the day it's not a life or death decision and I can always bail if I start with one and then hate it so pls nobody get all holy language war and start flaming anyone! ;-) Cheers for any replies this gets, Roger :)
Dilemma: Should I learn Seaside or a Python framework?
697,934
1
9
2,399
0
python,frameworks,seaside
I think you've pretty much summed up the pros and cons. Seaside isn't that hard to set up (I've installed it twice for various projects) but using it will definitely affect how you work--in addition to re-learning the language you'll probably have to adjust lots of assumptions about your work flow. It also depends on two other factors If other people will eventually be maintaining it, you'll have better luck finding python programmers If you are doing a highly stateful site, Seaside is going to beat the pants off any other framework I've seen.
0
0
0
1
2009-03-30T16:11:00.000
9
0.022219
false
697,866
0
0
1
3
I know it's kinda subjective but, if you were to put yourself in my shoes which would you invest the time in learning? I want to write a web app which deals securely with relatively modest amounts of peoples private data, a few thousand records of a few Kb each but stuff that needs to be kept safe, addresses, phone numbers etc. I've done several web projects in PHP/MYSQL and have decided, handy though it is I really don't like PHP and don't want to do another large project in it... As such I figure I'd best learn something new and so I am considering 2 options (although I'll happily entertain others if you have suggestions). I'm having terrible trouble deciding though. They both look quite involved so rather than just jump in and potentially waste days getting up to speed enough on both of them to make an informed choice I thought I'd come here and canvas some opinion. So the two options I'm considering are... One of the PYTHON Web frameworks - TurboGears seems well regarded? Advantage: Of all the languages I ever tried Python is by far and away my favorite. There's loads of frameworks to choose from and I have done quite a lot of non web python coding over the last few years. Disadvantage: There's loads to choose from so it's hard to pick! Need to run single server process? or mod_python? which I don't like the sound of. What I do like is the notion of process separation and compartmentalization, i.e. if one users account is compromised it gives an attacker no leverage against the rest of the system. I'm not clear to what extent a python solution would handle that. Writing it as a SEASIDE app Which I guess runs on a squeak app server? Adv: From what I've heard it would permit good compartmentalization of users as each would have their own little private VM independent of all the systems other users which sounds wonderful from a security, scaling and redundancy standpoint. Dis: I've not done any Smalltalk since Uni 15 years back and I never dug too deep into it then. I don't see much entry level help for seaside or that many projects using it. I suspect setting a server up to run it is hard for the same reason i.e. not because it's inherently hard but just cause there will be less help online and a presumption you are already rather au fait with Sqeak/Smalltalk. So, what do people think? Would I be able to efficiently get the kind of strong separation and compartmentalization I'm after with a Python framework? Is Seaside as good as I think in terms of insulating users from each other? Might I be better off, security wise, sticking to the languages I'm most familiar with so I don't make any n00b mistakes or will Seaside be worth worth scaling the learning curve and prove more secure, comprehensible and maintainable in the long run? At the end of the day it's not a life or death decision and I can always bail if I start with one and then hate it so pls nobody get all holy language war and start flaming anyone! ;-) Cheers for any replies this gets, Roger :)
What languages provide SDKs for interacting with Genesys services?
700,425
2
0
607
0
python,pbx,genesys,pabx
If they are providing a C library, you can use ctypes to interact with it.
0
0
0
0
2009-03-31T07:07:00.000
4
1.2
true
700,350
0
0
1
3
Genesys is a contact center platform that provides software for working with both hard and soft PBXs. There are also a number of ancillary services they provide to support the wider contact center business. I'm aware of the .NET and Java SDKs that Genesys supply on a first hand basis. Is there SDK support for any other languages and, specifically, is there an official Python library for interacting with their services? Alternatively, are there any 3rd party libraries that are designed to interact with Genesys services for Python?
What languages provide SDKs for interacting with Genesys services?
4,862,326
0
0
607
0
python,pbx,genesys,pabx
What do you need to interact with exacly? The GIS provides soap calls for a lot of functions.
0
0
0
0
2009-03-31T07:07:00.000
4
0
false
700,350
0
0
1
3
Genesys is a contact center platform that provides software for working with both hard and soft PBXs. There are also a number of ancillary services they provide to support the wider contact center business. I'm aware of the .NET and Java SDKs that Genesys supply on a first hand basis. Is there SDK support for any other languages and, specifically, is there an official Python library for interacting with their services? Alternatively, are there any 3rd party libraries that are designed to interact with Genesys services for Python?
What languages provide SDKs for interacting with Genesys services?
7,123,654
0
0
607
0
python,pbx,genesys,pabx
There is neither a native C nor a Python library. Best bet is to use GIS as suggested.
0
0
0
0
2009-03-31T07:07:00.000
4
0
false
700,350
0
0
1
3
Genesys is a contact center platform that provides software for working with both hard and soft PBXs. There are also a number of ancillary services they provide to support the wider contact center business. I'm aware of the .NET and Java SDKs that Genesys supply on a first hand basis. Is there SDK support for any other languages and, specifically, is there an official Python library for interacting with their services? Alternatively, are there any 3rd party libraries that are designed to interact with Genesys services for Python?
Executing Java programs through Python
703,221
5
15
33,606
0
java,python
Of course, Jython allows you to use Java classes from within Python. It's an alternate way of looking at it that would allow much tighter integration of the Java code.
0
0
0
0
2009-03-31T20:20:00.000
2
0.462117
false
702,861
0
0
1
1
How do I do this?
Does anyone know about workflow frameworks/libraries in Python?
704,838
0
19
15,282
0
python,django,workflow
I know there is an openerp, but it's not workflow.....
0
0
0
0
2009-04-01T09:54:00.000
10
0
false
704,834
0
0
1
1
I'm searching for a workflow library/framework for Python. I'm astonished that there I cannot find anything which is simple and not attached to Zope/Plone. Does anyone know of an open-source, simple workflow library/framework. It's preferred to support Django, but not required.
Python SAX parser says XML file is not well-formed
715,813
0
0
2,338
0
python,xml,sax
You could load it into Firefox, if you don't have an XML editor. Firefox shows you the error.
0
0
1
0
2009-04-02T06:35:00.000
4
0
false
708,531
0
0
1
3
I stripped some tags that I thought were unnecessary from an XML file. Now when I try to parse it, my SAX parser throws an error and says my file is not well-formed. However, I know every start tag has an end tag. The file's opening tag has a link to an XML schema. Could this be causing the trouble? If so, then how do I fix it? Edit: I think I've found the problem. My character data contains "&lt" and "&gt" characters, presumably from html tags. After being parsed, these are converted to "<" and ">" characters, which seems to bother the SAX parser. Is there any way to prevent this from happening?
Python SAX parser says XML file is not well-formed
711,033
0
0
2,338
0
python,xml,sax
I would second recommendation to try to parse it using another XML parser. That should give an indication as to whether it's the document that's wrong, or parser. Also, the actual error message might be useful. One fairly common problem for example is that the xml declaration (if one is used, it's optional) must be the very first thing -- not even whitespace is allowed before it.
0
0
1
0
2009-04-02T06:35:00.000
4
0
false
708,531
0
0
1
3
I stripped some tags that I thought were unnecessary from an XML file. Now when I try to parse it, my SAX parser throws an error and says my file is not well-formed. However, I know every start tag has an end tag. The file's opening tag has a link to an XML schema. Could this be causing the trouble? If so, then how do I fix it? Edit: I think I've found the problem. My character data contains "&lt" and "&gt" characters, presumably from html tags. After being parsed, these are converted to "<" and ">" characters, which seems to bother the SAX parser. Is there any way to prevent this from happening?
Python SAX parser says XML file is not well-formed
708,546
2
0
2,338
0
python,xml,sax
I would suggest putting those tags back in and making sure it still works. Then, if you want to take them out, do it one at a time until it breaks. However, I question the wisdom of taking them out. If it's your XML file, you should understand it better. If it's a third-party XML file, you really shouldn't be fiddling with it (until you understand it better :-).
0
0
1
0
2009-04-02T06:35:00.000
4
0.099668
false
708,531
0
0
1
3
I stripped some tags that I thought were unnecessary from an XML file. Now when I try to parse it, my SAX parser throws an error and says my file is not well-formed. However, I know every start tag has an end tag. The file's opening tag has a link to an XML schema. Could this be causing the trouble? If so, then how do I fix it? Edit: I think I've found the problem. My character data contains "&lt" and "&gt" characters, presumably from html tags. After being parsed, these are converted to "<" and ">" characters, which seems to bother the SAX parser. Is there any way to prevent this from happening?
Is there a good python module that does HTML encoding/escaping in C?
712,154
0
0
961
0
python,escaping,python-module
See lxml, which is based on libxml2. While it's primarily a XML library, HTML support is available.
0
0
0
1
2009-04-03T00:14:00.000
1
1.2
true
712,113
0
0
1
1
There is cgi.escape but that appears to be implemented in pure python. It seems like most frameworks like Django also just run some regular expressions. This is something we do a lot, so it would be good to have it be as fast as possible. Maybe C implementations wouldn't be much faster than a series of regexes for this?
Packaging Ruby or Python applications for distribution?
718,216
1
4
2,181
0
python,ruby,deployment
You can't strictly do this (creating a single installer/executable) in a general cross-platform way, because different platforms use different executable formats. The JVM thing is relying on having a platform-specific JVM already installed on the destination computer; if there is not one installed, then your JAR won't run unless you install a JVM in a platform-specific way. Perhaps more importantly, any third-party Python packages that rely on binary extensions will not play well with Jython unless specifically released in a Jython version, which is unusual. (I presume that a similar situation holds for Ruby packages, though I have no direct knowledge there, nor even how common it is for Ruby packages to use binary extensions....) You'd be able to use the whole range of Java libraries, but very little in the way of Python/Ruby libraries. It's also worth noting that the JVM versions of languages tend to lag behind the standard version, offering fewer language features and less-frequent bugfixes. If your code is pure Python, then it's already cross-platform as long as the destination machine already has Python installed, just as Java is... but at least in Windows, it's rather less safe to assume that Python is installed than to assume that Java is installed. The third-party elements (database, etc) are likely to be platform-specific binaries, too. User expectations about what's a reasonable installation process vary considerably across platforms, too -- if your app uses third-party libraries or tools, you'd better include all of them for Windows users, but *nix users tend to be more tolerant of downloading dependencies. (However, expectations for that to be handled automatically by a package manager are growing...) Really, if this is a large-ish application stack and you want to be able to have a drop-in bundle that can be deployed on almost any server, the easiest route would probably be to distribute it as a complete VMWare virtual machine -- the player software is free (for at least Windows and *nix, but I presume for Mac as well), and it allows you to create a dedicated Linux/BSD system that's already fully configured specifically for your application. (I say Linux/BSD because then you don't need to worry about OS licensing fees...) (If it's a smaller application that you want to allow to run on a client's existing webserver, then I suspect that cross-OS compatibility will be less of a concern than cross-webserver compatibility -- while Apache does have a Windows version, the vast majority of Windows webservers run IIS, and having a single package distribution (or even single version of your application) that plays well with both of those webservers is likely to be impractical.)
0
1
0
0
2009-04-04T04:52:00.000
5
0.039979
false
716,524
0
0
1
2
Are there any good options other than the JVM for packaging Python or Ruby applications for distribution to end-users? Specifically, I'm looking for ways to be able to write and test a web-based application written in either Ruby or Python, complete with a back-end database, that I can then wrap up in a convenient set of platform-independent packages (of some type) for deployment on Windows, Linux, OS X, and FreeBSD? Edit: What I mean by a 'web-based application' is a webapp that end-users can run on servers at their companies, providing a web service internally to their end-users. There are a lot of ways to do this on the JVM via JPython or JRuby, but I'm curious if there's a non-JVM route with alternate VMs or interpreters.
Packaging Ruby or Python applications for distribution?
7,002,189
1
4
2,181
0
python,ruby,deployment
You can either distribute the app as a virtual machine or create an installer that includes all dependencies, like the GitHub guys did for their on-premise version.
0
1
0
0
2009-04-04T04:52:00.000
5
0.039979
false
716,524
0
0
1
2
Are there any good options other than the JVM for packaging Python or Ruby applications for distribution to end-users? Specifically, I'm looking for ways to be able to write and test a web-based application written in either Ruby or Python, complete with a back-end database, that I can then wrap up in a convenient set of platform-independent packages (of some type) for deployment on Windows, Linux, OS X, and FreeBSD? Edit: What I mean by a 'web-based application' is a webapp that end-users can run on servers at their companies, providing a web service internally to their end-users. There are a lot of ways to do this on the JVM via JPython or JRuby, but I'm curious if there's a non-JVM route with alternate VMs or interpreters.
How do I enable SMS notifications in my web apps?
716,953
0
1
2,976
0
python,sms,notifications
I don't have any knowledge in this area. But I think you'll have to talk to the mobile operators, and see if they have any API for sending SMS messages. You'll probably have to pay them, or have some scheme for customers to pay them. Alternatively there might be some 3rd party that implements this functionality.
0
0
1
1
2009-04-04T11:47:00.000
7
0
false
716,946
0
0
1
2
I have a web application and I would like to enable real time SMS notifications to the users of the applications. Note: I currently cannot use the Twitter API because I live in West Africa, and Twitter doesn't send SMS to my country. Also email2sms is not an option because the mobile operators don't allow that in my country.
How do I enable SMS notifications in my web apps?
5,414,483
2
1
2,976
0
python,sms,notifications
The easiest way to accomplish this is by using a third party API. Some I know that work well are: restSms.me Twilio.com Clicatell.com I have used all of them and they easiest/cheapest one to implement was restSms.me Hope that helps.
0
0
1
1
2009-04-04T11:47:00.000
7
0.057081
false
716,946
0
0
1
2
I have a web application and I would like to enable real time SMS notifications to the users of the applications. Note: I currently cannot use the Twitter API because I live in West Africa, and Twitter doesn't send SMS to my country. Also email2sms is not an option because the mobile operators don't allow that in my country.
How can you make a vote-up-down button like in Stackoverflow?
719,293
3
32
7,516
0
javascript,python,html,ajax
You create the buttons, which can be links or images or whatever. Now hook a JavaScript function up to each button's click event. On clicking, the function fires and Sends a request to the server code that says, more or less, +1 or -1. Server code takes over. This will vary wildly depending on what framework you use (or don't) and a bunch of other things. Code connects to the database and runs a query to +1 or -1 the score. How this happens will vary wildly depending on your database design, but it'll be something like UPDATE posts SET score=score+1 WHERE score_id={{insert id here}};. Depending on what the database says, the server returns a success code or a failure code as the AJAX request response. Response gets sent to AJAX, asynchronously. The JS response function updates the score if it's a success code, displays an error if it's a failure. You can store the code in a variable, but this is complicated and depends on how well you know the semantics of your code's runtime environment. It eventually needs to be pushed to persistent storage anyway, so using the database 100% is a good initial solution. When the time for optimizing performance comes, there are enough software in the world to cache database queries to make you feel woozy so it's not that big a deal.
0
0
1
0
2009-04-05T16:07:00.000
4
0.148885
false
719,194
0
0
1
1
Problems how to make an Ajax buttons (upward and downward arrows) such that the number can increase or decrease how to save the action af an user to an variable NumberOfVotesOfQuestionID I am not sure whether I should use database or not for the variable. However, I know that there is an easier way too to save the number of votes. How can you solve those problems? [edit] The server-side programming language is Python.
Django templates stripping spaces?
18,688,638
0
16
27,195
0
python,django,django-templates
'\s' might be ok in the use case described above, but be careful, this replaces other whitespaces like '\t' or '\n' as well! If this is not what you want, just use " " instead.
0
0
0
0
2009-04-06T11:22:00.000
8
0
false
721,035
0
0
1
2
I'm having trouble with Django templates and CharField models. So I have a model with a CharField that creates a slug that replaces spaces with underscores. If I create an object, Somename Somesurname, this creates slug Somename_Somesurname and gets displayed as expected on the template. However, if I create an object, Somename Somesurname (notice the second space), slug Somename__Somesurname is created, and although on the Django console I see this as <Object: Somename Somesurname>, on the template it is displayed as Somename Somesurname. So do Django templates somehow strip spaces? Is there a filter I can use to get the name with its spaces?
Django templates stripping spaces?
57,768,087
1
16
27,195
0
python,django,django-templates
For someone having issue with django template try this : I had a similar issue with my <optgorup> tag, i am getting my values from django model to display under select. I simple used '' around label option to get the complete text with space.<optgroup label='{{key}}'>
0
0
0
0
2009-04-06T11:22:00.000
8
0.024995
false
721,035
0
0
1
2
I'm having trouble with Django templates and CharField models. So I have a model with a CharField that creates a slug that replaces spaces with underscores. If I create an object, Somename Somesurname, this creates slug Somename_Somesurname and gets displayed as expected on the template. However, if I create an object, Somename Somesurname (notice the second space), slug Somename__Somesurname is created, and although on the Django console I see this as <Object: Somename Somesurname>, on the template it is displayed as Somename Somesurname. So do Django templates somehow strip spaces? Is there a filter I can use to get the name with its spaces?
Python/Django plugin for Dreamweaver
5,149,029
0
6
24,140
0
python,django,dreamweaver
Beshir Kayali's plugin fails installation for DW CS5 and Extension Manager CS4. Irony that it asks for DW CS4 or better, else "upgrade" Extension manager to CS3. I could put some effort in to make this work, yet this is the sole review of the extension: I allows you to insert 6 kinds of template tags; if, for, template variable, block, comment, and tags. You press a button and then get a dialog box asking you for some info with maybe a few options. It doesn't actually do too much from what I can tell, definitely skippable.
0
0
0
0
2009-04-06T23:38:00.000
4
0
false
723,652
0
0
1
1
Does a plugin exists for Python/Django into Dreamweaver? Just wondering since Dreamweaver is a great web dev tool.
How to handle unicode of an unknown encoding in Django?
724,957
1
1
487
0
python,django,unicode
Create a File with the data. Use a Django models.FileField to hold a reference to the file. No it does not involve a ton of I/O. If your file is small it adds 2 or 3 I/O's (the directory read, the iNode read and the data read.)
0
0
0
0
2009-04-07T05:18:00.000
2
0.099668
false
724,212
0
0
1
2
I want to save some text to the database using the Django ORM wrappers. The problem is, this text is generated by scraping external websites and many times it seems they are listed with the wrong encoding. I would like to store the raw bytes so I can improve my encoding detection as time goes on without redoing the scrapes. But Django seems to want everything to be stored as unicode. Can I get around that somehow?
How to handle unicode of an unknown encoding in Django?
724,955
1
1
487
0
python,django,unicode
You can store data, encoded into base64, for example. Or try to analize HTTP headers from browser, may be it is simplier to get proper encoding from there.
0
0
0
0
2009-04-07T05:18:00.000
2
0.099668
false
724,212
0
0
1
2
I want to save some text to the database using the Django ORM wrappers. The problem is, this text is generated by scraping external websites and many times it seems they are listed with the wrong encoding. I would like to store the raw bytes so I can improve my encoding detection as time goes on without redoing the scrapes. But Django seems to want everything to be stored as unicode. Can I get around that somehow?
How do I write to the console in Google App Engine?
18,987,161
0
50
25,274
0
python,google-app-engine,logging
Use log.setLevel(Level.ALL) to see messages The default message filtering level seems to be 'error'. I didn't see any useful log messages until I used the setLevel() method to make the .info and .warning messages visible. Text printed to System.out wasn't showing up either. It seems to be interpreted as log.info() level messaages.
0
1
0
0
2009-04-07T20:14:00.000
11
0
false
727,410
0
0
1
2
Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the Google App Engine Launcher does have a Log terminal. Is there any way to write to said Terminal, or to some other terminal, using Google App Engine?
How do I write to the console in Google App Engine?
20,152,111
1
50
25,274
0
python,google-app-engine,logging
Hello I'm using the version 1.8.6 of GoogleAppEngineLauncher, you can use a flag to set the messages log level you want to see, for example for debug messages: --dev_appserver_log_level debug Use it instead of --debug (see @Christopher answer).
0
1
0
0
2009-04-07T20:14:00.000
11
0.01818
false
727,410
0
0
1
2
Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the Google App Engine Launcher does have a Log terminal. Is there any way to write to said Terminal, or to some other terminal, using Google App Engine?
How can I get useful information from flash swf files?
731,089
2
1
1,325
0
python,actionscript,flash
It might help to look at the arguments passed to the Flash movie. If there's reference to an FLV file then there's a good chance the SWF is being used to play a movie. The path to the SWF might help too. If it's under, say an /ads directory then it's probably just a banner ad. Or if it's under /games then it's probably a game. Other than using heuristics like this there's probably not much you can do. SWFs can be used for a lot of different things, and there's really nothing in the SWF itself that would tell you what "type" it is.
0
0
0
0
2009-04-08T17:34:00.000
3
0.132549
false
731,016
0
0
1
2
I'm doing some crawling with Python, and would like to be able to identify (however imperfectly) the flash I come across - is it a video, an ad, a game, or whatever. I assume I would have to decompile the swf, which seems doable. But what sort of processing would I do with the decompiled Actionscript to figure out what it's purpose is? Edit: or any better ideas would be most welcome also.
How can I get useful information from flash swf files?
731,053
4
1
1,325
0
python,actionscript,flash
I think your best bet would be to check the context where you see the swf file usually they're embedded within web pages so if that page has 100 occurences of the word "game", then it might be a game, as an example To detect an ad it might be trickier but i think that checking the domainname where the swf is hosted might do the trick, also html tags around the swf will be of great use
0
0
0
0
2009-04-08T17:34:00.000
3
0.26052
false
731,016
0
0
1
2
I'm doing some crawling with Python, and would like to be able to identify (however imperfectly) the flash I come across - is it a video, an ad, a game, or whatever. I assume I would have to decompile the swf, which seems doable. But what sort of processing would I do with the decompiled Actionscript to figure out what it's purpose is? Edit: or any better ideas would be most welcome also.
What's easiest way to get Python script output on the web?
731,629
0
7
16,918
0
javascript,python
Is this for a real webapp? Or is this a convenience thing for you to view output in the browser? If it's more so for convenience, you could consider using mod_python. mod_python is an extension for the apache webserver that embeds a python interpreter in the web server (so the script runs server side). It would easily let you do this sort of thing locally or for your own convenience. Then you could just run the script with mod python and have the handler post your results. You could probably easily implement the refreshing too, but I would not know off the top of my head how to do this. Hope this helps... check out mod_python. It's not too bad once you get everything configured.
0
0
1
0
2009-04-08T19:31:00.000
9
0
false
731,470
0
0
1
3
I have a python script that runs continuously. It outputs 2 lines of info every 30 seconds. I'd like to be able to view this output on the web. In particular, I'd like the site to auto-update (add the new output at the top of the page/site every 30 seconds without having to refresh the page). I understand I can do this with javascript but is there a python only based solution? Even if there is, is javascript the way to go? I'm more than willing to learn javascript if needed but if not, I'd like to stay focused on python. Sorry for the basic question but I'm still clueless when it comes to web programming. Thx!
What's easiest way to get Python script output on the web?
731,476
0
7
16,918
0
javascript,python
JavaScript is the primary way to add this sort of interactivity to a website. You can make the back-end Python, but the client will have to use JavaScript AJAX calls to update the page. Python doesn't run in the browser, so you're out of luck if you want to use just Python. (It's also possible to use Flash or Java applets, but that's a pretty heavyweight solution for what seems like a small problem.)
0
0
1
0
2009-04-08T19:31:00.000
9
0
false
731,470
0
0
1
3
I have a python script that runs continuously. It outputs 2 lines of info every 30 seconds. I'd like to be able to view this output on the web. In particular, I'd like the site to auto-update (add the new output at the top of the page/site every 30 seconds without having to refresh the page). I understand I can do this with javascript but is there a python only based solution? Even if there is, is javascript the way to go? I'm more than willing to learn javascript if needed but if not, I'd like to stay focused on python. Sorry for the basic question but I'm still clueless when it comes to web programming. Thx!
What's easiest way to get Python script output on the web?
731,477
1
7
16,918
0
javascript,python
You need Javascript in one way or another for your 30 second refresh. Alternatively, you could set a meta tag refresh for every 30 seconds to redirect to the current page, but the Javascript route will prevent page flicker.
0
0
1
0
2009-04-08T19:31:00.000
9
0.022219
false
731,470
0
0
1
3
I have a python script that runs continuously. It outputs 2 lines of info every 30 seconds. I'd like to be able to view this output on the web. In particular, I'd like the site to auto-update (add the new output at the top of the page/site every 30 seconds without having to refresh the page). I understand I can do this with javascript but is there a python only based solution? Even if there is, is javascript the way to go? I'm more than willing to learn javascript if needed but if not, I'd like to stay focused on python. Sorry for the basic question but I'm still clueless when it comes to web programming. Thx!
HTML Rich Textbox
732,453
1
4
8,362
0
javascript,python,http,pylons,widget
webkit-gtk is getting very stable, and i believe has python bindings now so technically you could use that (then your text editor merely needs to be <body contenteditable></body> and you'd be done. Unfortunately i'm not sure how complete its bindings are at present
1
0
0
0
2009-04-09T00:52:00.000
3
0.066568
false
732,429
0
0
1
1
I'm writing a web-app using Python and Pylons. I need a textbox that is rich (ie, provides the ability to bold/underline/add bullets..etc...). Does anyone know a library or widget I can use? It doesn't have to be Python/Pylons specific, as it can be a Javascript implementation as well. Thanks!
Django or Ruby on Rails
8,218,516
2
11
6,353
0
c#,python,ruby-on-rails,ruby,django
Rails is like Bible. Unless you are a Saint, you do not need to understand it and you probably will never understand; all you need to do is to believe in it.
0
0
0
0
2009-04-09T01:33:00.000
16
0.024995
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
738,453
1
11
6,353
0
c#,python,ruby-on-rails,ruby,django
Like others suggest, trying both is one good way, but really, to me, I would base it more on which language you prefer to use. Sure, if it's a web app, you'll do a lot with the framework, but "every" line of code you write will be in that language. Since both frameworks are strong, it's really more a matter of what language you'll be happiest writing code in, day in and day out. I personally use Rails and love it, but have many friends using Django. When we discuss things, time and again, it boils down more to language than framework. The languages are fairly different, and you'll typically find one you prefer a lot more than the other, at least in my opinion. I had originally thought Python sounded great, learned it, wrote a few things with it, etc., but it just never "clicked" for me. When I first saw Ruby many years ago it seemed a bit odd, but when I revisited it via Rails, it just felt so natural. When I write code in Ruby I feel like I'm pretty much writing English - if I can think of how I think the code should be written, I can pretty much type that and it works. It just fits my brain better. Community wise, you'll get a lot of different opinions. I don't think being "too big" means it's bad, nor do I think the Ruby community is by any means "too big", especially compared to say the Java community. Ruby and Rails have certainly gone mainstream to some degree, and for those of us who've worked with it for several years, it seems mainstream, but in the grand scheme of things it's actually still fairly small. Anyway, good luck, and enjoy looking into them and finding what will delight you to work with.
0
0
0
0
2009-04-09T01:33:00.000
16
0.012499
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
735,375
0
11
6,353
0
c#,python,ruby-on-rails,ruby,django
Your question must be : Python or Ruby ;)
0
0
0
0
2009-04-09T01:33:00.000
16
0
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
733,441
2
11
6,353
0
c#,python,ruby-on-rails,ruby,django
You are at a point where you cant make a bad choice! My personal preference is django, but I know for a fact rails is good too. I think the best answer is what the BFDLs of django themselves say: Try both, use whichever you like.
0
0
0
0
2009-04-09T01:33:00.000
16
0.024995
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
733,185
1
11
6,353
0
c#,python,ruby-on-rails,ruby,django
Since you're a seasoned .NET programmer, you really should look at ASP.NET and MVC before turning to Rails and Django, at least if your goal is to get up-and-running quickly. It's always easier to leverage something that you already know in-depth. I was in a similar situation recently -- I had a project that I wanted to push out on Windows and Unix, and so rather than leveraging what I know well (Ruby/Rails), I jumped ship and gave Groovy on Grails a go. It was a really rewarding experience, and I'm really glad I did a few small projects in Grails, but in the end I had a tiny fraction of the productivity I did in the environment where I had a few years' experience, even after months of hacking away on Grails. So, pick up Django, Rails, Lift, or whatever you feel like doing -- it will help expand your mind, and give you different ways to look at solving problems. But if you want to get going quickly, use what you know (.NET) on a platform designed for you (MVC).
0
0
0
0
2009-04-09T01:33:00.000
16
0.012499
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,624
0
11
6,353
0
c#,python,ruby-on-rails,ruby,django
I'm curious. If you are a C# programmer, why have you ruled out Microsoft's MVC? You have two different needs expressed in your question: 1) Want to try something new 2) Want to build community finance site quickly. I understand the desire to look at RoR or Django for need 1, but for need 2 I'd expect you would be more productive more quickly with MVC. Please note I am not saying that EVERYONE would be more productive more quickly nor am I saying that Microsoft's MVP is inherently more productive, just that someone who is currently a C# programmer would be able to come up to speed more quickly on something that uses C#...
0
0
0
0
2009-04-09T01:33:00.000
16
0
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,604
2
11
6,353
0
c#,python,ruby-on-rails,ruby,django
i'm another C#/.net guy with the same itch to tinker. Django is appealing. Though the development is easy and fun, i've heard some stories about deployment and configuration headaches with both Rails and Django (mostly rails). It's not like just throwing an asp.net app at IIS or PHP at Apache. For those things you can set it and forget it. I'd be curious to get c.batt's comments on his/her experince with deploying django. Lately I've been looking at Grails. It uses Groovy which is ruby like. It's very easy to develop in and you can build apps as fast as Rails but you get access to the Java platform via the JVM which could come in handy. There's a ton of open source java components you could drop into your Grails app, plenty of the types of components you'd be looking for. It's really not like building a java app. So far it does feel like Rails. Good luck.
0
0
0
0
2009-04-09T01:33:00.000
16
0.024995
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,712
6
11
6,353
0
c#,python,ruby-on-rails,ruby,django
I just finished building a small social networking site with Django for a client. I was new to Python and new to Django, but it was one of the most enjoyable development experiences I've had in a while (even with the headaches of being new to a language and framework). And it only took two weeks. If you're building this for yourself then I would try both Rails and Django (or one of the other frameworks that c.batt mentioned) to see what feels the most comfortable. I ended up choosing Django/Python because I liked the language. It felt clean and efficient, and you can't argue with the speed at which you can get a bare-bones site up and running. As mentioned previously, Pinax is great. If anything you get a solid base to build on top of. I found that I had to extend parts of it to get exactly what I wanted, and a couple of sections I decided to code from scratch because the changes would get "hacky" to match what I needed. Other parts, however, are perfect. The private messaging was used out of the box, just with some new templates to match the site.
0
0
0
0
2009-04-09T01:33:00.000
16
1
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,574
6
11
6,353
0
c#,python,ruby-on-rails,ruby,django
funny... I'm in the same boat, though perhaps I've been looking around for a bit longer. I came in from MS-land (C# too) and I went with Django, but only after I tinkered around with Google's AppEngine, which re-introduced me to Python. Django is well organized, internally consistent (as far as I could tell), and well supported with a vibrant community. Python is well organized, internally consistent (as far as I can tell), and extremely well supported with an amazing community. Anyhow, there's more to rapid Python web development than Django. You might want to search for: python wsgi framework. Pylons and TurboGears offer enormous flexibility and focus on "best of breed" components, web2py appears to have a very cool DAL/ORM that I'm itching to dig into, and web.py and werkzeug (amongst others) are minimalistic and don't try to dictate how you should build your app. And if you're sticking with Django, definitely check out the Pinax project - it might help kickstart your development efforts.
0
0
0
0
2009-04-09T01:33:00.000
16
1
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
733,369
7
11
6,353
0
c#,python,ruby-on-rails,ruby,django
I like Django better because it's less magic, with Rails i feel they pushed the convention over configuration principle too far, so i prefer the more explicit nature of Django.
0
0
0
0
2009-04-09T01:33:00.000
16
1
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,489
10
11
6,353
0
c#,python,ruby-on-rails,ruby,django
If you want a quick stack check out Sinatra. Django will make more sense faster. It has awesome routing, simple file structure, nice clean syntax, not a lot of WTF moments, and understandable ORM functionality. Rails you will have to dive into. You will battle activerecord. You will try to wrap your head around the many facets of a rails application. I like them both. Try them both out. They don't take that long to get a feel for. You should ultimately base your decision on a per-app basis and factor in which language has better modules/extensions/gems for what you need.
0
0
0
0
2009-04-09T01:33:00.000
16
1
false
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Django or Ruby on Rails
732,557
20
11
6,353
0
c#,python,ruby-on-rails,ruby,django
I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). If you think you'll need libraries like NumPy or SciPy, probably best to stick with python/django. I've struggled to find ruby equivalents. However, the RoR community seems to be much bigger Bigger is of course not going to be better. I've had great experiences with the django community in terms of support, and the pluggable app ecosystem is maturing quite quickly. I would also add that I find the django documentation to be very easy to follow.
0
0
0
0
2009-04-09T01:33:00.000
16
1.2
true
732,476
0
0
1
12
I'm a C#/.NET developer looking to mess around with something completely different - something LAM(*) stackish for building web apps quickly. I'm thinking either Django or Rails. I kind of like the Python language better and it seems to be more full-featured than Ruby for statistical, scientific and networking (let me know if you think this is wrong). However, the RoR community seems to be much bigger - which might make it a safer bet. Do you think this is important? Anybody have experience with both RoR and Django? Update: Specifically I'm looking to be able to build a community finance oriented site quickly. There are definitely a lot of Ruby Gems to speed up the process, but I noticed Pinax on the Django side which looks promising. I know that Python is already fairly popular for financial/mathematical programming. Anyone else have an opinion? Update 2: Noticed some comments about ASP.NET MVC. I have in fact done pretty significant work with ASP.NET MVC - a LOB app for Medical Equipment Servicing, and I loved it. It is IMHO a much better and more intuitive way to write web apps compared with ASP.NET web forms. But, I'm really looking for a non-.NET development environment to develop some chops in.
Getting started with Django-Instant Django
3,727,548
2
0
1,541
0
python,django
InstantDjango uses sqlite by default. What database did you set your normal django to use? and you did you create that database before you ran the syncdb? InstantDjango uses different packaging for all the django required libraries (portable versions) which might be less stable but they should work for your development needs.
0
0
0
0
2009-04-10T18:22:00.000
1
0.379949
false
738,433
0
0
1
1
I've been trying to get Django running and when going through the intro to projects it seems that I keep having trouble when I get to the 'sync database' section. When using InstantDjango this doesn't seem to be as much of a problem. My question is, can one just do Django development with the InstantDjango program or do you really need to run it the normal way?
Django models - how to filter out duplicate values by PK after the fact?
744,439
0
6
8,768
0
python,django,data-structures,set,unique
If the order doesn't matter, use a dict.
0
0
0
0
2009-04-13T16:20:00.000
6
0
false
744,424
0
0
1
1
I build a list of Django model objects by making several queries. Then I want to remove any duplicates, (all of these objects are of the same type with an auto_increment int PK), but I can't use set() because they aren't hashable. Is there a quick and easy way to do this? I'm considering using a dict instead of a list with the id as the key.
How to retrieve google appengine entities using their numerical id?
760,060
0
3
1,494
0
python,google-app-engine
Turns out I needed to do key = Key.from_path( Application_ModelName, numeric_id ) wasn't clear till i looked at the dict() of an entity
0
1
0
0
2009-04-17T09:39:00.000
4
0
false
759,771
0
0
1
1
Is it possible to retrieve an entity from google appengine using their numerical IDs and if so how? I tried using: key = Key.from_path("ModelName", numericalId) m = ModelName.get(key) but the key generated wasnt correct.
How do I modify sys.path from .htaccess to allow mod_python to see Django?
764,769
1
4
1,417
0
python,django,apache,.htaccess,mod-python
You're using mod_python wrong. It was never intended to serve python web applications. You should be using WSGI for this... or at least FastCGI.
0
0
0
1
2009-04-18T22:02:00.000
3
0.066568
false
764,312
0
0
1
1
The host I'm considering for hosting a Django site has mod_python installed, but does not have Django. Django's INSTALL file indicates that I can simply copy the django directory to Python's site-packages directory to install Django, so I suspect that it might be possible to configure Python / mod_python to look for it elsewhere (namely my user space) by modifying sys.path, but I don't know how to change it from .htaccess or mod_python. How do I modify sys.path from .htaccess to allow mod_python to see Django? P.S. I can only access the site via FTP (i.e. no shell access). I realize that it sounds like I should just switch hosts, but there are compelling reasons for me to make this work so I'm at least going to try.
Amazon S3 permissions
766,030
1
10
4,305
1
python,django,amazon-web-services,amazon-s3
You will have to build the whole access logic to S3 in your applications
0
0
1
0
2009-04-19T19:51:00.000
4
0.049958
false
765,964
0
0
1
3
Trying to understand S3...How do you limit access to a file you upload to S3? For example, from a web application, each user has files they can upload, but how do you limit access so only that user has access to that file? It seems like the query string authentication requires an expiration date and that won't work for me, is there another way to do this?
Amazon S3 permissions
768,090
8
10
4,305
1
python,django,amazon-web-services,amazon-s3
Have the user hit your server Have the server set up a query-string authentication with a short expiration (minutes, hours?) Have your server redirect to #2
0
0
1
0
2009-04-19T19:51:00.000
4
1
false
765,964
0
0
1
3
Trying to understand S3...How do you limit access to a file you upload to S3? For example, from a web application, each user has files they can upload, but how do you limit access so only that user has access to that file? It seems like the query string authentication requires an expiration date and that won't work for me, is there another way to do this?
Amazon S3 permissions
768,050
14
10
4,305
1
python,django,amazon-web-services,amazon-s3
There are various ways to control access to the S3 objects: Use the query string auth - but as you noted this does require an expiration date. You could make it far in the future, which has been good enough for most things I have done. Use the S3 ACLS - but this requires the user to have an AWS account and authenticate with AWS to access the S3 object. This is probably not what you are looking for. You proxy the access to the S3 object through your application, which implements your access control logic. This will bring all the bandwidth through your box. You can set up an EC2 instance with your proxy logic - this keeps the bandwidth closer to S3 and can reduce latency in certain situations. The difference between this and #3 could be minimal, but depends your particular situation.
0
0
1
0
2009-04-19T19:51:00.000
4
1
false
765,964
0
0
1
3
Trying to understand S3...How do you limit access to a file you upload to S3? For example, from a web application, each user has files they can upload, but how do you limit access so only that user has access to that file? It seems like the query string authentication requires an expiration date and that won't work for me, is there another way to do this?
importing gaeutilities or any other module by dev_appserver
771,165
1
0
803
0
python,google-app-engine,import
Strange. I would start troubleshooting by making 100% sure that the sys.path that dev_appserver.py uses does include C:\Python25\Lib\site-packages\gaeutilities-1.2.1. I suggest you display sys.path in a HTML view served by dev_appserver.py. Check permissions on gaeutilities-1.2.1 directory and subdirectories. Perhaps the python interpreter is unable to create *.pyc files or something like that. Another suggestion: Put the appengines_utilities folder in your application directory (the directory that contains your app.yaml file). I guess you need all third-party stuff there anyway if you want to upload the code to google's servers.
0
1
0
0
2009-04-20T22:39:00.000
1
1.2
true
770,385
0
0
1
1
I'm developing a gae application on a windows machine. to have session handling I downloaded gaeutilities and added its path (C:\Python25\Lib\site-packages\gaeutilities-1.2.1) to the registry ("PythonPath" item under python25). in my code this is how I import the gaeutilities Session class: from appengine_utilities.sessions import Session when gae engine (dev_appserver.py) tries to import it, an exception is raised, stating an importerror and "no module named appengine_utilities.sessions" on the other hand, pyscripter can find the module (autocomplete becomes available for the Session class), and I can import the module within the python interpreter (the same one that dev_appserver uses, python 2.5.4). for a remedy, I created a PYTHONPATH environmental variable and also added the path to it. nothing changes. I'm lost. what am I doing wrong? important edit: I have found myself to be totally unable to import any 3rd party gae modules. PYTHONPATH is correct, sys.path is correct, registry is correct, still dev_appserver complains of importerror.
What is the best secure way to allow a user to delete a model instance that they added to the db?
771,066
0
0
216
0
python,django
Have the user submit a POST request to delete that model instance. These kinds of changes should never be possible via GET requests, so that people can't link each other to unwittingly performing changes on the site. In your view, check that request.user is the same as the author of that particular model instance. You could also check that the HTTP_REFERRER is not set to another site if you were really worried. Your security issue here is Cross Site Request Forgery. Django provides CsrfMiddleware which will actually add security to your forms to prevent this kind of attack. But it only works as long as you're not allowing permanent changes to take place via GET requests.
0
0
0
0
2009-04-20T23:00:00.000
2
0
false
770,427
0
0
1
1
I would like to give users access to delete a model instance that they added to the db. In the django docs it says allowing someone to delete from the template is not a good practice. Is there a secure way to let a user click a "delete this" link from the template and remove that model instance? How should I go about doing that?
Django payment processing
850,508
2
24
8,276
0
python,django
Django paypal is very cool. I've used in on couple of my projects. It is relatively easy to integrate with an existing website. Satchmo is good, if you want a full internet store, but if you want to sell just couple items from your website, which is devoted to something else, you will find Satchmo to be very heavy (a lot of dependencies to install, really complicates your admin).
0
0
0
0
2009-04-21T12:05:00.000
6
0.066568
false
772,240
0
0
1
1
Can anyone suggest any good payment processing libraries for python/django?
How do I set up a model to use an AutoField with a legacy database in Python?
778,346
2
1
454
1
python,django,oracle,autofield
The DB is responsible for managing the value of the ID. If you want to use AutoField, you have to change the column in the DB to use that. Django is not responsible for managing the generated ID
0
0
0
0
2009-04-22T15:18:00.000
1
1.2
true
777,778
0
0
1
1
I have a legacy database with an integer set as a primary key. It was initially managed manually, but since we are wanting to move to django, the admin tool seemed to be the right place to start. I created the model and am trying to set the primary key to be an autofield. It doesn't seem to be remembering the old id in updates, and it doesn't create new id's on insert. What am I doing wrong?