A_Id
int64
518
72.5M
Users Score
int64
-42
283
AnswerCount
int64
1
55
Tags
stringlengths
6
105
Networking and APIs
int64
0
1
Data Science and Machine Learning
int64
0
1
Available Count
int64
1
15
is_accepted
bool
2 classes
CreationDate
stringlengths
23
23
Web Development
int64
1
1
Title
stringlengths
11
150
Score
float64
-1
1.2
Other
int64
0
1
Database and SQL
int64
0
1
Q_Score
int64
0
1.39k
Python Basics and Environment
int64
0
1
Answer
stringlengths
14
4.78k
Question
stringlengths
17
21k
ViewCount
int64
17
1.71M
Q_Id
int64
469
42.4M
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
0
1
518
6
4
python,macos,fonts,photoshop
0
0
2
false
2008-08-02T15:11:00.000
1
How can I find the full path to a font from its display name on a Mac?
1
1
0
47
0
I haven't been able to find anything that does this directly. I think you'll have to iterate through the various font folders on the system: /System/Library/Fonts, /Library/Fonts, and there can probably be a user-level directory as well ~/Library/Fonts.
I am using the Photoshop's javascript API to find the fonts in a given PSD. Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc. This is all happening in a python program running on OSX so I guess I'm looking for one of: Some Photoshop javascript A Python function An OSX API that I can call from python
4,225
469
0
0
3,040
21
4
python,macos,fonts,photoshop
0
0
2
true
2008-08-02T15:11:00.000
1
How can I find the full path to a font from its display name on a Mac?
1.2
1
0
47
0
Unfortunately the only API that isn't deprecated is located in the ApplicationServices framework, which doesn't have a bridge support file, and thus isn't available in the bridge. If you're wanting to use ctypes, you can use ATSFontGetFileReference after looking up the ATSFontRef. Cocoa doesn't have any native support, at least as of 10.5, for getting the location of a font.
I am using the Photoshop's javascript API to find the fonts in a given PSD. Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc. This is all happening in a python program running on OSX so I guess I'm looking for one of: Some Photoshop javascript A Python function An OSX API that I can call from python
4,225
469
0
0
21,149
0
3
asp.net,ironpython
0
0
1
false
2008-08-15T20:17:00.000
1
IronPython and ASP.NET
0
0
0
7
0
Keep a look out for ASP.NET MVC The IronRuby guys have got some internal builds of MVC to work with IronRuby, and IronPython 2 and IronRuby have a lot of code in common with the DLR. I'm not sure if they'll support IronPython/IronRuby when MVC is released, but it's definitely worth keeping your eye on anyway - The old ASP.NET forms-based development model is old, busted, and the sooner it goes away the better.
Has anyone built a website with IronPython and ASP.NET. What were your experiences and is the combination ready for prime-time?
634
12,692
0
0
19,700
1
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0.024995
0
0
6
1
I think the language itself is not an issue here, as python is really nice high level language with good and easy to find, thorough documentation. From what I've seen, the Django framework is also a great tooklit for web development, giving much the same developer performance boost Rails is touted to give. The real issue is at the maintenance and management level. How will this move fragment the maintenance between PHP and Python code. Is there a need to migrate existing code from one platform to another? What problems will adopting Python and Django solve that you have in your current development workflow and frameworks, etc.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,715
14
8
php,python
0
0
8
true
2008-08-21T11:48:00.000
1
Introducing Python
1.2
0
0
6
1
I recently introduced Python to my company, which does consulting work for the Post Office. I did this by waiting until there was a project for which I would be the only programmer, then getting permission to do this new project in Python. I then did another small project in Python with similarly impressive results. In addition, I used Python for all of my small throwaway assignments ("can you parse the stats in these files into a CSV file organized by date and site?", etc) and had a quick turnaround time on all of them. I also evangelized Python a bit; I went out of my way to NOT be obnoxious about it, but I'd occasionally describe why I liked it so much, talked about the personal projects I use it for in my free time and why it's awesome for me, etc. Eventually we started another project and I convinced everyone to use Python for it. I took care to point everyone to a lot of documentation, including the specific webpages relating to what they were working on, and every time they had a question, I'd explain how to do things properly by explaining the Pythonic approach to things, etc. This has worked really well. However, this might be somewhat different than what you're describing. In my case I started with moderately small projects and Python is only being used for new projects. Also, none of my co-workers were really Perl or PHP gurus; they all knew those languages and had been using them for awhile, but it didn't take much effort for them to become more productive in Python than they'd been before. So if you're talking about new projects with people who currently use PHP but aren't super-experts and don't love that language, then I think switching to Python is a no-brainer. However, if you're talking about working with a large existing PHP code base with a lot of very experienced PHP programmers who are happy with their current setup, then switching languages is probably not a good idea. You're probably somewhere in between, so you'll have to weigh the tradeoffs; hopefully my answer will help you do that.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,943
0
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0
0
0
6
1
I love Python and Django, and use both to develop the our core webapps. That said, it's hard to make a business case for switching at this point. Specifically: Any new platform is risky compared to staying with the tried and true You'll have the developer fragmentation you mentioned It's far easier to find PHP programmers than python programmers Moreover, as other posters have mention, if the issue is more with spaghetti code than PHP itself, there are plenty of nice PHP frameworks that could be used to refactor the code. That said, if this developer is excited about python, stopping them outright is probably demoralizing. My suggestion would be to encourage them to develop in python, but not the mission critical parts of the app. Instead they could write some utility scripts, some small internal application that needs doing, etc. In conclusion: I don't recommend switching from PHP, but I do recommend accommodating the developer's interest in some way at work.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,968
1
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0.024995
0
0
6
1
It's really all about schedules. To me the break should be with a specific project. If you decide your direction is Django then start new projects with that. Before you start a new project with a new language/framework, either make sure that you have scheduled time to get up to speed in this new direction, or get up to speed before using on new projects. I would avoid going with a tool of the month. Make sure you want it to be your direction and commit some time/resources to learning enough to make a good decision.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,685
0
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0
0
0
6
1
I don't think it's a matter of a programming language as such. What is the proficiency level of PHP in the team you're talking about? Are they doing spaghetti code or using some structured framework like Zend? If this is the first case then I absolutely understand the guy's interest in Python and Django. It this is the latter, it's just a hype.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,692
2
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0.049958
0
0
6
1
@darkdog: Using a new language in production code is about more than easy syntax and high-level capability. You want to be familiar with core APIs and feel like you can fix something through logic instead of having to comb through the documentation. I'm not saying transitioning to Python would be a bad idea for this company, but I'm with John--keep things simple during the transition. The new lead will appreciate having a say in such decisions. If you'd really, really, really like to introduce Python, consider writing some extensions or utilities in straight-up Python or in the framework. You won't be upsetting your core initiatives, so it will be a low/no-risk opportunity to prove the merits of a switch.
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,668
4
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0.099668
0
0
6
1
If the mandate of the new lead is to put the house in order, the current situation should likely be simplified as much as possible prior. If I had to bring things to order, I wouldn't want to have to manage an ongoing language conversion project on top of everything else, or at least I'd like some choice when initiating the project. When making your recommendation, did you think about the additional managerial complexity that coming into the middle of a conversion would entail?
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
19,665
0
8
php,python
0
0
8
false
2008-08-21T11:48:00.000
1
Introducing Python
0
0
0
6
1
Well, python is a high level language.. its not hard to learn and if the guys already have programming knowledge it should be much easier to learn.. i like django.. i think it should be a nice try to use django ..
The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now. How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company. Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them.
651
19,654
0
0
7,826,363
7
9
java,python,garbage-collection
0
0
4
false
2008-08-22T07:35:00.000
1
Why Java and Python garbage collection methods are different?
1
0
0
65
1
One big disadvantage of Java's tracing GC is that from time to time it will "stop the world" and freeze the application for a relatively long time to do a full GC. If the heap is big and the the object tree complex, it will freeze for a few seconds. Also each full GC visits the whole object tree over and over again, something that is probably quite inefficient. Another drawback of the way Java does GC is that you have to tell the jvm what heap size you want (if the default is not good enough); the JVM derives from that value several thresholds that will trigger the GC process when there is too much garbage stacking up in the heap. I presume that this is actually the main cause of the jerky feeling of Android (based on Java), even on the most expensive cellphones, in comparison with the smoothness of iOS (based on ObjectiveC, and using RC). I'd love to see a jvm option to enable RC memory management, and maybe keeping GC only to run as a last resort when there is no more memory left.
Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time. Why does Java choose this strategy and what is the benefit from this? Is this better than the Python approach?
20,044
21,934
0
0
74,327
6
9
java,python,garbage-collection
0
0
4
false
2008-08-22T07:35:00.000
1
Why Java and Python garbage collection methods are different?
1
0
0
65
1
Garbage collection is faster (more time efficient) than reference counting, if you have enough memory. For example, a copying gc traverses the "live" objects and copies them to a new space, and can reclaim all the "dead" objects in one step by marking a whole memory region. This is very efficient, if you have enough memory. Generational collections use the knowledge that "most objects die young"; often only a few percent of objects have to be copied. [This is also the reason why gc can be faster than malloc/free] Reference counting is much more space efficient than garbage collection, since it reclaims memory the very moment it gets unreachable. This is nice when you want to attach finalizers to objects (e.g. to close a file once the File object gets unreachable). A reference counting system can work even when only a few percent of the memory is free. But the management cost of having to increment and decrement counters upon each pointer assignment cost a lot of time, and some kind of garbage collection is still needed to reclaim cycles. So the trade-off is clear: if you have to work in a memory-constrained environment, or if you need precise finalizers, use reference counting. If you have enough memory and need the speed, use garbage collection.
Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time. Why does Java choose this strategy and what is the benefit from this? Is this better than the Python approach?
20,044
21,934
0
0
21,964
54
9
java,python,garbage-collection
0
0
4
true
2008-08-22T07:35:00.000
1
Why Java and Python garbage collection methods are different?
1.2
0
0
65
1
There are drawbacks of using reference counting. One of the most mentioned is circular references: Suppose A references B, B references C and C references B. If A were to drop its reference to B, both B and C will still have a reference count of 1 and won't be deleted with traditional reference counting. CPython (reference counting is not part of python itself, but part of the C implementation thereof) catches circular references with a separate garbage collection routine that it runs periodically... Another drawback: Reference counting can make execution slower. Each time an object is referenced and dereferenced, the interpreter/VM must check to see if the count has gone down to 0 (and then deallocate if it did). Garbage Collection does not need to do this. Also, Garbage Collection can be done in a separate thread (though it can be a bit tricky). On machines with lots of RAM and for processes that use memory only slowly, you might not want to be doing GC at all! Reference counting would be a bit of a drawback there in terms of performance...
Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time. Why does Java choose this strategy and what is the benefit from this? Is this better than the Python approach?
20,044
21,934
0
0
46,780
4
9
java,python,garbage-collection
0
0
4
false
2008-08-22T07:35:00.000
1
Why Java and Python garbage collection methods are different?
0.088656
0
0
65
1
Reference counting is particularly difficult to do efficiently in a multi-threaded environment. I don't know how you'd even start to do it without getting into hardware assisted transactions or similar (currently) unusual atomic instructions. Reference counting is easy to implement. JVMs have had a lot of money sunk into competing implementations, so it shouldn't be surprising that they implement very good solutions to very difficult problems. However, it's becoming increasingly easy to target your favourite language at the JVM.
Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time. Why does Java choose this strategy and what is the benefit from this? Is this better than the Python approach?
20,044
21,934
0
0
23,041
0
3
python,ruby,semantics,zemanta
0
0
1
false
2008-08-22T10:51:00.000
1
How do content discovery engines, like Zemanta and Open Calais work?
0
0
0
5
0
Open Calais probably use language parsing technology and language statics to guess which words or phrases are Names, Places, Companies, etc. Then, it is just another step to do some kind of search for those entities and return meta data. Zementa probably does something similar, but matches the phrases against meta-data attached to images in order to acquire related results. It certainly isn't easy.
I was wondering how as semantic service like Open Calais figures out the names of companies, or people, tech concepts, keywords, etc. from a piece of text. Is it because they have a large database that they match the text against? How would a service like Zemanta know what images to suggest to a piece of text for instance?
2,346
22,059
0
0
5,942,466
2
13
python,django,apache,hosting
0
0
3
false
2008-08-25T13:28:00.000
1
Cleanest & Fastest server setup for Django
0.03076
0
0
47
0
In my opinion best/fastest stack is varnish-nginx-uwsgi-django. And I'm successfully using it.
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: Easy to set up Fast and easy on resources Can serve mediafiles Able to serve multiple djangosites on same server I would rather not install PHP or anything else that sucks resources, and for which I have no use for. I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone? @Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives? @BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-) UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice?
24,076
26,025
0
0
26,185
1
13
python,django,apache,hosting
0
0
3
false
2008-08-25T13:28:00.000
1
Cleanest & Fastest server setup for Django
0.015383
0
0
47
0
If you're using lighthttpd, you can also use FastCGI for serving Django. I'm not sure how the speed compares to mod_wsgi, but if memory serves correctly, you get a couple of the benefits that you would get with mod_wsgi that you wouldn't get with mod_python. The main one being that you can give each application its own process (which is really helpful for keeping memory of different apps separated as well as for taking advantage of multi-core computers. Edit: Just to add in regards to your update about nginix, if memory serves correctly again, nginix uses "greenlets" to handle concurrency. This means that you may need to be a little bit more careful to make sure that one app doesn't eat up all the server's time.
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: Easy to set up Fast and easy on resources Can serve mediafiles Able to serve multiple djangosites on same server I would rather not install PHP or anything else that sucks resources, and for which I have no use for. I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone? @Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives? @BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-) UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice?
24,076
26,025
0
0
29,748
27
13
python,django,apache,hosting
0
0
3
true
2008-08-25T13:28:00.000
1
Cleanest & Fastest server setup for Django
1.2
0
0
47
0
Since I was looking for some more in-depth answers, I decided to research the issue myself in depth. Please let me know if I've misunderstood anything. Some general recommendation are to use a separate webserver for handling media. By separate, I mean a webserver which is not running Django. This server can be for instance: Lighttpd (Lighty) Nginx (EngineX) Or some other light-weight server Then, for Django, you can go down different paths. You can either: Serve Django via Apache and: mod_python This is the stable and recommended/well documented way. Cons: uses a lot of memory. mod_wsgi From what I understand, mod_wsgi is a newer alternative. It appears to be faster and easier on resources. mod_fastcgi When using FastCGI you are delegating the serving of Django to another process. Since mod_python includes a python interpreter in every request it uses a lot of memory. This is a way to bypass that problem. Also there is some security concerns. What you do is that you start your Django FastCGI server in a separate process and then configures apache via rewrites to call this process when needed. Or you can: Serve Django without using Apache but with another server that supports FastCGI natively: (The documentation mentions that you can do this if you don't have any Apache specific needs. I guess the reason must be to save memory.) Lighttpd This is the server that runs Youtube. It seems fast and easy to use, however i've seen reports on memoryleaks. nginx I've seen benchmarks claiming that this server is even faster than lighttpd. It's mostly documented in Russian though. Another thing, due to limitations in Python your server should be running in forked mode, not threaded. So this is my current research, but I want more opinions and experiences.
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: Easy to set up Fast and easy on resources Can serve mediafiles Able to serve multiple djangosites on same server I would rather not install PHP or anything else that sucks resources, and for which I have no use for. I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone? @Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives? @BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-) UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice?
24,076
26,025
0
0
31,384
1
5
python,macos,64-bit
0
0
4
true
2008-08-27T10:22:00.000
1
Install Python to match directory layout in OS X 10.5
1.2
0
0
4
0
Personally, I wouldn't worry about it until you see a problem. Messing with the default python install on a *Nix system can cause more trouble than it's worth. I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it. You can also add a second python installation, but that also causes more problems than it's worth IMO. So I suppose the best question to start out with would be why exactly do you want to use the 64 bit version of python?
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
1
31,331
0
5
python,macos,64-bit
0
0
4
false
2008-08-27T10:22:00.000
1
Install Python to match directory layout in OS X 10.5
0
0
0
4
0
Essentially, yes. I was not sure you could do it like that (current version does not do it like that). When using the python install script, however, there is no option (that I can find) to specify where to put directories and files (eg --prefix). I was hoping to match the current layout of python related files so as to avoid 'polluting' my machine with redundant files.
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
1
30,591
1
5
python,macos,64-bit
0
0
4
false
2008-08-27T10:22:00.000
1
Install Python to match directory layout in OS X 10.5
0.039979
0
0
4
0
Not sure I entirely understand your question, but can't you simply build and install a 64 bit version and then create symbolic links so that /Library/Python/2.5 and below point to your freshly built version of python?
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
1
31,425
0
5
python,macos,64-bit
0
0
4
false
2008-08-27T10:22:00.000
1
Install Python to match directory layout in OS X 10.5
0
0
0
4
0
The short answer is because I can. The long answer, expanding on what the OP said, is to be more compatible with apache and mysql/postgresql. They are all 64bit (apache is a fat binary with ppc, ppc64 x86 and x86 and x86_64, the others just straight 64bit). Mysqldb and mod_python wont compile unless they are all running the same architecture. Yes I could run them all in 32bit (and have in the past) but this is much more work then compiling one program. EDIT: You pretty much convinced though to just let the installer do its thing and update the PATH to reflect this.
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
1
38,646
0
8
python,html
0
0
2
false
2008-09-01T05:25:00.000
1
Filter out HTML tags and resolve entities in python
0
0
0
18
1
Looking at the amount of sense people are demonstrating in other answers here, I'd say that using a regex probably isn't the best idea for your situation. Go for something tried and tested, and treat my previous answer as a demonstration that regexes need not be that scary.
Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python.
25,958
37,486
0
0
37,604
0
8
python,html
0
0
2
false
2008-09-01T05:25:00.000
1
Filter out HTML tags and resolve entities in python
0
0
0
18
1
Regular expressions are not scary, but writing your own regexes to strip HTML is a sure path to madness (and it won't work, either). Follow the path of wisdom, and use one of the many good HTML-parsing libraries. Lucas' example is also broken because "sub" is not a method of a Python string. You'd have to "import re", then call re.sub(pattern, repl, string). But that's neither here nor there, as the correct answer to your question does not involve writing any regexes.
Because regular expressions scare me, I'm trying to find a way to remove all HTML tags and resolve HTML entities from a string in Python.
25,958
37,486
0
0
72,249
4
4
python,django,url,django-urls
0
0
1
false
2008-09-04T07:36:00.000
1
How to generate urls in django
0.197375
0
0
35
0
Be aware that using reverse() requires that your urlconf module is 100% error free and can be processed - iow no ViewDoesNotExist errors or so, or you get the dreaded NoReverseMatch exception (errors in templates usually fail silently resulting in None).
In Django's template language, you can use {% url [viewname] [args] %} to generate a URL to a specific view with parameters. How can you programatically do the same in Python code? What I need is to create a list of menu items where each item has name, URL, and an active flag (whether it's the current page or not). This is because it will be a lot cleaner to do this in Python than the template language.
37,259
43,290
0
0
48,479
1
5
python,sql,metadata,coupling,data-driven
0
0
1
false
2008-09-04T08:53:00.000
1
A python web application framework for tight DB/GUI coupling?
0.039979
0
0
11
0
I know that you specificity ask for a framework but I thought I would let you know about what I get up to here. I have just undergone converting my company's web application from a custom in-house ORM layer into sqlAlchemy so I am far from an expert but something that occurred to me was that sqlAlchemy has types for all of the attributes it maps from the database so why not use that to help output the right html onto the page. So we use sqlAlchemy for the back end and Cheetah templates for the front end but everything in between is basically our own still. We have never managed to find a framework that does exactly what we want without compromise and prefer to get all the bits that work right for us and write the glue our selves. Step 1. For each data type sqlAlchemy.types.INTEGER etc. Add an extra function toHtml (or many maybe toHTMLReadOnly, toHTMLAdminEdit whatever) and just have that return the template for the html, now you don't even have to care what data type your displaying if you just want to spit out a whole table you can just do (as a cheetah template or what ever your templating engine is). Step 2 <table> <tr> #for $field in $dbObject.c: <th>$field.name</th> #end for </tr> <tr> #for $field in dbObject.c: <td>$field.type.toHtml($field.name, $field.value)</td> #end for </tr> </table> Using this basic method and stretching pythons introspection to its potential, in an afternoon I managed to make create read update and delete code for our whole admin section of out database, not yet with the polish of django but more then good enough for my needs. Step 3 Discovered the need for a third step just on Friday, wanted to upload files which as you know needs more then just the varchar data types default text box. No sweat, I just overrode the rows class in my table definition from VARCHAR to FilePath(VARCHAR) where the only difference was FilePath had a different toHtml method. Worked flawlessly. All that said, if there is a shrink wrapped one out there that does just what you want, use that. Disclaimer: This code was written from memory after midnight and probably wont produce a functioning web page.
I'm a firm believer of the heretic thought of tight coupling between the backend and frontend: I want existing, implied knowledge about a backend to be automatically made use of when generating user interfaces. E.g., if a VARCHAR column has a maximum with of 20 characters, there GUIs should automatically constrain the user from typing more than 20 characters in a related form field. And I have strong antipathy to ORMs which want to define my database tables, or are based on some hack where every table needs to have extra numeric ID columns because of the ORM. I've looked a bit into Python database frameworks and I think I can conclude the SQLAlchemy fits best to my mentality. Now, I need to find a web application framework which fits naturally with SQLAlchemy (or an equivalent) and perhaps even with my appetite for coupling. With "web application framework", I mean products/project such as Pyhons, Django, TurboGears, web2py, etc. E.g., it should ideally be able to: automatically select a suitable form widget for data entering a given column if told to do so; e.g., if the column has a foreign key to a column with 10 different values, widget should display the 10 possible values as a dropdown auto-generate javascript form validation code which gives the end-user quick error feedback if a string is entered into a field which is about to end up in an INTEGER column, etc auto-generate a calendar widget for data which will end up in a DATE column hint NOT NULL constraints as javascript which complains about empty or whitespace-only data in a related input field generate javascript validation code which matches relevant (simple) CHECK-constraints make it easy to avoid SQL injection, by using prepared statements and/or validation of externally derived data make it easy to avoid cross site scripting by automatically escape outgoing strings when appropriate make use of constraint names to generate somewhat user friendly error messages in case a constrataint is violated All this should happen dynamically, so table adjustments are automatically reflected on the frontend - probably with a caching mechanism, so that all the model introspection wouldn't kill performance. In other words, I don't want to repeat my model definition in an XML file (or alike) when it has already been carefully been defined in my database. Does such a framework exist for Python (or for any language, for that matter)? If not: Which of the several Python web application frameworks will be least in the way if I were to add parts of the above features myself?
2,785
43,368
0
0
427,643
1
6
python,django
0
0
1
false
2008-09-04T16:36:00.000
1
Project design / FS layout for large django projects
0.033321
0
0
44
0
My current layout stems from me wanting to have a test-version of my sites. This means having two projects for every site, since they need different configurations, and forces me to move all the applications out of the projects. I've created two folders: $APP_ROOT/devel and $APP_ROOT/prod. These contain all the apps. Using source control (in my case git) I have the apps in devel at the HEAD revision, while the apps in prod are locked to the PROD tag. The templates also have their own folder with the same layout as the apps. Now I'm able to do all my development in the devel-apps folder and the matching template-folder. When I have something I'm happy with, I tag that revision and update prod.
What is the best way to layout a large django project? The tutorials provide simple instructions for setting up apps, models, and views, but there is less information about how apps and projects should be broken down, how much sharing is allowable/necessary between apps in a typical project (obviously that is largely dependent on the project) and how/where general templates should be kept. Does anyone have examples, suggestions, and explanations as to why a certain project layout is better than another? I am particularly interested in the incorporation of large numbers of unit tests (2-5x the size of the actual code base) and string externalization / templates.
7,973
44,135
0
0
100,464
3
5
python,django,session,caching,mongodb
0
0
3
false
2008-09-08T20:16:00.000
1
Django Sessions
0.119427
0
0
38
0
One thing that has to be considered when choosing session backend is "how often session data is modified"? Even sites with moderate traffic will suffer if session data is modified on each request, making many database trips to store and retrieve data. In my previous work we used memcache as session backend exclusively and it worked really well. Our administrative team put really great effort in making two special memcached instances stable as a rock, but after bit of twiddling with initial setup, we did not have any interrupts of session backends operations.
I'm looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them?
12,358
50,568
0
0
326,046
1
5
python,django,session,caching,mongodb
0
0
3
false
2008-09-08T20:16:00.000
1
Django Sessions
0.039979
0
0
38
0
If the database have a DBA that isn't you, you may not be allowed to use a database-backed session (it being a front-end matter only). Until django supports easily merging data from several databases, so that you can have frontend-specific stuff like sessions and user-messages (the messages in django.contrib.auth are also stored in the db) in a separate db, you need to keep this in mind.
I'm looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them?
12,358
50,568
0
0
50,668
25
5
python,django,session,caching,mongodb
0
0
3
false
2008-09-08T20:16:00.000
1
Django Sessions
1
0
0
38
0
The filesystem backend is only worth looking at if you're not going to use a database for any other part of your system. If you are using a database then the filesystem backend has nothing to recommend it. The memcache backend is much quicker than the database backend, but you run the risk of a session being purged and some of your session data being lost. If you're a really, really high traffic website and code carefully so you can cope with losing a session then use memcache. If you're not using a database use the file system cache, but the default database backend is the best, safest and simplest option in almost all cases.
I'm looking at sessions in Django, and by default they are stored in the database. What are the benefits of filesystem and cache sessions and when should I use them?
12,358
50,568
0
0
17,123,979
2
12
python,html
1
0
1
false
2008-09-09T04:38:00.000
1
How can I retrieve the page title of a webpage using Python?
0.033321
0
0
86
0
soup.title.string actually returns a unicode string. To convert that into normal string, you need to do string=string.encode('ascii','ignore')
How can I retrieve the page title of a webpage (title html tag) using Python?
103,114
51,233
0
0
4,908,742
0
12
python,orm
0
0
3
false
2008-09-10T04:49:00.000
1
What are some good Python ORM solutions?
0
0
0
236
0
I used Storm + SQLite for a small project, and was pretty happy with it until I added multiprocessing. Trying to use the database from multiple processes resulted in a "Database is locked" exception. I switched to SQLAlchemy, and the same code worked with no problems.
I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL DB via an ORM (JSON to the browser). I'm also looking at Django, which I like, since its ORM is built-in. However, I think Django might be a little more than I really need (i.e. more features than I really need == slower?). Anyone have any experience with different Python ORM solutions that can compare and contrast their features and functionality, speed, efficiency, etc.?
178,152
53,428
0
0
2,510,845
-2
12
python,orm
0
0
3
false
2008-09-10T04:49:00.000
1
What are some good Python ORM solutions?
-0.033321
0
0
236
0
SQLAlchemy is very, very powerful. However it is not thread safe make sure you keep that in mind when working with cherrypy in thread-pool mode.
I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL DB via an ORM (JSON to the browser). I'm also looking at Django, which I like, since its ORM is built-in. However, I think Django might be a little more than I really need (i.e. more features than I really need == slower?). Anyone have any experience with different Python ORM solutions that can compare and contrast their features and functionality, speed, efficiency, etc.?
178,152
53,428
0
0
186,179
1
12
python,orm
0
0
3
false
2008-09-10T04:49:00.000
1
What are some good Python ORM solutions?
0.016665
0
0
236
0
There is no conceivable way that the unused features in Django will give a performance penalty. Might just come in handy if you ever decide to upscale the project.
I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL DB via an ORM (JSON to the browser). I'm also looking at Django, which I like, since its ORM is built-in. However, I think Django might be a little more than I really need (i.e. more features than I really need == slower?). Anyone have any experience with different Python ORM solutions that can compare and contrast their features and functionality, speed, efficiency, etc.?
178,152
53,428
0
0
230,476
0
11
python,ajax,google-app-engine
0
0
2
false
2008-09-10T13:12:00.000
1
Any good AJAX framework for Google App Engine apps?
0
0
0
14
0
I'm currently using JQuery for my GAE app and it works beautifully for me. I have a chart (google charts) that is dynamic and uses an Ajax call to grab a JSON string. It really seems to work fine for me.
I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
11,904
53,997
0
1
54,015
3
11
python,ajax,google-app-engine
0
0
2
false
2008-09-10T13:12:00.000
1
Any good AJAX framework for Google App Engine apps?
0.054491
0
0
14
0
I'd recommend looking into a pure javascript framework (probably Jquery) for your client-side code, and write JSON services in python- that seems to be the easiest / bestest way to go. Google Web Toolkit lets you write the UI in Java and compile it to javascript. As Dave says, it may be a better choice where the backend is in Java, as it has nice RPC hooks for that case.
I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
11,904
53,997
0
1
103,212
2
2
python,erp,dabo
0
0
1
false
2008-09-11T12:29:00.000
1
Anyone used Dabo for a medium-big project?
0.197375
0
0
21
0
I have no Dabo experience at all but this question is on the top of the list fo such a long time that I decided to give it a shot: Framework selection Assumptions: medium-to-big project: we're talking about a team of more than 20 people working on something for about a year for the first phase. This is usually an expensive and very important effort for the client. this project will have significant amount of users (around a hundred) so performance is essential it's an ERP project so the application will work with large amounts of information you have no prior Dabo experience in your team Considerations: I could not open Dabo project site right now. There seems to be some server problem. That alone would make me think twice about using it for a big project. It's not a well-known framework. Typing Dabo in Google returns almost no useful results, it does not have a Wikipedia page, all-in-all it's quite obscure. It means that when you will have problems with it (and you will have problems with it) you will have almost no place to go. Your question was unanswered for 8 days on SO, this alone would make me re-consider. If you base your project on an obscure technology you have no previous experience with - it's a huge risk. You don't have people who know that framework in your team. It means that you have to learn it to get any results at all and to master it will require quite significant amount of time. You will have to factor that time into your project plan. Do you really need it? What does this framework give you that you cannot do yourself? Quite a lot of time my team tried to use some third-party component or tool only to find that building a custom one would be faster than dealing with third-party problems and limitations. There are brilliant tools available to people nowadays and we would be lost without them - but you have to carefully consider if this tool is one of them Dabo project version is 0.84. Do you know if they spend time optimising their code for performance at this stage? Did you run any tests to see it will sustain the load you have in your NFRs. Hope that helps :) Good luck with your project
We're at the beginning of a new ERP-ish client-server application, developed as a Python rich client. We're currently evaluating Dabo as our main framework and it looks quite nice and easy to use, but I was wondering, has anyone used it for medium-to-big sized projects? Thanks for your time!
4,033
56,417
0
1
68,086
6
8
python,django
0
0
5
false
2008-09-15T16:03:00.000
1
When to create a new app (with startapp) in Django?
1
0
0
130
0
The rule I follow is it should be a new app if I want to reuse the functionality in a different project. If it needs deep understanding of the models in your project, it's probably more cohesive to stick it with the models.
I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality together with the "main project" or other apps?
35,690
64,237
0
0
64,308
14
8
python,django
0
0
5
false
2008-09-15T16:03:00.000
1
When to create a new app (with startapp) in Django?
1
0
0
130
0
I tend to create new applications for each logically separate set of models. e.g.: User Profiles Forum Posts Blog posts
I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality together with the "main project" or other apps?
35,690
64,237
0
0
67,769
1
8
python,django
0
0
5
false
2008-09-15T16:03:00.000
1
When to create a new app (with startapp) in Django?
0.024995
0
0
130
0
An 'app' could be many different things, it all really comes down to taste. For example, let's say you are building a blog. Your app could be the entire blog, or you could have an 'admin' app, a 'site' app for all of the public views, an 'rss' app, a 'services' app so developers can interface with the blog in their own ways, etc. I personally would make the blog itself the app, and break out the functionality within it. The blog could then be reused rather easily in other websites. The nice thing about Django is that it will recognize any models.py file within any level of your directory tree as a file containing Django models. So breaking your functionality out into smaller 'sub apps' within an 'app' itself won't make anything more difficult.
I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality together with the "main project" or other apps?
35,690
64,237
0
0
64,463,620
2
8
python,django
0
0
5
false
2008-09-15T16:03:00.000
1
When to create a new app (with startapp) in Django?
0.049958
0
0
130
0
The best answer to this question is given by Andrew Godwin (Django core developer): The main purpose of apps is, in my eyes, to provide logical separation of reusable components - specifically, a first-class namespace for models/admin/etc. - and to provide an easy way to turn things “on” or “off”. In some ways, it’s a relic of the time when Django was created - when Python packaging and modules were much less developed and you basically had to have your own solution to the problem. That said, it’s still a core part of Django’s mental model, and I think INSTALLED_APPS is still a cleaner, easier solution than Python’s replacement offering of entrypoints (which makes it quite hard to disable a package that is installed in an environment but which you don’t want to use). Is there anything specifically you think could be decoupled from the app concept today? Models and admin need it for autodiscovery and a unique namespace prefix, so that’s hard to undo, and I’m struggling to think of other features you need it for (in fact, if all you want is just a library, you can make it a normal Python one - no need for the app wrapping unless you’re shipping models, templates or admin code IIRC)
I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality together with the "main project" or other apps?
35,690
64,237
0
0
64,464
24
8
python,django
0
0
5
false
2008-09-15T16:03:00.000
1
When to create a new app (with startapp) in Django?
1
0
0
130
0
I prefer to think of Django applications as reusable modules or components than as "applications". This helps me encapsulate and decouple certain features from one another, improving re-usability should I decide to share a particular "app" with the community at large, and maintainability. My general approach is to bucket up specific features or feature sets into "apps" as though I were going to release them publicly. The hard part here is figuring out how big each bucket is. A good trick I use is to imagine how my apps would be used if they were released publicly. This often encourages me to shrink the buckets and more clearly define its "purpose".
I've googled around for this, but I still have trouble relating to what Django defines as "apps". Should I create a new app for each piece of functionality in a site, even though it uses models from the main project? Do you guys have good rule of thumb of when to split off a new app, and when to keep functionality together with the "main project" or other apps?
35,690
64,237
0
0
67,477
-1
10
python,django
0
0
2
false
2008-09-15T22:00:00.000
1
Serving dynamically generated ZIP archives in Django
-0.019997
0
0
68
0
Can't you just write a link to a "zip server" or whatnot? Why does the zip archive itself need to be served from Django? A 90's era CGI script to generate a zip and spit it to stdout is really all that's required here, at least as far as I can see.
How to serve users a dynamically generated ZIP archive in Django? I'm making a site, where users can choose any combination of available books and download them as ZIP archive. I'm worried that generating such archives for each request would slow my server down to a crawl. I have also heard that Django doesn't currently have a good solution for serving dynamically generated files.
32,479
67,454
0
0
73,617
1
10
python,django
0
0
2
false
2008-09-15T22:00:00.000
1
Serving dynamically generated ZIP archives in Django
0.019997
0
0
68
0
I suggest to use separate model for storing those temp zip files. You can create zip on-fly, save to model with filefield and finally send url to user. Advantages: Serving static zip files with django media mechanism (like usual uploads). Ability to cleanup stale zip files by regular cron script execution (which can use date field from zip file model).
How to serve users a dynamically generated ZIP archive in Django? I'm making a site, where users can choose any combination of available books and download them as ZIP archive. I'm worried that generating such archives for each request would slow my server down to a crawl. I have also heard that Django doesn't currently have a good solution for serving dynamically generated files.
32,479
67,454
0
0
73,473
1
5
python,metaclass
0
0
2
false
2008-09-16T12:46:00.000
1
Using the docstring from one method to automatically overwrite that of another method
0.039979
0
0
4
0
Look at the functools.wraps() decorator; it does all of this, but I don't know offhand if you can get it to run in the right context
The problem: I have a class which contains a template method execute which calls another method _execute. Subclasses are supposed to overwrite _execute to implement some specific functionality. This functionality should be documented in the docstring of _execute. Advanced users can create their own subclasses to extend the library. However, another user dealing with such a subclass should only use execute, so he won't see the correct docstring if he uses help(execute). Therefore it would be nice to modify the base class in such a way that in a subclass the docstring of execute is automatically replaced with that of _execute. Any ideas how this might be done? I was thinking of metaclasses to do this, to make this completely transparent to the user.
2,897
71,817
0
0
72,126
0
5
python,metaclass
0
0
2
false
2008-09-16T12:46:00.000
1
Using the docstring from one method to automatically overwrite that of another method
0
0
0
4
0
Well the doc-string is stored in __doc__ so it wouldn't be too hard to re-assign it based on the doc-string of _execute after the fact. Basically: class MyClass(object): def execute(self): '''original doc-string''' self._execute() class SubClass(MyClass): def _execute(self): '''sub-class doc-string''' pass # re-assign doc-string of execute def execute(self,*args,**kw): return MyClass.execute(*args,**kw) execute.__doc__=_execute.__doc__ Execute has to be re-declared to that the doc string gets attached to the version of execute for the SubClass and not for MyClass (which would otherwise interfere with other sub-classes). That's not a very tidy way of doing it, but from the POV of the user of a library it should give the desired result. You could then wrap this up in a meta-class to make it easier for people who are sub-classing.
The problem: I have a class which contains a template method execute which calls another method _execute. Subclasses are supposed to overwrite _execute to implement some specific functionality. This functionality should be documented in the docstring of _execute. Advanced users can create their own subclasses to extend the library. However, another user dealing with such a subclass should only use execute, so he won't see the correct docstring if he uses help(execute). Therefore it would be nice to modify the base class in such a way that in a subclass the docstring of execute is automatically replaced with that of _execute. Any ideas how this might be done? I was thinking of metaclasses to do this, to make this completely transparent to the user.
2,897
71,817
0
0
1,997,668
10
9
python,django,frameworks
0
0
5
false
2008-09-16T19:05:00.000
1
Django -vs- Grails -vs-?
1
0
0
23
0
The statement that grails deletes the database on start-up is completely wrong. It's behavior on start-up is completely configurable and easy to configure. I generally use create-drop when running an app in dev mode. I use update when I run in test and production. I also love the bootstrap processing that lets me pre-configure test users, data, etc by environment in Grails. I'd love to see someone who has really built and deployed some commercial projects comment on the pros / cons. Be a really interesting read.
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier. Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app. Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?
19,797
75,798
0
0
460,360
10
9
python,django,frameworks
0
0
5
false
2008-09-16T19:05:00.000
1
Django -vs- Grails -vs-?
1
0
0
23
0
Grails. Grails just looks like Rails (Ruby),but it uses groovy which is simpler than java. It uses java technology and you can use any java lib without any trouble. I also choose Grails over simplicity and there are lots of java lib (such as jasper report, jawr etc) and I am glad that now they join with SpringSource which makes their base solid.
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier. Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app. Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?
19,797
75,798
0
0
81,699
1
9
python,django,frameworks
0
0
5
false
2008-09-16T19:05:00.000
1
Django -vs- Grails -vs-?
0.022219
0
0
23
0
Personally I made some rather big projects with Django, but I can compare only with said "montrosities" (Spring, EJB) and really low-level stuff like Twisted. Web frameworks using interpreted languages are mostly in its infancy and all of them (actively maintained, that is) are getting better with every day.
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier. Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app. Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?
19,797
75,798
0
0
76,198
1
9
python,django,frameworks
0
0
5
false
2008-09-16T19:05:00.000
1
Django -vs- Grails -vs-?
0.022219
0
0
23
0
cakephp.org Cakephp is really good, really close to ruby on rails (1.2). It is in php, works very well on shared hosts and is easy to implement. The only downside is that the documentation is somewhat lacking, but you quickly get it and quickly start doing cool stuff. I totally recommend cakephp.
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier. Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app. Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?
19,797
75,798
0
0
1,955,727
32
9
python,django,frameworks
0
0
5
true
2008-09-16T19:05:00.000
1
Django -vs- Grails -vs-?
1.2
0
0
23
0
You asked for someone who used both Grails and Django. I've done work on both for big projects. Here's my Thoughts: IDE's: Django works really well in Eclipse, Grails works really well in IntelliJ Idea. Debugging: Practically the same (assuming you use IntelliJ for Grails, and Eclipse for Python). Step debugging, inspecting variables, etc... never need a print statement for either. Sometimes django error messages can be useless but Grails error messages are usually pretty lengthy and hard to parse through. Time to run a unit test: django: 2 seconds. Grails: 20 seconds (the tests themselves both run in a fraction of a second, it's the part about loading the framework to run them that takes the rest... as you can see, Grails is frustratingly slow to load). Deployment: Django: copy & paste one file into an apache config, and to redeploy, just change the code and reload apache. Grails: create a .war file, deploy it on tomcat, rinse and repeat to redeploy. Programming languages: Groovy is TOTALLY awesome. I love it, more so than Python. But I certainly have no complaints. Plugins: Grails: lots of broken plugins (and can use every java lib ever). Django: a few stable plugins, but enough to do most of what you need. Database: Django: schema migrations using South, and generally intuitive relations. Grails: no schema migrations, and by default it deletes the database on startup... WTF Usage: Django: startups (especially in the Gov 2.0 space), independent web dev shops. Grails: enterprise Hope that helps!
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However it's written in Python which means there's little real support in the way of deployment/packaging, debugging, profilers and other tools that make building and maintaining applications much easier. Ruby has similar issues and although I do like Ruby much better than I like Python, I get the impression that Rails is roughly in the same boat at Django when it comes to managing/supporting the app. Has anyone here tried both Django and Grails (or other web frameworks) for non-trivial projects? How did they compare?
19,797
75,798
0
0
99,603
3
4
python,ruby-on-rails,ruby,apache-flex,blazeds
0
0
3
false
2008-09-16T21:15:00.000
1
What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do?
0.148885
0
0
4
0
The data management features for LCDS described here are certainly valid, however I believe they do not let you actually develop a solution faster. A developer still has to write ALL the data access code, query execution, extracting data from datareaders into value objects. ALL of this has been solved a dozen of times with code generators. For instance the data management approach in WebORB for Java (much like in WebORB for .NET and PHP) is based on code generation which creates code for both client side AND server-side. You get all the ActionScript APIs out of the code generator to do full CRUD. Additionally, WebORB provides video streaming and real-time messaging features and goes WAY beyond what both BlazeDS and LCDS offer combined, especially considering that the product is free. Just google it.
I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like RubyAMF / pyAMF don't?
2,417
77,198
0
0
77,458
1
4
python,ruby-on-rails,ruby,apache-flex,blazeds
0
0
3
false
2008-09-16T21:15:00.000
1
What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do?
0.049958
0
0
4
0
Good question. I'm not a ruby guy (i use java with flex), but what I believe differentiates blazeds vs commercial livecycle ds is Streaming protocol support (rtmp) - competition for comet and such, delivering video Some advanced stuff for hibernate detached objects and large resultset caching that I don't fully understand or need support? Might be others but those are the ones I know off the top of my head.
I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like RubyAMF / pyAMF don't?
2,417
77,198
0
0
98,180
3
4
python,ruby-on-rails,ruby,apache-flex,blazeds
0
0
3
true
2008-09-16T21:15:00.000
1
What does BlazeDS Livecycle Data Services do, that something like PyAMF or RubyAMF not do?
1.2
0
0
4
0
Other than NIO (RTMP) channels, LCDS include also the "data management" features. Using this feature, you basically implement, in an ActionScript class, a CRUD-like interface defined by LCDS, and you get: automatic progressive list loading (large lists/datagrids loads while scrolling) automatic crud management (you get object locally in flash, modify it, send it back and DB will get updated automatically) feature for conflict resolution (if multiple user try to updated the same record at the same time) if I remember well, also some improved integration with the LiveCycle ES workflow engine IMO, it can be very fast to develop this way, but only if you have only basic requirements and a simple architecture (forget SOA, that otherwise works so well with Flex). I'm fine with BlazeDS.
I'm doing a tech review and looking at AMF integration with various backends (Rails, Python, Grails etc). Lots of options are out there, question is, what do the Adobe products do (BlazeDS etc) that something like RubyAMF / pyAMF don't?
2,417
77,198
0
0
82,690
3
7
python,django
0
0
2
false
2008-09-17T12:37:00.000
1
Is there any list of blog engines, written in Django?
0.085505
0
0
18
0
Byteflow is a blog engine, written on Python, using Django
Is there any list of blog engines, written in Django?
4,075
82,653
0
0
82,753
3
7
python,django
0
0
2
false
2008-09-17T12:37:00.000
1
Is there any list of blog engines, written in Django?
0.085505
0
0
18
0
Django's powerful admin interface and easy ORM makes it a 30 minute job to build a blog that propably fits your needs; Why look for a 3rd party product when you can make it yourself very quickly?
Is there any list of blog engines, written in Django?
4,075
82,653
0
0
101,074
1
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0.022219
0
0
3
0
Half a year ago I took over a large web application (fortunately already in Python) which had some major architectural deficiencies (templates and code mixed, code duplication, you name it...). My plan is to eventually have the system respond to WSGI, but I am not there yet. I found the best way to do it, is in small steps. Over the last 6 month, code reuse has gone up and progress has accelerated. General principles which have worked for me: Throw away code which is not used or commented out Throw away all comments which are not useful Define a layer hierarchy (models, business logic, view/controller logic, display logic, etc.) of your application. This has not to be very clear cut architecture but rather should help you think about the various parts of your application and help you better categorize your code. If something grossly violates this hierarchy, change the offending code. Move the code around, recode it at another place, etc. At the same time adjust the rest of your application to use this code instead of the old one. Throw the old one away if not used anymore. Keep you APIs simple! Progress can be painstakingly slow, but should be worth it.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
89,452
0
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0
0
0
3
0
Don't try and go 2.0 ( more features then currently exists or scheduled) instead build your new platform with the intent of resolving the current issues with the code base (maintainability/speed/wtf) and go from there.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
87,684
2
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0.044415
0
0
3
0
Whatever you do, see if you can manage to follow a plan where you do not have to port the application all in one big bang. It is tempting to throw it all away and start from scratch, but if you can manage to do it gradually the mistakes you do will not cost so much and cause so much panic.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
994,326
0
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0
0
0
3
0
I agree with Michael Pryor and Joel that it's almost always a better idea to continue evolving your existing code base rather than re-writing from scratch. There are typically opportunities to just re-write or re-factor certain components for performance or flexibility.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
87,562
3
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0.066568
0
0
3
0
Use this as an opportunity to remove unused features! Definitely go with the new language. Call it 2.0. It will be a lot less work to rebuild the 80% of it that you really need. Start by wiping your brain clean of the whole application. Sit down with a list of its overall goals, then decide which features are needed based on which ones are used. Then redesign it with those features in mind, and build. (I love to delete code.)
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
87,998
3
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0.066568
0
0
3
0
It works out better than you'd believe. Recently I did a large reverse-engineering job on a hideous old collection of C code. Function by function I reallocated the features that were still relevant into classes, wrote unit tests for the classes, and built up what looked like a replacement application. It had some of the original "logic flow" through the classes, and some classes were poorly designed [Mostly this was because of a subset of the global variables that was too hard to tease apart.] It passed unit tests at the class level and at the overall application level. The legacy source was mostly used as a kind of "specification in C" to ferret out the really obscure business rules. Last year, I wrote a project plan for replacing 30-year old COBOL. The customer was leaning toward Java. I prototyped the revised data model in Python using Django as part of the planning effort. I could demo the core transactions before I was done planning. Note: It was quicker to build a the model and admin interface in Django than to plan the project as a whole. Because of the "we need to use Java" mentality, the resulting project will be larger and more expensive than finishing the Django demo. With no real value to balance that cost. Also, I did the same basic "prototype in Django" for a VB desktop application that needed to become a web application. I built the model in Django, loaded legacy data, and was up and running in a few weeks. I used that working prototype to specify the rest of the conversion effort. Note: I had a working Django implementation (model and admin pages only) that I used to plan the rest of the effort. The best part about doing this kind of prototyping in Django is that you can mess around with the model, unit tests and admin pages until you get it right. Once the model's right, you can spend the rest of your time fiddling around with the user interface until everyone's happy.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
87,573
0
9
python,asp-classic,vbscript
0
0
7
false
2008-09-17T20:48:00.000
1
If it is decided that our system needs an overhaul, what is the best way to go about it?
0
0
0
3
0
I would not recommend JScript as that is definitely the road less traveled. ASP.NET MVC is rapidly maturing, and I think that you could begin a migration to it, simultaneously ramping up on the ASP.NET MVC framework as its finalization comes through. Another option would be to use something like ASP.NET w/Subsonic or NHibernate.
We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place, and cannot do it, in a reasonable manner, with the current technology. The big missing features are proper dispatching and templating with inheritance, amongst others. Currently there are two paths being discussed: Port the existing application to Classic ASP using JScript, which will allow us to hopefully go from there to .NET MSJscript without too much trouble, and eventually end up on the .NET platform (preferably the MVC stuff will be done by then, ASP.NET isn't much better than were we are on now, in our opinions). This has been argued as the safer path with less risk than the next option, albeit it might take slightly longer. Completely rewrite the application using some other technology, right now the leader of the pack is Python WSGI with a custom framework, ORM, and a good templating solution. There is wiggle room here for even django and other pre-built solutions. This method would hopefully be the quickest solution, as we would probably run a beta beside the actual product, but it does have the potential for a big waste of time if we can't/don't get it right. This does not mean that our logic is gone, as what we have built over the years is fairly stable, as noted just difficult to deal with. It is built on SQL Server 2005 with heavy use of stored procedures and published on IIS 6, just for a little more background. Now, the question. Has anyone taken either of the two paths above? If so, was it successful, how could it have been better, etc. We aren't looking to deviate much from doing one of those two things, but some suggestions or other solutions would potentially be helpful.
406
87,522
0
0
8,444,988
1
19
python,google-app-engine
0
0
3
false
2008-09-20T17:34:00.000
1
Delete all data for a kind in Google App Engine
0.010526
0
0
45
0
Yes you can: Go to Datastore Admin, and then select the Entitiy type you want to delete and click Delete. Mapreduce will take care of deleting!
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
1
2,245,189
0
19
python,google-app-engine
0
0
3
false
2008-09-20T17:34:00.000
1
Delete all data for a kind in Google App Engine
0
0
0
45
0
You can use the task queues to delete chunks of say 100 objects. Deleting objects in GAE shows how limited the Admin capabilities are in GAE. You have to work with batches on 1000 entities or less. You can use the bulkloader tool that works with csv's but the documentation does not cover java. I am using GAE Java and my strategy for deletions involves having 2 servlets, one for doing the actually delete and another to load the task queues. When i want to do a delete, I run the queue loading servlet, it loads the queues and then GAE goes to work executing all the tasks in the queue. How to do it: Create a servlet that deletes a small number of objects. Add the servlet to your task queues. Go home or work on something else ;) Check the datastore every so often ... I have a datastore with about 5000 objects that i purge every week and it takes about 6 hours to clean out, so i run the task on Friday night. I use the same technique to bulk load my data which happens to be about 5000 objects, with about a dozen properties.
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
1
109,018
3
19
python,google-app-engine
0
0
3
false
2008-09-20T17:34:00.000
1
Delete all data for a kind in Google App Engine
0.031568
0
0
45
0
Unfortunately, there's no way to easily do a bulk delete. Your best bet is to write a script that deletes a reasonable number of entries per invocation, and then call it repeatedly - for example, by having your delete script return a 302 redirect whenever there's more data to delete, then fetching it with "wget --max-redirect=10000" (or some other large number).
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
1
2,462,266
6
11
python,django,google-app-engine
0
0
4
false
2008-09-21T03:41:00.000
1
Feedback on using Google App Engine?
1
0
0
126
0
This question has been fully answered. Which is good. But one thing perhaps is worth mentioning. The google app engine has a plugin for the eclipse ide which is a joy to work with. If you already do your development with eclipse you are going to be so happy about that. To deploy on the google app engine's web site all I need to do is click one little button - with the airplane logo - super.
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
1
566,481
36
11
python,django,google-app-engine
0
0
4
false
2008-09-21T03:41:00.000
1
Feedback on using Google App Engine?
1
0
0
126
0
I am using GAE to host several high-traffic applications. Like on the order of 50-100 req/sec. It is great, I can't recommend it enough. My previous experience with web development was with Ruby (Rails/Merb). Learning Python was easy. I didn't mess with Django or Pylons or any other framework, just started from the GAE examples and built what I needed out of the basic webapp libraries that are provided. If you're used to the flexibility of SQL the datastore can take some getting used to. Nothing too traumatic! The biggest adjustment is moving away from JOINs. You have to shed the idea that normalizing is crucial. Ben
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
1
110,299
23
11
python,django,google-app-engine
0
0
4
false
2008-09-21T03:41:00.000
1
Feedback on using Google App Engine?
1
0
0
126
0
One of the compelling reasons I have come across for using Google App Engine is its integration with Google Apps for your domain. Essentially it allows you to create custom, managed web applications that are restricted to the (controlled) logins of your domain. Most of my experience with this code was building a simple time/task tracking application. The template engine was simple and yet made a multi-page application very approachable. The login/user awareness api is similarly useful. I was able to make a public page/private page paradigm without too much issue. (a user would log in to see the private pages. An anonymous user was only shown the public page.) I was just getting into the datastore portion of the project when I got pulled away for "real work". I was able to accomplish a lot (it still is not done yet) in a very little amount of time. Since I had never used Python before, this was particularly pleasant (both because it was a new language for me, and also because the development was still fast despite the new language). I ran into very little that led me to believe that I wouldn't be able to accomplish my task. Instead I have a fairly positive impression of the functionality and features. That is my experience with it. Perhaps it doesn't represent more than an unfinished toy project, but it does represent an informed trial of the platform, and I hope that helps.
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
1
110,225
12
11
python,django,google-app-engine
0
0
4
false
2008-09-21T03:41:00.000
1
Feedback on using Google App Engine?
1
0
0
126
0
The "App Engine running Django" idea is a bit misleading. App Engine replaces the entire Django model layer so be prepared to spend some time getting acclimated with App Engine's datastore which requires a different way of modeling and thinking about data.
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
1
1,030,155
-1
10
python,django
0
0
1
false
2008-09-21T11:27:00.000
1
Dirty fields in django
-0.019997
0
0
36
0
for everyone's information, muhuk's solution fails under python2.6 as it raises an exception stating 'object.__ init __()' accepts no argument... edit: ho! apparently it might've been me misusing the the mixin... I didnt pay attention and declared it as the last parent and because of that the call to init ended up in the object parent rather than the next parent as it noramlly would with diamond diagram inheritance! so please disregard my comment :)
In my app i need to save changed values (old and new) when model gets saved. Any examples or working code? I need this for premoderation of content. For example, if user changes something in model, then administrator can see all changes in separate table and then decide to apply them or not.
28,215
110,803
0
0
114,373
2
3
python,django
0
0
2
false
2008-09-22T11:11:00.000
1
Where can a save confirmation page be hooked into the Django admin? (similar to delete confirmation)
0.132549
0
0
9
0
You could overload the get_form method of your model admin and add an extra checkbox to the generated form that has to be ticket. Alternatively you can override change_view and intercept the request.
I want to emulate the delete confirmation page behavior before saving certain models in the admin. In my case if I change one object, certain others should be deleted as they depend upon the object's now out-of-date state. I understand where to implement the actual cascaded updates (inside the parent model's save method), but I don't see a quick way to ask the user for confirmation (and then rollback if they decide not to save). I suppose I could implement some weird confirmation logic directly inside the save method (sort of a two phase save) but that seems...ugly. Any thoughts, even general pointers into the django codebase? Thanks!
2,618
114,283
0
0
114,348
1
3
python,django
0
0
2
false
2008-09-22T11:11:00.000
1
Where can a save confirmation page be hooked into the Django admin? (similar to delete confirmation)
0.066568
0
0
9
0
I'm by no means a Django expert, so this answer might misguide you. Start looking somewhere around django.contrib.admin.options.ModelAdmin, especially render_change_form and response_change. I guess you would need to subclass ModelAdmin for your model and provide required behavior around those methods.
I want to emulate the delete confirmation page behavior before saving certain models in the admin. In my case if I change one object, certain others should be deleted as they depend upon the object's now out-of-date state. I understand where to implement the actual cascaded updates (inside the parent model's save method), but I don't see a quick way to ask the user for confirmation (and then rollback if they decide not to save). I suppose I could implement some weird confirmation logic directly inside the save method (sort of a two phase save) but that seems...ugly. Any thoughts, even general pointers into the django codebase? Thanks!
2,618
114,283
0
0
118,331
1
8
python,django,autofield
0
0
1
false
2008-09-22T21:37:00.000
1
How to get Django AutoFields to start at a higher number
0.024995
0
0
25
0
The auto fields depend, to an extent, on the database driver being used. You'll have to look at the objects actually created for the specific database to see what's happening.
For our Django App, we'd like to get an AutoField to start at a number other than 1. There doesn't seem to be an obvious way to do this. Any ideas?
14,912
117,800
0
0
118,680
5
9
.net,python,ironpython
0
0
5
false
2008-09-23T01:37:00.000
1
Iron python, beautiful soup, win32 app
0.110656
0
0
21
0
If BeautifulSoup doesn't work on IronPython, it's because IronPython doesn't implement the whole Python language (the same way CPython does). BeautifulSoup is pure-python, no C-extensions, so the only problem is the compatibility of IronPython with CPython in terms of Python source code.There shouldn't be one, but if there is, the error will be obvious ("no module named ...", "no method named ...", etc.). Google says that only one of BS's tests fails with IronPython. it probably works, and that test may be fixed by now. I wouldn't know. Try it out and see, would be my advice, unless anybody has anything more concrete.
Does beautiful soup work with iron python? If so with which version of iron python? How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
8,742
118,654
0
0
119,713
-2
9
.net,python,ironpython
0
0
5
false
2008-09-23T01:37:00.000
1
Iron python, beautiful soup, win32 app
-0.044415
0
0
21
0
If you have the complete standard library and the real re module (google for IronPython community edition) it might work. But IronPython is an incredible bad python implementation, I wouldn't count on that. Besides, give html5lib a try. That parser parses with the same rules firefox parses documents.
Does beautiful soup work with iron python? If so with which version of iron python? How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
8,742
118,654
0
0
118,713
8
9
.net,python,ironpython
0
0
5
false
2008-09-23T01:37:00.000
1
Iron python, beautiful soup, win32 app
1
0
0
21
0
I've tested and used BeautifulSoup with both IPy 1.1 and 2.0 (forget which beta, but this was a few months back). Leave a comment if you are still having trouble and I'll dig out my test code and post it.
Does beautiful soup work with iron python? If so with which version of iron python? How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
8,742
118,654
0
0
118,671
0
9
.net,python,ironpython
0
0
5
false
2008-09-23T01:37:00.000
1
Iron python, beautiful soup, win32 app
0
0
0
21
0
I haven't tested it, but I'd say it'll most likely work with the latest IPy2. As for distribution, it's very simple. Use the -X:SaveAssemblies option to compile your Python code down to a binary and then ship it with your other DLLs and the IPy dependencies.
Does beautiful soup work with iron python? If so with which version of iron python? How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
8,742
118,654
0
0
287,247
1
9
.net,python,ironpython
0
0
5
false
2008-09-23T01:37:00.000
1
Iron python, beautiful soup, win32 app
0.022219
0
0
21
0
We are distributing a 40k line IronPython application. We have not been able to compile the whole thing into a single binary distributable. Instead we have been distributing it as a zillion tiny dlls, one for each IronPython module. This works fine though. However, on the newer release, IronPython 2.0, we have a recent spike which seems to be able to compile everything into a single binary file. This also results in faster application start-up too (module importing is faster.) Hopefully this spike will migrate into our main tree in the next few days. To do the distribution we are using WiX, which is a Microsoft internal tool for creating msi installs, that has been open-sourced (or made freely available, at least.) It has given us no problems, even though our install has some quite fiddly requirements. I will definitely look at using WiX to distribute other IronPython projects in the future.
Does beautiful soup work with iron python? If so with which version of iron python? How easy is it to distribute a windows desktop app on .net 2.0 using iron python (mostly c# calling some python code for parsing html)?
8,742
118,654
0
0
119,386
2
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0.049958
0
0
3
1
Never stop learning! That said, how can you compare the two? How good is Python support in .Net? Is there C# support in Google App Engine? It really depends what your target system is. Therefore, the more languages you have the better equipped you will be to tackle different challenges.
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
119,208
1
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0.024995
0
0
3
1
Both are useful for different purposes. C# is a pretty good all-rounder, python's dynamic nature makes it more suitable for RAD experiences such as site building. I don't think your career will suffer if you were competant in both. To get going with Python consider an IDE with Python support such as Eclipse+PyDev or ActiveIDE's Komodo. (I found a subscription to Safari Bookshelf online really invaluable too!)
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
119,215
1
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0.024995
0
0
3
1
What's better is inherently subjective. If you like Python's syntax - learn it. It will probably be harder to find a Python job, C# and .NET in general seem to be more popular, but this may change. I also think it's worth to know at least one scripting language, even if your main job doesn't require it. Python is not a bad candidate.
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
119,224
3
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0.07486
0
0
3
1
It can't hurt to learn Python, especially considering some of the heavy weights (Google) are really getting behind it. As for the actual use, it all depends on the application. Use the best tool for the job.
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
30,671,567
0
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0
0
0
3
1
I have been thinking about this same question myself. I believe however there is still a lot of stuff C# can offer that I want to get good at before I job into Python. Because Python is easier to learn it. One advantage I have found in languages is not the language itself but the materials available to learning them. For example let's say you could make a 3D game in JavaScript, but you would be more likely to find resources to do so in C++. Or you could make phone apps in PHP but C# or Java would have more material out there to help you with the phone apps. For me personally I know when I become good at programming in C# I will be able to branch off into other languages. This is the main reason I have chosen to devote most of my time to that one language. I also am learning a little bit of Java and C++ just practice thinking in other languages. I think in the future however Python will become more popular because coding is becoming more popular and Python is the easiest of mainstream languages right now.
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
119,205
1
8
c#,python
0
0
6
false
2008-09-23T04:53:00.000
1
Is it good to switch from c# to python?
0.024995
0
0
3
1
Depends on what you will use it for. If you're making enterprise Windows forms applications, I don't think switching to Python would be a good idea. Also, it is possible to still use Python on the .NET CLR with IronPython.
Currently I am developing in the .Net environment using C# but I want to know whether it is worth learning python. I'm thinking of learning the Django framework. What is better?
5,513
119,198
0
0
122,482
11
5
python,django,templates,stack-trace
0
0
2
false
2008-09-23T14:39:00.000
1
How do I include a stacktrace in my Django 500.html page?
1
0
0
25
0
As @zacherates says, you really don't want to display a stacktrace to your users. The easiest approach to this problem is what Django does by default if you have yourself and your developers listed in the ADMINS setting with email addresses; it sends an email to everyone in that list with the full stack trace (and more) everytime there is a 500 error with DEBUG = False.
I'm running Django 1.0 and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False. With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can copy-and-paste the errors and easily email them to the developers. Any thoughts on how best to approach this issue?
10,099
121,439
0
0
121,487
1
5
python,django,templates,stack-trace
0
0
2
false
2008-09-23T14:39:00.000
1
How do I include a stacktrace in my Django 500.html page?
0.039979
0
0
25
0
You could call sys.exc_info() in a custom exception handler. But I don't recommend that. Django can send you emails for exceptions.
I'm running Django 1.0 and I'm close to deploying my app. As such, I'll be changing the DEBUG setting to False. With that being said, I'd still like to include the stacktrace on my 500.html page when errors occur. By doing so, users can copy-and-paste the errors and easily email them to the developers. Any thoughts on how best to approach this issue?
10,099
121,439
0
0
126,250
8
2
javascript,python,html
1
0
1
false
2008-09-24T09:05:00.000
1
Python library for rendering HTML and javascript
1
0
0
18
0
The big complication here is emulating the full browser environment outside of a browser. You can use stand alone javascript interpreters like Rhino and SpiderMonkey to run javascript code but they don't provide a complete browser like environment to full render a web page. If I needed to solve a problem like this I would first look at how the javascript is rendering the page, it's quite possible it's fetching data via AJAX and using that to render the page. I could then use python libraries like simplejson and httplib2 to directly fetch the data and use that, negating the need to access the DOM object. However, that's only one possible situation, I don't know the exact problem you are solving. Other options include the selenium one mentioned by Łukasz, some kind of webkit embedded craziness, some kind of IE win32 scripting craziness or, finally, a pyxpcom based solution (with added craziness). All these have the drawback of requiring pretty much a fully running web browser for python to play with, which might not be an option depending on your environment.
Is there any python module for rendering a HTML page with javascript and get back a DOM object? I want to parse a page which generates almost all of its content using javascript.
34,652
126,131
0
0
130,332
1
2
python,facebook,turbogears
0
0
2
false
2008-09-24T10:14:00.000
1
Example Facebook Application using TurboGears -- pyFacebook
0.099668
0
0
2
0
pyFacebook is Django-centric because it includes a Django example. I did not intend to irk, but am merely looking for a TurboGears example using pyFacebook.
I have a TurboGears application I'd like to run through Facebook, and am looking for an example TurboGears project using pyFacebook or minifb.py. pyFacebook is Django-centric, and I can probably figure it out, but this is, after all, the lazy web.
1,667
126,356
0
0
126,399
3
2
python,facebook,turbogears
0
0
2
false
2008-09-24T10:14:00.000
1
Example Facebook Application using TurboGears -- pyFacebook
0.291313
0
0
2
0
Why is pyFacebook django centric? Looks like it works perfectly fine with all kinds of WSGI apps or Python applications in general. No need to use Django.
I have a TurboGears application I'd like to run through Facebook, and am looking for an example TurboGears project using pyFacebook or minifb.py. pyFacebook is Django-centric, and I can probably figure it out, but this is, after all, the lazy web.
1,667
126,356
0
0
126,843
2
2
python
0
0
1
true
2008-09-24T12:21:00.000
1
Checking for code changes in all imported python modules
1.2
1
0
2
0
As the author of one of the reloader mechanisms (the one in werkzeug) I can tell you that it doesn't work. What all the reloaders do is forking one time and restarting the child process if a monitor thread notices that one module changed on the file system. Inline reload()ing doesn't work because references to the reloaded module are not updated.
Almost every Python web framework has a simple server that runs a wsgi application and automatically reloads the imported modules every time the source gets changed. I know I can look at the code and see how it's done, but that may take some time and I'm asking just out of curiosity. Does anyone have any idea how this is implemented?
304
126,787
0
0
138,666
1
5
python,django
0
0
4
false
2008-09-24T17:19:00.000
1
What's the best way to upgrade from Django 0.96 to 1.0?
0.039979
0
0
8
0
Only simplest sites are easy to upgrade. Expect real pain if your site happen to be for non-ASCII part of the world (read: anywhere outside USA and UK). The most painful change in Django was switching from bytestrings to unicode objects internally - now you have to find all places where you use bytestrings and change this to unicode. Worst case is the template rendering, you'll never know you forgot to change one variable until you get UnicodeError. Other notable thing: manipulators (oldforms) have gone and you have no other way than to rewrite all parts with forms (newforms). If this is your case and your project is larger than 2-3 apps, I'd be rather reluctant to upgrade until really necessary.
Should I try to actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
896
128,466
0
0
129,187
2
5
python,django
0
0
4
false
2008-09-24T17:19:00.000
1
What's the best way to upgrade from Django 0.96 to 1.0?
0.07983
0
0
8
0
Just upgrade your app. The switch from 0.96 to 1.0 was huge, but in terms of Backwards Incompatible changes I doubt your app even has 10% of them. I was on trunk before Django 1.0 so I the transition for me was over time but even then the only major things I had to change were newforms, newforms-admin, str() to unicode() and maxlength to max_length Most of the other changes were new features or backend rewrites or stuff that as someone who was building basic websites did not even get near.
Should I try to actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
896
128,466
0
0
410,942
1
5
python,django
0
0
4
false
2008-09-24T17:19:00.000
1
What's the best way to upgrade from Django 0.96 to 1.0?
0.039979
0
0
8
0
We upgraded in a multi step process and I'm quite happy with that. The application in Question was about 100.000 LoC and running several core business functions with lot's of interfacing to legacy systems. We worked like that: Update to django 0.97-post unicode merge. Fix all the unicode issues refactor the application into reusable apps, add tests. That left us with 40.000 LoC in the main application/Project Upgrade to django 0.97-post autoexcape merge. Fix auto escaping in the reusable apps created in 3. Then fix the remaining auto-escaping issues in the mian application. Upgrade to 1.0. What was left was mostly fixing the admin stuff. The whole thing took about 6 months where we where running a legacy production branch on our servers while porting an other branch to 1.0. While doing so we also where adding features to the production branch. The final merge was much less messy than expected and took about a week for 4 coders merging, reviewing, testing and fixing. We then rolled out, and for about a week got bitten by previously unexpected bugs. All in all I'm quite satisfied with the outcome. We have a much better codebase now for further development.
Should I try to actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
896
128,466
0
0
128,496
7
5
python,django
0
0
4
true
2008-09-24T17:19:00.000
1
What's the best way to upgrade from Django 0.96 to 1.0?
1.2
0
0
8
0
Although this depends on what you're doing, most applications should be able to just upgrade and then fix everything that breaks. In my experience, the main things that I've had to fix after an upgrade are Changes to some of the funky stuff with models, such as the syntax for following foreign keys. A small set of template changes, most notably auto-escaping. Anything that depends on the specific structure of Django's internals. This shouldn't be an issue unless you're doing stuff like dynamically modifying Django internals to change their behavior in a way that's necessary/convenient for your project. To summarize, unless you're doing a lot of really weird and/or complex stuff, a simple upgrade should be relatively painless and only require a few changes.
Should I try to actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
896
128,466
0
0
158,626
0
4
python,crud,turbogears
0
0
1
false
2008-09-24T17:53:00.000
1
Doing CRUD in Turbogears
0
1
0
3
0
After doing some more digging and hacking it turns out to not be terribly hard to drop the Cakewalk interface into an application. It's not pretty without a lot of work, but it works right away.
Are there any good packages or methods for doing extensive CRUD (create-retrieve-update-delete) interfaces in the Turbogears framework. The FastDataGrid widget is too much of a black box to be useful and CRUDTemplate looks like more trouble than rolling my own. Ideas? Suggestions?
1,363
128,689
0
0
136,399
2
2
python,django
0
0
2
true
2008-09-25T03:25:00.000
1
Style - When to serialize a Django model Instance: signals vs model's save method
1.2
0
0
1
0
If it's core functionality for saving the model you'll want it as part of the save method. However, if you already have a functioning model and you want to extend it for other purposes then signals are your best bet since they allow for properly decoupled modules. A good example might be that you want to add event logging to your site, so you simply listen for the signals that signify an event rather than modifying the original site code. post_save() is usually best because it means the model has been successfully saved, using pre_save() doesn't guarantee that the save will be successful so shouldn't be used for anything that would depend on the save being completed.
I plan to serialize a Django model to XML when it's saved or updated. (The XML's going to be imported into a flash movie). Is it better to listen for a post_save() or pre_save() signal and then perform the serialization, or to just handle it in the model's save() methon
1,205
131,327
0
0
131,383
0
2
python,django
0
0
2
false
2008-09-25T03:25:00.000
1
Style - When to serialize a Django model Instance: signals vs model's save method
0
0
0
1
0
Post save. That way the new data (the reason for performing the serialization) is already in the database. It'll make for a much cleaner bit of code that simply takes from the database and doesn't have to worry about adding an extra value. The other way that comes to mind is to maintain the xml file in parallel to the database. That is to say, in your save() add the data to the database, and to the xml file. This would have a much less overhead if you're dealing with huge tables.
I plan to serialize a Django model to XML when it's saved or updated. (The XML's going to be imported into a flash movie). Is it better to listen for a post_save() or pre_save() signal and then perform the serialization, or to just handle it in the model's save() methon
1,205
131,327
0
0
139,634
1
7
python,django,google-app-engine,web-applications
0
0
4
false
2008-09-25T18:46:00.000
1
Is Google App Engine a worthy platform for a Lifestreaming app?
0.028564
0
0
7
0
If you're app solely relies on Django, then App Engine is a good bet. However, if you ever need to add C-enhanced libraries, you're up a creek. App Engine doesn't support things like PIL or ReportLab, which use C to speed up processing times. I'm only mentioning this because you may want to use C to speed up some of your routines in the long run. If you decide to use a co-loc, check out WebFaction.com. They have great Django/Python support and they have no issue with you using the aforementioned lirbaries.
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of cron jobs is a nuisance. Would I be better off using Django on a co-loc and dealing with my own DB scaling?
1,087
135,169
0
1

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
0
Add dataset card

Models trained or fine-tuned on RazinAleks/SO-Python_QA-Web_Development_class