Title
stringlengths
11
150
A_Id
int64
518
72.5M
Users Score
int64
-42
283
Q_Score
int64
0
1.39k
ViewCount
int64
17
1.71M
Database and SQL
int64
0
1
Tags
stringlengths
6
105
Answer
stringlengths
14
4.78k
GUI and Desktop Applications
int64
0
1
System Administration and DevOps
int64
0
1
Networking and APIs
int64
0
1
Other
int64
0
1
CreationDate
stringlengths
23
23
AnswerCount
int64
1
55
Score
float64
-1
1.2
is_accepted
bool
2 classes
Q_Id
int64
469
42.4M
Python Basics and Environment
int64
0
1
Data Science and Machine Learning
int64
0
1
Web Development
int64
1
1
Available Count
int64
1
15
Question
stringlengths
17
21k
JPype compile problems
6,258,169
1
3
3,736
1
java,python
Edit the Setup.py and remove the /EHsc option.
1
0
0
0
2010-09-06T06:54:00.000
3
0.066568
false
3,649,577
0
0
1
1
I'm having a right old nightmare with JPype. I have got my dev env on Windows and so tried installing it there with no luck. I then tried on Ubunto also with no luck. I'm getting a bit desperate now. I am using Mingw32 since I tried installing VS2008 but it told me I had to install XP SP2 but I am on Vista. I tried VS2010 but no luck, I got the 'error: Unable to find vcvarsall.bat' error. Anyway, I am now on Mingw32 Ultimately I am trying to use Neo4j and Python hence my need to use JPype. I have found so many references to the problem on the net for MySQL etc but they don't help me with JPype. If I could fix unix or windows I could get going so help on either will be really appreciated. Here's the versions.. Windows: Vista 64 Python: 2.6 Compiler Mingw32: latest version Jpype: 0.5.4.1 Java info: java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) I run: python setup.py install --compiler=wingw32 and get the following output. Choosing the Windows profile running install running build running build_py running build_ext building '_jpype' extension C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -DWIN32=1 "-IC:\Program Files (x86)\Java\jdk1.6.0_21/include" "-IC:\Program Files (x86)\Java\jdk1.6.0_21/include/win32" -Isrc/native/common/include -Isrc/native/python/include -Ic:\Python26\include -Ic:\Python26\PC -c src/native/common/jp_array.cpp -o build\temp.win32-2.6\Release\src\native\common\jp_array.o /EHsc src/native/common/jp_array.cpp: In member function 'void JPArray::setRange(int, int, std::vector&)': src/native/common/jp_array.cpp:56:13: warning: comparison between signed and unsigned integer expressions src/native/common/jp_array.cpp:68:4: warning: deprecated conversion from string constant to 'char*' src/native/common/jp_array.cpp: In member function 'void JPArray::setItem(int, HostRef*)': src/native/common/jp_array.cpp:80:3: warning: deprecated conversion from string constant to 'char*' gcc: /EHsc: No such file or directory error: command 'gcc' failed with exit status 1 So on unix Ubunto the problem is as follows: Java version: 1.6.0_18 JPype: 0.5.4.1 Python: 2.6 Java is in the path and I did apt-get install build-essentials just now so have latest GCC etc. I won't paste all the output as it's massive. So many errors it's like I have missed the install of Java or similar but I haven't. typing java takes me into version above. This is the beginning: running install running build running build_py running build_ext building '_jpype' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include -I/usr/lib/jvm/java-1.5.0-sun-1.5.0.08/include/linux -Isrc/native/common/include -Isrc/native/python/include -I/usr/include/python2.6 -c src/native/common/jp_javaenv_autogen.cpp -o build/temp.linux-i686-2.6/src/native/common/jp_javaenv_autogen.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ In file included from src/native/common/jp_javaenv_autogen.cpp:21: src/native/common/include/jpype.h:45:17: error: jni.h: No such file or directory In file included from src/native/common/jp_javaenv_autogen.cpp:21: src/native/common/include/jpype.h:77: error: ISO C++ forbids declaration of ‘jchar’ with no type src/native/common/include/jpype.h:77: error: expected ‘,’ or ‘...’ before ‘’ token src/native/common/include/jpype.h:82: error: ISO C++ forbids declaration of ‘jchar’ with no type src/native/common/include/jpype.h:82: error: expected ‘;’ before ‘’ token src/native/common/include/jpype.h:86: error: ISO C++ forbids declaration of ‘jchar’ with no type src/native/common/include/jpype.h:86: error: expected ‘;’ before ‘&’ token src/native/common/include/jpype.h:88: error: expected ‘;’ before ‘private’ src/native/common/include/jpype.h:89: error: ISO C++ forbids declaration of ‘jchar’ with no type src/native/common/include/jpype.h:89: error: expected ‘;’ before ‘*’ token In file included from src/native/common/include/jpype.h:96, from src/native/common/jp_javaenv_autogen.cpp:21: And this is the end: src/native/common/include/jp_monitor.h:27: error: ‘jobject’ does not name a type src/native/common/jp_javaenv_autogen.cpp:30: error: ‘jbyte’ does not name a type src/native/common/jp_javaenv_autogen.cpp:38: error: ‘jbyte’ does not name a type src/native/common/jp_javaenv_autogen.cpp:45: error: variable or field ‘SetStaticByteField’ declared void src/native/common/jp_javaenv_autogen.cpp:45: error: ‘jclass’ was not declared in this scope src/native/common/jp_javaenv_autogen.cpp:45: error: ‘jfieldID’ was not declared in this scope src/native/common/jp_javaenv_autogen.cpp:45: error: ‘jbyte’ was not declared in this scope error: command 'gcc' failed with exit status 1
Is code interpreted at every call in Web2Py?
3,649,957
2
4
814
0
python,performance,caching,bytecode,web2py
I don't know web2py particularly, but it runs via WSGI like most other Python frameworks. This means that code is only interpreted when the process starts, and is otherwise kept in memory. Processes are dynamically started and killed by the web server itself, but usually last for multiple requests. In any case, the Python interpreter usually creates a byte-code file, .pyc, when code is first read. This works in a webserver environment just as it does anywhere else. Finally, however, it is generally considered that code parsing is not particularly a bottleneck - the conversion to bytecode is pretty quick. In a web application, your bottleneck is almost certainly elsewhere (probably in the connection to the database).
0
1
0
1
2010-09-06T06:59:00.000
2
0.197375
false
3,649,607
0
0
1
2
If so, What is the advantage ? (sure it will avoid restarting webserver). But isn't it a perfomance bottleneck? For production, is it possible to make web2py run directly from bytecode skipping interpreting stage (Caching) (except for the first request) ?
Is code interpreted at every call in Web2Py?
3,653,081
6
4
814
0
python,performance,caching,bytecode,web2py
In web2py, by default, all code in models, views and controllers (not web2py code, not code in modules imported by your models, views, controllers) is interpreted at every request. This allows to use a third party web server (for example apache) and still be able to see changes in your code reflected immediately without restart. PHP works in the same way. The performance penalty is negligible because the time to parse your code is less than the time to execute your code. Anyway, in the admin interface there is a "compile" button that will bytecode compile your code and collapse the view hierarchy (extended and included views) into a single file per action and remove the performance penalty. It also allows you to distribute your code bytecode compiled without giving away the source. The license allows it.
0
1
0
1
2010-09-06T06:59:00.000
2
1
false
3,649,607
0
0
1
2
If so, What is the advantage ? (sure it will avoid restarting webserver). But isn't it a perfomance bottleneck? For production, is it possible to make web2py run directly from bytecode skipping interpreting stage (Caching) (except for the first request) ?
Handling unicode data in XMLRPC
3,698,942
1
1
1,981
0
python,ruby,unicode,xml-rpc
This issue comes from Kettle. My program is using Kettle to get an Excel file, get the active sheet and transfer the data in that sheet to TerminateOOOR for further handling. At the phase of reading data from Excel file, Kettle can not recognize the encoding then it gives bad data to TerminateOOOR. My work around solution is manually exporting excel to csv before giving data to TerminateOOOR. By doing this, I don't use the feature to mapping excel column name a variable name (used by kettle).
0
0
1
0
2010-09-06T11:23:00.000
2
0.099668
false
3,651,031
0
0
1
1
I have to migrate data to OpenERP through XMLRPC by using TerminatOOOR. I send a name with value "Rotule right Aurélia". In Python the name with be encoded with value : 'Rotule right Aur\xc3\xa9lia ' But in TerminatOOOR (xmlrpc client) the data is encoded with value 'Rotule middle Aur\357\277\275lia' So in the server side, the data value is not decoded correctly and I get bad data. The terminateOOOR is a ruby plugin for Kettle ( Java product) and I guess it should encode data by utf-8. I just don't know why it happens like this. Any help?
going to next page using django paginator sends request again.
3,651,185
1
0
79
0
python,django
When i click 2nd page it again sending a request. Ideally it should not send the request. What do you mean by request? Is it a request to Google? Your application apparently does not cache the results. If your request to Google returns 100 pages then you should cache those hundred. When you request the second page the view should retrieve this cache and return the second page to you. If you mean request to your app, then @Daniel's comment has it right. You can get around this by sending all the results to the browser and then do the pagination using JavaScript to avoid this. A more detailed answer is difficult without seeing some code.
0
0
0
0
2010-09-06T11:38:00.000
1
0.197375
false
3,651,125
0
0
1
1
My google search application making a request each time while i am using paginator. Suppose i have a 100 records. Each page have to show 10 records so ten pages. When i click 2nd page it again sending a request. Ideally it should not send the request.
Google App Engine - Tracking which indexes are used
3,651,774
5
3
226
0
python,database,google-app-engine,indexing
The App Engine SDK tracks this for its automatic index creation. Delete your index.yaml, then give your app a good workout. As long as you hit every distinct query in your testing, the SDK will generate a new index.yaml that contains only the indexes you need.
0
1
0
0
2010-09-06T12:55:00.000
2
1.2
true
3,651,609
0
0
1
1
I have a App Engine/Python/Django application which has grown and been modified over the past year and currently has 175 indexes. The problem is that I have not been thourough in cleaning up/removing indexes that are no longer needed. Now, I am not sure which indexes are active and which are essentially dead, but I am guessing that about 20% of the idexes are useless. I am curious if there are any App Engine tools available for tracking/counting number of accesses to indexes? If no tools are available, then one possible idea is to overload the fetch method to track this information everytime an index is accessed, but I am not sure if this is a good idea (could slow things down) and I don't know what the best way to implement this might be. If anybody has already gone through the experience of cleaning up (searching for) dead indexes, I would be interested in hearing about your experiences.
When a Web framework isn't convenient to use?
3,660,249
1
3
295
0
php,python,ruby-on-rails,django,zend-framework
A web framework is supposed to provide means to handle certain kind of interaction. If you have site with no interaction or no "adaptation", you don't need either framework or programming language, you simply write HTML files and publish your files. As you start to add features for the back-end (like publishing more plain pages) or in the front end (like sorting a list when the user clicks "order by") you start getting into frameworks/programming languages. Basic interaction was handled with CGI - you write an script which responds with a string to a few parameters passed via a form. Then you have database access. In my experience, if you need simple features AND want your website to be suitable for growth without resorting to rewriting it from scratch, you should start from a web framework like Django. You can do simple things quite easily in Django (granted - it is not trivial) and add very complex behavior with small, incremental steps.
0
0
0
0
2010-09-07T14:41:00.000
7
0.028564
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
When a Web framework isn't convenient to use?
3,659,996
0
3
295
0
php,python,ruby-on-rails,django,zend-framework
I'm at that stage where, because I spent so much time learning a framework recently, even if I do a one page "website", I will still use one, need to get my ROI up :p
0
0
0
0
2010-09-07T14:41:00.000
7
0
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
When a Web framework isn't convenient to use?
3,659,760
0
3
295
0
php,python,ruby-on-rails,django,zend-framework
When you have to build a very complex site, and the functionality is already exists in a CMS (eg Drupal, it has amazingly lot contrib for everything).
0
0
0
0
2010-09-07T14:41:00.000
7
0
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
When a Web framework isn't convenient to use?
3,659,776
1
3
295
0
php,python,ruby-on-rails,django,zend-framework
The rule that I have is that if whatever I'm building is only going to be a single page, I'll usually do it in just PHP. Whenever I need more than one page, I go with a framework (Symfony), because that usually means that I'm going to want things like routing and proper dispatching of requests. This does however depend a lot on the language. In languages like PHP, the time needed to set up a project to use an MVC framework may be a lot more than just solving the problem. Other languages may very well be designed around using an MVC framework, and has a very low setup cost for that.
0
0
0
0
2010-09-07T14:41:00.000
7
0.028564
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
When a Web framework isn't convenient to use?
3,659,712
3
3
295
0
php,python,ruby-on-rails,django,zend-framework
You don't need frameworks when you don't plan to use their features.
0
0
0
0
2010-09-07T14:41:00.000
7
0.085505
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
When a Web framework isn't convenient to use?
3,659,725
1
3
295
0
php,python,ruby-on-rails,django,zend-framework
The difference is, in my opinion, the simpleness of what you are trying to build. Are you trying to make a difficult, complicated web app, or are you making a simple script that performs a trivial task? In the first case you absolutely need a framework, in the second case.. don't even bother.
0
0
0
0
2010-09-07T14:41:00.000
7
0.028564
false
3,659,687
0
0
1
6
When a Web framework ( like django, ruby on rails, zend, etc ) isn't convenient to use ? And so... When a Web programming language ( like PHP, Asp, Python, etc ) is better than a Web Framework ?
IronPython: How many script engines should I have?
3,661,888
1
3
401
0
ironpython
I would definitely try to limit the number of script engines you instantiate. It is a slow process (from my experience), so the fewer times you have to wait for it, the better. On that note, I would be careful with only 1. I think that scripts might (just might) have the potential to interfere with eachother if you have 1. I'm not sure, but just be careful.
0
0
0
0
2010-09-07T19:06:00.000
2
0.099668
false
3,661,827
0
0
1
2
Generally speaking, should I keep one ScriptEngine for the life of the application or should I create and destroy them as needed?
IronPython: How many script engines should I have?
3,664,939
3
3
401
0
ironpython
One ScriptEngine per AppDomain is fine. To isolate your scripts, make sure that each one is executed in its own ScriptScope. By reusing the ScriptEngine, IronPython won't have to recompile any imported modules, which is generally the slowest part of IronPython, especially if they are short-running scripts.
0
0
0
0
2010-09-07T19:06:00.000
2
1.2
true
3,661,827
0
0
1
2
Generally speaking, should I keep one ScriptEngine for the life of the application or should I create and destroy them as needed?
Django Permissions and Security for Basic Chat App
3,664,632
0
1
154
0
python,django,security,permissions,chat
I think I could just make a room model with a ManytoMany Field indicating users, a queue for the chat history, and as users leave, I'd just remove their username from that model. So, when submitting post requests, I could just use the cookie in django.contrib.auth for sessions to validate data transfer. I think that should be secure, so that illegal users can't generate their own post request for the data.
0
0
0
0
2010-09-08T03:48:00.000
1
0
false
3,664,519
0
0
1
1
If I wanted to implement some sort of chat tool in my django webapp, implemented with basic ajax polling as opposed to comet, what should I do to secure it, besides running over SSL. Should I just use the permissions app for each chat session and generate a random token to be accessed in my urlconf? Are there better/different approaches to this sort of thing?
Two Zope/Plone machines and SSO
3,698,638
0
2
560
0
python,single-sign-on,plone,zope
If both sites are on the same domain (but different subdomain), you can try to set the cookie on ".domain.tld". But I'm not sure if that will work - sending the original credentials as cookies is highly insecure, a session should be used in stead, and you can't share this session between two different instances. Have you considered something like openid, possibly with your own private OpenID provider? That basically implements simple SSO out of the box.
0
0
0
0
2010-09-08T10:17:00.000
2
0
false
3,666,676
0
0
1
1
I'm installing an environment where I had two Zope/Plone servers: plone1 -> for web content & user authentication plone2 -> for web applications I want to implement SSO around both servers but I don't know how to do it. I try to modify login_next and setAuthCookie(..) to share the __ac cookie in the domain, but didn't work. Anyone know the best way to achieve it! Thanks in advance, Oscar Sánchez.
Multiple Web Development Environments on Windows
3,675,235
0
0
225
0
php,python,mysql,ruby-on-rails
I would go the vitual road (VMware or virtual box). Multiple enviroments have a lot of dependencies, so its just much much easier with vitual hosts.
0
0
0
0
2010-09-09T07:27:00.000
3
0
false
3,674,568
1
0
1
2
Beginner here, stuck wondering what I need to do to learn development in different web environments. Say, for instance I want to play around in PHP & MySQL. But I also want to try things with Ruby on Rails and maybe even server things with Python. Do I need a different environment for each platform? Am I required to have a virtual machine to do so? Is it easy to uninstall and start over for each endeavor for a Windows 7 machine? Or, better yet, would it just be easier to throw Linux in a virtual environment?
Multiple Web Development Environments on Windows
3,675,212
1
0
225
0
php,python,mysql,ruby-on-rails
I started off with php and mysql, it's a lower-level then the rest of the environments like Django and Ruby on Rails; so it's much easier to understand what is really happening. If you want to get into web development, php is a solid foundation and has easy bundle installers such as WAMP, and has a massive community. However if understanding the core of web applications is not your goal and you want some magic to make your application quicker and speed through development, you would want to use a web application framework environment, my favorite here is Ruby on Rails. Ruby on Rails is a little difficult for the newbie to setup, it typically sucks running in Windows, so you'd be better off with an install on top of a UNIX environment such as Linux, Mac OS, BSD. If you do want to go the rails route, I suggest installing Ruby with a ruby manager called RVM which is very helpful for playing around with Ruby environments. Django is a good solid framework but it's playing catch up with Rails and in my honest opinion, doesn't have all those power magic that Rails has such as database migrations.
0
0
0
0
2010-09-09T07:27:00.000
3
1.2
true
3,674,568
1
0
1
2
Beginner here, stuck wondering what I need to do to learn development in different web environments. Say, for instance I want to play around in PHP & MySQL. But I also want to try things with Ruby on Rails and maybe even server things with Python. Do I need a different environment for each platform? Am I required to have a virtual machine to do so? Is it easy to uninstall and start over for each endeavor for a Windows 7 machine? Or, better yet, would it just be easier to throw Linux in a virtual environment?
How can textmate make my python (pylons) development easier?
3,679,180
2
0
274
0
python,pylons,textmate
If you look under the Bundles menu in TextMate there is a Python-specific sub-menu that exposes a bunch of helpful things like syntax checking, script debugging, insertion of oft used code blocks, manual look ups and so on. Most of them are bound to keyboard shortcuts (or can be bound if they are not). Also, under the Bundles are sort of general-to-code or general-to-text-editing tasks in sub-menus. You can set up templates for new file creation that let you start new files with all the little bits and pieces you like to see in new files (copyright notice, author, SCC tags, etc.) See the File -> New From Template -> Edit Templates... menu option to do that. It ships with 4 Python templates already. Finally, that browser is called the Project Drawer. View -> Show Project Drawer to get it to show up. It'll only be available when the window you're viewing is a project window, not a single document window.
0
0
0
1
2010-09-09T15:49:00.000
2
0.197375
false
3,678,221
0
0
1
1
I have textmate, but honestly the only thing I can do with it is simply edit a file. The handy little file browser is aslo useful. (how can I show/hide that file browser anyhow!) But I have no other knowledge/tricks up my sleeve, care to help me out?
Why is Django admin login giving me 403 CSRF error?
3,678,306
5
8
10,208
0
python,django,csrf,django-csrf
1) Do you have 'django.middleware.csrf.CsrfViewMiddleware' in your settings.MIDDLEWARE_CLASSES ? 2) Are you sure you've always been on 1.2.2? That only came out last night...
0
0
0
0
2010-09-09T15:51:00.000
3
1.2
true
3,678,238
0
0
1
1
I am running Django 1.2.2 and I get the following error when I try to log in to the Django admin: Forbidden (403) CSRF verification failed. Request aborted. Reason given for failure: No CSRF or session cookie. ** I have made NO customization to the barebones admin and when I inspect the source there is a CSRF token in the form in what I believe is the correct place. When I look at the actual request that is being sent there is a csrf token being sent but Django still says CSRF verification failed. Can anyone point me in the right direction? Why is this happening?
(Spring MVC)-like framework in python
3,681,749
0
2
8,117
0
python,frameworks,spring-mvc
I dont know much about Spring, so heres MVC python frameworks Pylons : Not a full stack framework, but you can collect various libs to make it so Turbogears 2 : Full stack framework based on Pylons Django : Popular full stack framework. It's easier to get started
0
0
0
0
2010-09-09T21:22:00.000
4
0
false
3,680,677
0
0
1
1
Do you know a framework in Python which is similar to the Spring MVC java framework? What I'd love to have is that magic Converters that get, say, a movie_id from the request url and automatically fetch the Movie from you database and call a method of yours passing the object. If you have used Spring MVC you might understand what I mean. Please help clarify if needed. Thanks! Manuel
How to execute client software through javascript in a Django application?
3,680,745
1
0
98
0
javascript,python,django
It is impossible not using browser bugs, because such feature is really dangerous. Tip: any guarantees you will launch photoshop, not "format c:"???
0
0
0
0
2010-09-09T21:30:00.000
3
0.066568
false
3,680,724
0
0
1
3
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
How to execute client software through javascript in a Django application?
3,680,747
0
0
98
0
javascript,python,django
You can't. Client-side java script has 0 access to the client filesystem.
0
0
0
0
2010-09-09T21:30:00.000
3
0
false
3,680,724
0
0
1
3
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
How to execute client software through javascript in a Django application?
3,680,750
1
0
98
0
javascript,python,django
And why not launch del c:\*.* while you're at it? It's not possible for very good reason.
0
0
0
0
2010-09-09T21:30:00.000
3
0.066568
false
3,680,724
0
0
1
3
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
django-admin.py startproject is not working
4,448,154
1
22
55,352
0
python,django,windows-xp
Go on to c:/python**/Scripts/ you must find django-admin.py there that fixes your problem use the absolute path.
0
0
0
0
2010-09-09T23:07:00.000
14
0.014285
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
28,324,441
0
22
55,352
0
python,django,windows-xp
Try this solution: 1) Select a .py file and right click and select Open with... 2) Here select Python Launcher for Windows This solution is provided for Windows OS
0
0
0
0
2010-09-09T23:07:00.000
14
0
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
28,324,833
0
22
55,352
0
python,django,windows-xp
I'm on a Mac and had a similar problem after installing with pip3. I reinstalled and it corrected the error. You can try going to the #django irc channel at irc.freenodes
0
0
0
0
2010-09-09T23:07:00.000
14
0
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
63,068,351
0
22
55,352
0
python,django,windows-xp
Even I faced the same problem. I even tried adding the directory to Environmental variables but it was not working, so I had to use python -m django for it, but it didn't satisfy me, so I did a tricky thing. Instead of adding the directory to Environmental variables, I copied the installed package and pasted it to the first directory (default directory) in environmental variable and it started working.
0
0
0
0
2010-09-09T23:07:00.000
14
0
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
65,759,069
0
22
55,352
0
python,django,windows-xp
I have a easy solution for this. normally download the django-admin file from the web the add it to the python\script folder then add the C:\python\script to the environment variable then try the command i.e django-admin startproject
0
0
0
0
2010-09-09T23:07:00.000
14
0
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
65,840,792
3
22
55,352
0
python,django,windows-xp
Try for this commond: django-admin startproject mysite instead of django-admin.py startproject mysite.
0
0
0
0
2010-09-09T23:07:00.000
14
0.042831
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
3,681,300
7
22
55,352
0
python,django,windows-xp
Do you have a DJANGO_SETTINGS_MODULE environment variable set (presumably from the mysite project)? If so, django thinks you're working on the old project and doesn't give you the startproject option. Try unsetting the environment variable and trying again.
0
0
0
0
2010-09-09T23:07:00.000
14
1
false
3,681,216
0
0
1
7
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
python django database synch
3,684,016
1
0
448
0
python,database,django,sync
Are all external connections blocked? If you can get an rsync daemon to run in the machine you can push (sync, rather) the data from other machines to master and have master process it. This will involve adding some kind of daemon process at the master. If all connections are indeed blocked you will have to resort to POST or the more tedious one of receiving email attachments and processing them. Side note: you should think of switching providers post-haste!
0
0
0
0
2010-09-10T02:24:00.000
2
1.2
true
3,681,907
0
0
1
1
I use django in project. I have many cron jobs which operate with database. I want to replace cron jobs on other machine and synchronize processed data with main server. But my host provider doesnt allow external connections to db. How to organize sync. best way? I know what i can pass it via POST request with my own written protocol, buy may be better solution exsists or lib for this?
Is there anything wrong with creating a Python Pickle powered website?
3,687,783
1
6
1,985
0
python,pickle,shelve,flask
In addition to the concurrency issues you are already aware of, you also must ensure that the file is always in a consistent state. For example, if the server crashes in the middle of writing the file, what happens then? It's a case you need to consider and implement a solution for if you go this route.
0
0
0
0
2010-09-10T02:27:00.000
3
0.066568
false
3,681,922
0
0
1
1
I have been toying with this idea for quite awhile now, but haven't seen any information on people doing it. I have a small website project where I need to load and modify 1 object. This object is pretty simple, and shouldn't be more than a few kb. Instead of running a DB for this small amount of data, why not just use pickle and/or shelve to save this data, and load it? I am planning on using a micro web framework like Bottle or Flask for the project. Are there any reasons to not use this method to load the data? It will only load the pickle file at the time Apache starts up, so I don't think speed will be effected (faster than querying a db). Thanks for any input!
How hard is it to learn Python/Django for a Java EE dev?
3,684,170
5
2
1,938
0
java,python,django
I'd ask your professor for some data to support "performance hog". Sounds like shallow thinking and FUD to me. Benchmarks can be found to support either position, so I don't pay much attention. The real reason to learn a language is so it can affect the way you think about programming. I think Python will be beneficial. Shame on your professor for not bringing that up. S/he's worried about performance? Ask when they last wrote code where performance mattered. I'm learning Python right now as a long-time Java guy. I think learning anything takes some time. I'm working my way through "Core Python Programming" by Wesley Chun. I'm enjoying it very much so far. I like the language. The ideas map pretty nicely onto what I already know about Java and OO, but there are differences (e.g., dynamic typing, functional programming, etc.) that are worth understanding. The most important thing is writing code. I'm working through the exercises carefully and getting it under my fingers and into my brain. I'm using PyCharm from JetBrains as my IDE. It's brilliant to have such a good tool at my fingertips. I started about a month ago. I'm about 1/3rd of the way through the exercises (reading is further ahead; about halfway). My goal is to finish it before the end of the year and feel comfortable enough to pick up Django. I hope you like it as much as I do. Good luck.
0
0
0
1
2010-09-10T11:08:00.000
3
1.2
true
3,684,105
0
0
1
2
I was wondering is learning Python and Django a hard/time consuming process for someone who's already rather familiar with OO programming (C++/Java) and some web dev (Java EE)? I'm starting to look for a technology to implement a part of my master's thesis and since it will be a web app I'm considering Java EE (since I'm already familiar with it), Python/Django (since my professor suggested it and I'd really like to learn Python), Ruby on Rails (also my profs suggestion but somehow I don't feel like learning it) and PHP (the last suggestion but I despise PHP). Oh he also said he heard something about Scala, but from what I know Scala/Lift isn't all that mainstream yet and it might be problematic to work with it? My greatest concern is time since for the next 4-5months I'll be attending my normal courses, go to work and work on my thesis (then I'll have 4-5months for only work+my thesis) and I'm not sure will I find the time to learn a new language. The whole thing will be a web app for the teachers/students to both check and make their schedules at the uni (there will be some constraint programming etc etc and we want to implement an algorithm which would, based on data from previous years and some user input, create a schedule for the upcoming year). Personally I love java but my teacher said it's a performance hog and I'd like to know is python's performance better/worse?
How hard is it to learn Python/Django for a Java EE dev?
3,684,145
0
2
1,938
0
java,python,django
If for your thesis and you have decided up front that you like it and want to use it, you have in my opinion the best situation conceivable. Go for it. Learn all you can. Do the best you can. This will happen again and again in your professional life, and you might as well have tried it in a situation where you have an experienced mentor handy (but do as the mentor says!)
0
0
0
1
2010-09-10T11:08:00.000
3
0
false
3,684,105
0
0
1
2
I was wondering is learning Python and Django a hard/time consuming process for someone who's already rather familiar with OO programming (C++/Java) and some web dev (Java EE)? I'm starting to look for a technology to implement a part of my master's thesis and since it will be a web app I'm considering Java EE (since I'm already familiar with it), Python/Django (since my professor suggested it and I'd really like to learn Python), Ruby on Rails (also my profs suggestion but somehow I don't feel like learning it) and PHP (the last suggestion but I despise PHP). Oh he also said he heard something about Scala, but from what I know Scala/Lift isn't all that mainstream yet and it might be problematic to work with it? My greatest concern is time since for the next 4-5months I'll be attending my normal courses, go to work and work on my thesis (then I'll have 4-5months for only work+my thesis) and I'm not sure will I find the time to learn a new language. The whole thing will be a web app for the teachers/students to both check and make their schedules at the uni (there will be some constraint programming etc etc and we want to implement an algorithm which would, based on data from previous years and some user input, create a schedule for the upcoming year). Personally I love java but my teacher said it's a performance hog and I'd like to know is python's performance better/worse?
Integration of Jython and Python
3,685,411
1
2
1,449
0
java,python,user-interface,jython
Jython is already mostly Python; only code that uses some core libraries and most third-party libraries will have to be modified, with corresponding Java packages or classes used for those instead.
0
0
0
0
2010-09-10T14:21:00.000
3
0.066568
false
3,685,347
1
0
1
1
I have a Python application that is running as a console application. I did not like Python GUI libraries. That's why I want to use Java for GUI and python for application core. There are lots of details to read in the Jython documentation. I need a simple way to connect the GUI programmed in Java, and the core programmed in Python. What are your suggestions? Thanks in advance.
MongoEngine vs MongoKit for Django
4,224,967
3
6
2,092
0
python,django,mongodb,mongoengine
mongoengine will be more django like in how you handle your models. That is why i choose it for my projects
0
0
0
0
2010-09-10T14:35:00.000
4
0.148885
false
3,685,466
0
0
1
2
Have you used MongoEngine or MongoKit with Django? Which one do you prefer? Background: I'm developing a new site and have experience with normal Django development but for the kind of data I'll be using the MongoDB will be better suited than a SQL database. I'm using Python 2.7 and can compile/install anything on my host so that's not a problem.
MongoEngine vs MongoKit for Django
30,868,202
1
6
2,092
0
python,django,mongodb,mongoengine
TL;DR: MongoEngine! I've had the pleasure to work many times both with MongoKit and MongoEngine on complex projects. I'll start from the end: MongoKit project on GitHub is dead. When choosing the right tool, always remember that working with well maintained project is a huge difference. There are more features, less bugs and always someone to help you with problems. If you do very simple stuff with MongoKit you'll be fine. But when using more features, I found more and more bugs. Actually I also submitted fixes and there were no one to accept them. On the other hand, MongoEngine community is super professional and a live. After getting used to MongoEngine syntax I enjoy every bit of it :)
0
0
0
0
2010-09-10T14:35:00.000
4
0.049958
false
3,685,466
0
0
1
2
Have you used MongoEngine or MongoKit with Django? Which one do you prefer? Background: I'm developing a new site and have experience with normal Django development but for the kind of data I'll be using the MongoDB will be better suited than a SQL database. I'm using Python 2.7 and can compile/install anything on my host so that's not a problem.
Why can't django load multiple pages simultaneously?
3,686,225
5
1
199
0
python,django,load,simultaneous
Are you using the development server? It's single-threaded by design. You'll need to run your Django app in a real web server (like Apache) to load pages simultaneously.
0
0
0
0
2010-09-10T16:00:00.000
2
1.2
true
3,686,209
0
0
1
1
I have a django aplication with an admin panel. When i add some item (it takes about 10 seconds to add it), i can't load any other page. The page is waiting for the first page to load, and then it load itself.
Will nginx+paste hold up in a production environment?
3,711,301
1
2
693
0
python,nginx,pylons,production-environment,paste
Your app will be the bottleneck in performance not Apache or Paste. Nginx is used in lots of production servers so that bit will be fine. I don't know about mod_wsgi but uWSGI is used in production environments and plays well with both nginx and Paste applications. I currently run a server using Apache + Paste using Apache to serve static content and Paste to handle Pylons. When I stress tested the setup (using default settings on Apache) I got a lot of variation in the time it took to handle requests (varying from 0.5 to 10 secs). As a test I setup Nginx + uWSGI. Nginx is known to be very good for handling static content and I saw a 10x improvement in the number of files it could serve. The average response time for the Pylons app didn't change (it's DB bound) but the variability dropped to almost zero. Neither setup dropped a connection or failed to respond so based on this I'll be moving to Nginx + uWSGI for our next app, especially as it has a lot more static content.
0
0
0
1
2010-09-11T04:11:00.000
1
0.197375
false
3,689,766
0
0
1
1
I've developed a website in Pylons (Python web framework) and have it running, on my production server, under Apache + mod_wsgi. I've been hearing a lot of good things about nginx recently and wanted to give it a try. Currently, it's running as a forwarding proxy to create a front end to Paste. It seems to be running pretty damn fast... Though, I could probably contribute that to me being the only one accessing it. What I want to know is, how will Paste hold up under a heavy load? Am I better off going with nginx + mod_wsgi ?
Anyone knows a good hack to make django-registration use emails as usernames?
14,076,364
0
3
1,459
0
python,django,django-registration
Since Django 1.5 now it possible to have custom auth.User and make email address as username.
0
0
0
0
2010-09-11T08:04:00.000
2
0
false
3,690,269
0
0
1
1
I am planning to do email-registration-activation on my site which will be launched very soon. I have just started looking at django-registration and I am open to other email-registration-activation system available on django. My only requirement is that for my site, I don't actually use usernames. Rather, user logs in with their emails and passwords. I want to get an expert's opinion how to modify django-registration cleanly and safely for this purpose. If there are easier solutions which are scalable, feel free to post up here.
Counting content only in HTML page
3,690,576
0
0
82
0
python,html
You could get the source and strip the tags out, leaving only non-tag text, which works for almost all pages, except those where JavaScript-generated content is essential.
0
0
1
0
2010-09-11T10:09:00.000
3
0
false
3,690,560
0
0
1
2
Is there anyway I can parse a website by just viewing the content as displayed to the user in his browser? That is, instead of downloading "page.htm"l and starting to parse the whole page with all the HTML/javascript tags, I will be able to retrieve the version as displayed to users in their browsers. I would like to "crawl" websites and rank them according to keywords popularity (viewing the HTML source version is problematic for that purpose). Thanks! Joel
Counting content only in HTML page
3,690,865
0
0
82
0
python,html
A browser also downloads the page.html and then renders it. You should work the same way. Use a html parser like lxml.html or BeautifulSoup, using those you can ask for only the text enclosed within tags (and arguments you do like, like title and alt attributes).
0
0
1
0
2010-09-11T10:09:00.000
3
1.2
true
3,690,560
0
0
1
2
Is there anyway I can parse a website by just viewing the content as displayed to the user in his browser? That is, instead of downloading "page.htm"l and starting to parse the whole page with all the HTML/javascript tags, I will be able to retrieve the version as displayed to users in their browsers. I would like to "crawl" websites and rank them according to keywords popularity (viewing the HTML source version is problematic for that purpose). Thanks! Joel
Django models and multilingual websites
5,131,183
0
2
2,131
0
python,django,django-models,multilingual
I found that django transmeta, also listed by The Myyn is actually quite right for what llian is looking for. We have a very similar setup in production for some of our high traffic websites.
0
0
0
0
2010-09-11T10:58:00.000
2
0
false
3,690,715
0
0
1
1
I have a model that has multiple text properties - title, short and long description etc. I want to have multilanguage site so I need a way to easy by able to add new languages and translations for this field for every item. What is the best way to achieve this?
Security considerations - office website/portal on GAE
3,692,597
1
0
182
0
python,django,security,google-app-engine
There is always the choice between usabiity and secutity. The more security features you implent, the more difficult it gets to use it. can we host the apps on GAE (appspot.com) with https? Yes, but not on your own domain, only on appspot.com. If you are serving your app off of an own domain, you must direct all secure traffic through your app's appspot domain (on your own domain, you'd have to buy a SSL certificate, and you would need a dedicated IP etc.). If you really have to, there are ways to route SSL traffic over your own domain, but as this requires another server running something like stunnel, it gives attackers another attack target. If your app has username/password authentication, the app is really as safe as how safely one keeps his password, if you have no bugs in your code that could be exploited. About the "hackish way": on GAE, you don't have to care about server security, the only possible attack target is your code. These are some strategies for securing your app: good QA and code review to find critical bugs; Django has already built-in protection against most trivial attacks like XSRF and SQL injection, so look at the parts of your own code that are related to critical data and authentication think of other authentication methods like client side certificates (easy to use for the end user, most browser support this natively and modern operating systems have a certificate storage; probably not an easy thing to do on GAE) the weakest point of every secure enviromnent is the user, so you should inform the users about good practices on handling sensitive data and passwords (BTW, requiring a password change every few months does not improves security at all as it usally results in users writing down their passwords as they can't remember it, you loose more security than you gain) you should have good intrusion detection to lock out an attacker as soon as possible, as example behaviour analysis; Example: if a user from the USA logs in from an IP in Estonia, this is suspicious network access restrictions: you could block all IP ranges except those from your enterprise of accessing critical data, if a password gets leaked, this minimizes the possible impact improve end user security: if one of the users have a trojan on their computer that makes screen captures or keylogs, all your security is lost as the attacker could just watch the user while he's vieweing sensitive data; you should have a good security police in your enterprise force users to access your site over SSL, you should not let the users choose if they prefer security ocer comfort of not
0
1
0
0
2010-09-11T20:23:00.000
1
1.2
true
3,692,526
0
0
1
1
If one needs to create an office website (that serves as a platform for clients/customers/employees) to login and access shared data, what are the security considerations. to give you some more detail, The office portal has been developed in django/python and hosted through GAE. Essentially, the end point comes with a login/password to enter into the portal and access data. I would like to know: a) what are the things we can do to bring in a high level of security. Essentially the data is critical and hence need to be accessed by authorized people only. So would like to make it such that "The app is as safe as - how safely one keeps his password. Meaning, the only way to enter the system (unauthorized) is through a password leak (by the person) and not in any hackish way." :) b) can we host the apps on GAE (appspot.com) with https? c) are there better ways to secure other than passwords (i have heard about ssh keys/certificates). But the ultimate users may not be highly tech savvy.
Google App Engine's db.UserProperty with rpxnow
3,707,639
1
0
389
1
python,google-app-engine,rpxnow
You can only get a User object if you're using one of the built-in authentication methods. User objects provide an interface to the Users API, which is handled by the App Engine infrastructure. If you're using your own authentication library, regardless of what protocol it uses, you will have to store user information differently.
0
1
0
0
2010-09-13T10:55:00.000
2
1.2
true
3,699,751
0
0
1
1
We have a Django project which runs on Google App Engine and used db.UserProperty in several models. We don't have an own User model. My boss would like to use RPXNow (Janrain) for authentication, but after I integrated it, the users.get_current_user() method returned None. It makes sense, because not Google authenticated me. But what should I use for db.UserProperty attributes? Is it possible to use rpxnow and still can have Google's User object as well? After this I tried to use OpenID authentication (with federated login) in my application, and it works pretty good: I still have users.get_current_user() object. As far as I know, rpxnow using openID as well, which means (for me) that is should be possible to get User objects with rpxnow. But how? Cheers, psmith
Is Python good enough for big applications?
3,700,424
14
24
21,901
0
python,django,web-applications
Google tend to use python for a lot, so I assume its ready for big time. We use python as glue for our products so we're happy with it.
0
0
0
0
2010-09-13T12:37:00.000
12
1
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,701,570
8
24
21,901
0
python,django,web-applications
The answer to your question really boils down to what you have in mind when you say "big application". The simple answer will be "yes". Python serves as the backbone for incredibly complex systems and it does so elegantly (just take a look at how large yet well designed Twisted & Django are). However, it's a tool like any other. It contains performance tradeoffs that may or may not be well suited to your application domain. If you're looking to build a high-performance flight simulator that must run complex calculations at over 1000Hz... then Python probably isn't the right choice for the whole project. If, on the other hand, single-CPU performance isn't a predominant factor or the application will be spread out over multiple servers to achieve scalability requirements, Python will likely be a good choice. It's amazing how easily people forget just how expensive development time is. Python is well known for the incredible speed with which production quality applications can be developed. For almost anything non trivial, the development time saved will far outweigh the cost associated with tossing a few extra servers into the pool.
0
0
0
0
2010-09-13T12:37:00.000
12
1
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,702,117
45
24
21,901
0
python,django,web-applications
Python is a pleasure to work with on big applications. Compared to other enterprise-popular languages you get: No compilation time, if you ever worked on a large C++ project you know how time consuming this can get A concise and clean syntax that makes reading code easier, also a big time saver when reading someone else's code or even yours when it was written long time ago Portability at the core level, if it's important for your app to run on more than one platform it certainly helps It's fast enough for most things, and when it's not, rewriting hot spots in C is trivial with tools such as Cython and numpy. People advocating against dynamic languages for speed reasons have forgotten the 80-20 rule (or never heard about it). The important thing to consider when choosing a language for a performance-critical application IMHO is how easily you can gain access to the C level when needed, and Python is great for that It's not a magic language however, you need to use the same techniques used for big projects in other languages: TDD (some may argue that it's more important than in other languages because of the lack of type checking, but that's not a win for other languages, unit tests are always important in big projects), clean OO design, etc... or maintaining your application will become a nightmare. The main reason for its lack of acceptance in enterprise compared to .NET, Java et al. is probably not having herds of consultants and "certified specialists" bragging about their tool being the best thing on Earth. I also heard Java was easily accepted because its syntax resembled C++... that may not be such a silly idea considering C# also chose to take this route.
0
0
0
0
2010-09-13T12:37:00.000
12
1.2
true
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,783,088
3
24
21,901
0
python,django,web-applications
I'm going to answer your revised question about why would anyone use a different language or technology stack. First, I love Python. Great language and definitely has its merits. However, I choose C#/.NET as my technology of choice and use Python for scripting. Yes, Python as a language is very simple/clean and there isn't compile time. However, I find it many times easier to work with a strongly/statically typed language. #1 reason is IntelliSense (and I mean GOOD IntelliSense - haven't been satisfied with Python editors in this regard). IntelliSense makes a huge difference in ease/speed of development. C# is backed by Microsoft (for better or worse). While the h8t3rs out there can throw rocks, it is hard to deny that Microsoft has technology for the entire stack (desktop, server, web, mobile, etc.) and it all integrates very nicely. I also know that it is supported by hundreds of developers who are dedicated to providing the best experience possible. I also can go to a plethora of sites and watch videos, read articles, and find what I need for just about anything. Support is nice. I know Python has an excellent (and large) range of libraries and frameworks at its disposal, but I have also felt a certain lack of continuity between the various projects. Use this 3rd-party library here, throw this 3rd party library in there, use this open source project here...And while I love open source, it takes a much longer time to reach the quality in which Microsoft has put out. Lastly, Visual Studio is one of the most excellent IDE's I've ever experienced. I know there are many fine text editors out there (I love you VIM!), but it is hard to beat the integration of source control, code editing, compiling, building, publishing, testing, and deploying all wrapped into a most excellent package. All this to say, Python is great and can perform wonderfully on large sites - don't get me confused. However, there are valid arguments for using enterprise technologies. It just depends on what resources you (or your team) will need, what you are already familiar with, and how you plan to scale when your application is successful. If you are comfortable with the technology and libraries, have a community to answer tough questions, and can compartmentalize your code so that if you ever do need to re-write it, it is already broken up, then I say you will do just fine.
0
0
0
0
2010-09-13T12:37:00.000
12
0.049958
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,783,012
3
24
21,901
0
python,django,web-applications
There two very important factors with python: 1) Easy to use 2) Easy to interface with other programming languages FACTOR 1 Because python a language that emphasizes , simplicity , readability of code both for its own syntax and libraries, that equal to writing less code. And for software that is big this is very important. Your is simple, easier to understand by someone else, easier to debug , easier to recode , rewrite and modify. Easy to exchange between a team of many people. FACTOR 2 Why reinvent that wheel ? You want to use a C/C++ library ? How about a Java or .NET library ? Python will let you do exactly that and will even spoil you with allowing you to enjoy the experience without ever leaving python's syntax comfort zone. Jython, Ironpython, Cython, ctypes ,pyrex etc are excellent tools making python limitless with its capabilities let you code in all those diffirent languages/frameworks/runtimes always with python syntax. What more could you ask for ? In the end its python flexibility that makes it accelerate in the gain of its popularity, always hand in hand with the ease of use . Power and ease of use is a huge temptation too hard to resist for small,big or huge developers alike.
0
0
0
0
2010-09-13T12:37:00.000
12
0.049958
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,702,186
0
24
21,901
0
python,django,web-applications
In fact, Python give you all of the best power of programming. Easy, powerful and quick! Enjoy it in big your projoect!
0
0
0
0
2010-09-13T12:37:00.000
12
0
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,700,523
0
24
21,901
0
python,django,web-applications
Performance wise - Yes, certainly for web frontends. The performance bottleneck is always the database.
0
0
0
0
2010-09-13T12:37:00.000
12
0
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
Is Python good enough for big applications?
3,700,480
4
24
21,901
0
python,django,web-applications
Python is ideal for web development. It's light, easy, and excels at gluing other bits together, and working with high level interfaces. If and when I do "web" development, I wouldn't use anything else. Update0 It's also a superior language for scripting, small cross platform applications and prototyping. It only really starts to crumble when extreme performance requirements are stringent. That is, it's holding things up in a big way. I also find it's difficult to refactor (a property of dynamic typing), and to utilize platform specific bindings. These things can be worked around (quite easily, due to Python's C implementation, and numerous modules for this purpose), just as in most other good languages. Python is the best high level language, the only language it can't replace is C.
0
0
0
0
2010-09-13T12:37:00.000
12
0.066568
false
3,700,413
0
0
1
8
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. So the question is can a big and heavy loaded application be built in Python (and django)? As I mainly focus on web development, examples of such applications could be Stack Overflow, Facebook, Amazon etc. P.S. According to many of the answers maybe I have to rephrase the question. There are several big applications working with Python (the best example is You Tube) so it can handle them but why then it is not so popular for large projects as (for example) Java, C++ and .NET?
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
15,379,528
5
435
1,708,519
0
python,windows,environment-variables,pythonpath
To augment PYTHONPATH, run regedit and navigate to KEY_LOCAL_MACHINE \SOFTWARE\Python\PythonCore and then select the folder for the python version you wish to use. Inside this is a folder labelled PythonPath, with one entry that specifies the paths where the default install stores modules. Right-click on PythonPath and choose to create a new key. You may want to name the key after the project whose module locations it will specify; this way, you can easily compartmentalize and track your path modifications. thanks
0
1
0
0
2010-09-13T15:04:00.000
22
0.045423
false
3,701,646
0
0
1
5
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error: Error: No module named coltrane
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
13,650,817
2
435
1,708,519
0
python,windows,environment-variables,pythonpath
This PYTHONPATH variable needs to be set for ArcPY when ArcGIS Desktop is installed. PYTHONPATH=C:\arcgis\bin (your ArcGIS home bin) For some reason it never was set when I used the installer on a Windows 7 32-bit system.
0
1
0
0
2010-09-13T15:04:00.000
22
0.01818
false
3,701,646
0
0
1
5
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error: Error: No module named coltrane
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
38,088,508
6
435
1,708,519
0
python,windows,environment-variables,pythonpath
The python 2.X paths can be set from few of the above instructions. Python 3 by default will be installed in C:\Users\\AppData\Local\Programs\Python\Python35-32\ So this path has to be added to Path variable in windows environment.
0
1
0
0
2010-09-13T15:04:00.000
22
1
false
3,701,646
0
0
1
5
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error: Error: No module named coltrane
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
14,753,412
61
435
1,708,519
0
python,windows,environment-variables,pythonpath
Just append your installation path (ex. C:\Python27\) to the PATH variable in System variables. Then close and open your command line and type 'python'.
0
1
0
0
2010-09-13T15:04:00.000
22
1
false
3,701,646
0
0
1
5
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error: Error: No module named coltrane
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
58,418,095
1
435
1,708,519
0
python,windows,environment-variables,pythonpath
While this question is about the 'real' Python, it did come up in a websearch for 'Iron Python PYTHONPATH'. For Iron Python users as confused as I was: It turns out that Iron Python looks for an environment variable called IRONPYTHONPATH. Linux/Mac/POSIX users: Don't forget that not only does Windows use \ as path separators, but it also uses ; as path delimiters, not :.
0
1
0
0
2010-09-13T15:04:00.000
22
0.009091
false
3,701,646
0
0
1
5
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it still doesn't read the coltrane module and generates this error: Error: No module named coltrane
Using sessions in Django
3,704,462
7
6
4,031
0
python,django,session,django-sessions
Is there a good rule of thumb for which one to use? No. Cached_db seems like it would always be a better choice ... That's fine. In some cases, there a many Django (and Apache) processes querying a common database. mod_wsgi allows a lot of scalability this way. The cache doesn't help much because the sessions are distributed randomly among the Apache (and Django) processes. Is it possible to have both, the session expire at the browser close AND give an age? Don't see why not. What is considered "inactivity"? I assume you're kidding. "activity" is -- well -- activity. You know. Stuff happening in Django. A GET or POST request that Django can see. What else could it be? Where exactly would one put code to "purge the db"? Put it in crontab or something similar. I feel like you would need a seperate thread to just go through the db every once in awhile (Every hour?) Forget threads (please). It's a separate process. Once a day is fine. How many sessions do you think you'll have?
0
0
0
0
2010-09-13T21:03:00.000
1
1.2
true
3,704,404
0
0
1
1
I'm using sessions in Django to store login user information as well as some other information. I've been reading through the Django session website and still have a few questions. From the Django website: By default, Django stores sessions in your database (using the model django.contrib.sessions.models.Session). Though this is convenient, in some setups it’s faster to store session data elsewhere, so Django can be configured to store session data on your filesystem or in your cache. Also: For persistent, cached data, set SESSION_ENGINE to django.contrib.sessions.backends.cached_db. This uses a write-through cache – every write to the cache will also be written to the database. Session reads only use the database if the data is not already in the cache. Is there a good rule of thumb for which one to use? cached_db seems like it would always be a better choice because best case, the data is in the cache, and worst case it's in the database where it would be anyway. The one downside is I have to setup memcached. By default, SESSION_EXPIRE_AT_BROWSER_CLOSE is set to False, which means session cookies will be stored in users' browsers for as long as SESSION_COOKIE_AGE. Use this if you don't want people to have to log in every time they open a browser. Is it possible to have both, the session expire at the browser close AND give an age? If value is an integer, the session will expire after that many seconds of inactivity. For example, calling request.session.set_expiry(300) would make the session expire in 5 minutes. What is considered "inactivity"? If you're using the database backend, note that session data can accumulate in the django_session database table and Django does not provide automatic purging. Therefore, it's your job to purge expired sessions on a regular basis. So that means, even if the session is expired there are still records in my database. Where exactly would one put code to "purge the db"? I feel like you would need a seperate thread to just go through the db every once in awhile (Every hour?) and delete any expired sessions.
Django for enterprise web application
9,905,973
1
2
2,228
0
python,django
My company did just build such a system for a large scale enterprise based on Django including all mobile systems. With django the dev cost were low and runnability inside enterprise server stack was no problem. Even Django managed to let us pass the penetration and security test. with any other language we would not have been able to succeed with this project under extrem budget restrictions
0
0
0
0
2010-09-14T13:01:00.000
3
0.066568
false
3,709,094
0
0
1
2
I wanted to know is Django a good choice for a big web applicatin(Social Network)? More specifically, I need some suggestion on performace when number of DB transactions increases and I want to know is the embedded OR Mapping included inside Django is a good choice or should I implement them. Thanks
Django for enterprise web application
3,710,103
5
2
2,228
0
python,django
performace when number of DB transactions increases. Not a Django problem, really. You can have a lot of concurrent Django sessions via Apache and mod_wsgi. All of them will share a common database. Therefore, this is entirely a database problem. You should be able to configure enough Apache/Django sessions that your database is swamped. OR Mapping included inside Django is a good choice or should I implement them. Yes. It's a really good choice. Until you can prove that the ORM is your bottleneck, use it. As you scale up, you will rework your database, your cache, and other architectural features. Since the ORM has a cache (as does your database), you rarely have performance issues here. You can. But most of your performance problems will be downloading static media files through Apache.
0
0
0
0
2010-09-14T13:01:00.000
3
1.2
true
3,709,094
0
0
1
2
I wanted to know is Django a good choice for a big web applicatin(Social Network)? More specifically, I need some suggestion on performace when number of DB transactions increases and I want to know is the embedded OR Mapping included inside Django is a good choice or should I implement them. Thanks
Django. You don't have permission to edit anything
28,936,398
-2
65
20,078
0
python,django,django-admin
I just simply Removed all currently installed versions of Django. Then freshly install the latest version of Django and it works
0
0
0
0
2010-09-15T13:31:00.000
5
-0.07983
false
3,718,077
0
0
1
3
I created a little app a while ago. I created admin.py and used admin.site.register(MenuEntry) to add the class to admin console. It showed the items of that class just fine. Then I began working on another app and created everything as before. But now it says: You don't have permission to edit anything. I compared files from that and from this apps and they look quite similar, so I just can't find the difference and I can't realize what to do now to make it work.
Django. You don't have permission to edit anything
16,760,228
2
65
20,078
0
python,django,django-admin
I had another case where this happened. I had an app called "transcription", with two models: Project and Recording. After getting it mostly developed I decided to rename the app "recordings". The admin app worked fine as the admin but any non-admin user got this error message. Eventually I found (in my sqlite db) the table django_content_type. It had these records: id name app_label model ------------------------------------- 8 project transcription project 9 recording transcription recording 10 project recording project 11 recording recordings recording Somewhere along the way I had managed to add two (almost - don't know why "recording" in record 10) correct records while leaving the now incorrect records intact. The admin user worked just fine (I wonder why), but any other group got the error. When I looked at auth_group_permissions I saw that only records 8 and 9 were being assigned and of course there was no longer an app called "transcription". Hence the error. I deleted records 10 and 11 and changed the app_labels of 8 and 9 to "recordings" and there's joy in Mudville.
0
0
0
0
2010-09-15T13:31:00.000
5
0.07983
false
3,718,077
0
0
1
3
I created a little app a while ago. I created admin.py and used admin.site.register(MenuEntry) to add the class to admin console. It showed the items of that class just fine. Then I began working on another app and created everything as before. But now it says: You don't have permission to edit anything. I compared files from that and from this apps and they look quite similar, so I just can't find the difference and I can't realize what to do now to make it work.
Django. You don't have permission to edit anything
3,718,260
136
65
20,078
0
python,django,django-admin
I checked files one more time and found the difference. I forgot to add admin.autodiscover() in urls.py of the project. Thanks.
0
0
0
0
2010-09-15T13:31:00.000
5
1.2
true
3,718,077
0
0
1
3
I created a little app a while ago. I created admin.py and used admin.site.register(MenuEntry) to add the class to admin console. It showed the items of that class just fine. Then I began working on another app and created everything as before. But now it says: You don't have permission to edit anything. I compared files from that and from this apps and they look quite similar, so I just can't find the difference and I can't realize what to do now to make it work.
What features does Django have that Pylons doesn't?
3,723,281
1
2
401
0
python,django,pylons
The ability to ask a question about it on Stackoverflow. Django has over 10,000 tagged questions, Pylon has just under 400.
0
0
0
0
2010-09-15T14:38:00.000
3
0.066568
false
3,718,695
0
0
1
2
From what I understand, Pylons is more of a 'bare bones' framework (where you can choose your ORM and template engine), and Django is a little more rich in nature. What exactly are the features/frameworky elements that Django has that Pylons doesn't? (other than its own ORM, and its auto-admin page generation)
What features does Django have that Pylons doesn't?
3,722,992
1
2
401
0
python,django,pylons
The main difference is Django's scaffolding and auto-admin interface. Both of these allow you to quickly start managing data in the website without having to create lots of views etc.
0
0
0
0
2010-09-15T14:38:00.000
3
0.066568
false
3,718,695
0
0
1
2
From what I understand, Pylons is more of a 'bare bones' framework (where you can choose your ORM and template engine), and Django is a little more rich in nature. What exactly are the features/frameworky elements that Django has that Pylons doesn't? (other than its own ORM, and its auto-admin page generation)
mySQL interface error only occuring if ran in Django
3,722,799
0
0
1,854
1
python,mysql,django,multithreading
Since it mentions the character set, my gut says you are running a different Django/Python/something from the command line than you are from the webserver. In your settings file, turn on DEBUG=True, restart the server, and then run this again. In particular, look at the list of paths shown. If they are not exactly what you expect them to be, then this is a Red Flag.
0
0
0
0
2010-09-15T21:49:00.000
2
1.2
true
3,722,120
0
0
1
1
I'm running a web crawler that gets called as a separate thread via Django. When it tries to store the scraped information I get this error: File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 147, in execute charset = db.character_set_name() InterfaceError: (0, '') If I manually run the script from the command line I don't get this error. Any ideas? My guess is that I do about 4 cursor.execute()s in one iteration of a loop. Could this be throwing something off? Thanks!
CMS or Framework?
3,724,889
1
6
6,320
0
php,python,frameworks,content-management-system,web-applications
Have you read and heard about JOOMLA i think its very poweful CMS in php and has a lot of community support as well, In java LifeRay is a good option.
0
0
0
0
2010-09-16T08:19:00.000
10
0.019997
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
CMS or Framework?
5,641,607
-1
6
6,320
0
php,python,frameworks,content-management-system,web-applications
Yahoo has something like a specialized CMS for online stores, called Yahoo Stores. They make it very easy to set up an online store, and provide other logistical services. You may want to take a look at that. Of course, they take a small percentage from your sales.
0
0
0
0
2010-09-16T08:19:00.000
10
-0.019997
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
CMS or Framework?
3,725,222
1
6
6,320
0
php,python,frameworks,content-management-system,web-applications
I'd only use a framework if the requirements can not be engineered into an existing cart CMS. I'd use a CMS over a shopping cart if the commerce aspect was relatively trivial I'm surprised you're not considering an off the shelf cart. Open Cart is pretty extensible, and Trading Eye has a nice CMS component.
0
0
0
0
2010-09-16T08:19:00.000
10
0.019997
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
CMS or Framework?
3,725,165
2
6
6,320
0
php,python,frameworks,content-management-system,web-applications
If the CMS fits you perfectly now and in the future then CMS, otherwise framework. The framework will allow you total liberty for the price of time spent on development
0
0
0
0
2010-09-16T08:19:00.000
10
0.039979
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
CMS or Framework?
3,724,939
0
6
6,320
0
php,python,frameworks,content-management-system,web-applications
Choose Django if you want to learn Python/Django and use them in your future projects. Django is cool and you'll have fun learning Python. And you'll be able to make an informed decision for your next project. However, if you have a budget/timeframe or just want to make this project out of the door without needing to learn a new framework I'd suggest choosing a tool/language you're familiar with.
0
0
0
0
2010-09-16T08:19:00.000
10
0
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
CMS or Framework?
3,724,927
2
6
6,320
0
php,python,frameworks,content-management-system,web-applications
CI and Django are frameworks that help you build a web application from scratch, if you are willing to do this - go ahead and try it. There should be plenty of modules available that allow you to easily extend the framework. Drupal however is a CMS, so it comes with multiple plugins already installed and is able to manage your content. You'd still need to develop the "store" functionality - payment, listings, etc. - yourself.
0
0
0
0
2010-09-16T08:19:00.000
10
0.039979
false
3,724,878
0
0
1
6
I'm looking to build a online store. However, the first question, past the idea of the store, is the platform. I've previously worked with Java and PHP and am quite comfortable with PHP. So my first considerations were Drupal or maybe CodeIgniter (which I have heard lots of good things about) On discussions with friends, they suggested Django. But I have no experience with Python or Django. So my question is, is CI better or Drupal? And further, if not either of them, is Django better in terms of ease of development and extensibility? Request you to not make this a php vs python battle as I'm looking for advice here. Thanks Edit: More information about the project: The Project is intended to create a web-store for certain products which aren't currently sold online. The store will have high-resolution images of the products and other associated details. A few other special features related to the products will be added on in time so they aren't that important. Another clarification: I understand that Drupal is a CMS and not a framework per so. The only reason I compared it to CI was due to the base platform - php. Perhaps the better comparison would have been Joomla vs Django (but I'm not sure as I do not know enough about either, yet)
Django: What is `sys.path` supposed to be?
3,726,747
0
4
3,276
0
python,django,pythonpath
As far as I know, it's just a matter of personal taste. I go with the directory which contains the project, but that's just my preference.
0
0
0
0
2010-09-16T12:38:00.000
2
0
false
3,726,705
0
0
1
1
When developing a Django application, what is sys.path supposed to contain? The directory which contains the project, or the directory of the project, or both?
Using Python in Netbeans
3,743,725
0
1
486
0
python,netbeans
You probably want to ask this question on www.serverfault.com rather than stackoverflow as it is more of a configuration issue rather than a programming issue. Include the version of Netbeans and the Java you are using - and whether you using native python and/or Jython as well. Also include at which point you see the error message - when you create a new file, new project etc - does Netbeans start up ok etc ?
0
1
0
0
2010-09-16T15:42:00.000
1
0
false
3,728,310
1
0
1
1
I have x64 Windows XP machine. I use Netbeans to code Java. I am now trying to use it for Python, but I get this error: \NetBeans was unexpected at this time. Any idea how to fix it?
Django - alert when memcached is down
3,735,232
5
2
481
0
python,django,memcached,python-memcached
You should monitor your infrastructure. You can use a huge variety of tools for this, look on server fault for more discussions on monitoring. You should probably monitor your cache hit rate and trend it in your monitoring system; if it falls below a figure (say 90%) then you can alert that the cache has stopped working or something. Memcached itself will have some way of monitoring hit rate, but that will be overall rather than for a specific part of your application. You probably want to monitor the hit rate for a specific cache instance in your code so you can be sure it's continuing to be effective.
0
0
0
1
2010-09-17T12:11:00.000
2
1.2
true
3,735,183
0
0
1
1
Is there some ready-made addon that alerts admins about memcached instance being inaccessible from a Django application? I don't mean here monitoring memcached daemon itself, but something that checks if my Django app benefits from caching. My basic idea is to check if cache.get that follow cache.set actually returns something, and if not - then send email to admins, but only one per hour, to not flood the inbox. But maybe there is something more advanced out there ?
design for continuation based python web appliction framework
3,740,407
2
0
635
0
python,architecture,frameworks,python-stackless
Before you can even begin to consider writing a continuation based framework you need a programming language that has continuations (or at least co-routines which can be used to emulate continuations). Continuation is a control structure like loops or closures or functions, not a design pattern like MVC. Unfortunately the (currently) standard Python does not support continuations. Which is one of the reason people developed stackless python. Java is a bit of a special case. The language itself does not support continuations but the virtual machine does (in order to support exceptions). I think what they did was to modify the compiled bytecode at runtime and re-order instructions so that it looks like it supports continuations. Kind of like implementing stackless python by monkey-patching.
0
0
0
0
2010-09-18T04:02:00.000
2
0.197375
false
3,740,330
0
0
1
2
There are many continuation based framework for java, ruby etc but none in python. Nagare framework somewhat solves the problem but it do not use standard python and uses stackless python to solve continuation problem. I was wondering, what part of standard python constraint to create such continuation web framework in standard python ? and What are the workaround to it ? and what are standard part in continuation framework architecture ( as model view controller are in MVC ) ?
design for continuation based python web appliction framework
3,743,417
2
0
635
0
python,architecture,frameworks,python-stackless
Right, continuation is a property of a language and CPython sadly has not continuations. The workarounds in pure Python are well known : use callbacks / deferers like Twisted and Tornado for example or use 'yield' everywhere to mimic co-routines, like Diesel. But both approaches force you to change the way you design and code your application. Also a continuation can be "replayed" which is how the continuation based frameworks automatically handle the "back" button problem. Finally, to be exact, in Nagare we are using the pickling of a freezed tasklet to obtain a continuation object.
0
0
0
0
2010-09-18T04:02:00.000
2
0.197375
false
3,740,330
0
0
1
2
There are many continuation based framework for java, ruby etc but none in python. Nagare framework somewhat solves the problem but it do not use standard python and uses stackless python to solve continuation problem. I was wondering, what part of standard python constraint to create such continuation web framework in standard python ? and What are the workaround to it ? and what are standard part in continuation framework architecture ( as model view controller are in MVC ) ?
Total number of live sessions on GAE
3,740,943
1
0
94
0
python,google-app-engine
Considering the distributed nature of GAE, I don't think you can do this directly. You can store visits in the database (with timestamp) and query this (use a cookie to check if a user is already counted, avoid writing on each request!). Alternatively, you can use some external service that uses included javascript or image that counts this for you, much like how analytics works.
0
1
0
0
2010-09-18T08:37:00.000
1
1.2
true
3,740,932
0
0
1
1
Is there a way to count total number of active sessions (e.g. in 10 minutes) on Google App Engine (Python)? I want to show something on frontpage like, This site currently haz 200 people online
Django restart server or httpd
3,742,868
6
7
39,920
0
python,django,django-models,django-urls,django-views
runserver.py restarts automatically every time you modify any .py file, but when you are using apache you have to restart the proccess manually.
0
0
0
0
2010-09-18T17:36:00.000
4
1.2
true
3,742,734
0
0
1
3
In django framework,When there are changes in urls.py or model.py or views.py .We would restart httpd. But as the documentation says we could restart runserver to get the latest changes. Which is the best efficient way for doing the above
Django restart server or httpd
17,571,047
4
7
39,920
0
python,django,django-models,django-urls,django-views
touch your_project_name.wsgi and save without any change. It will change data modify and django will automatically reloading code.
0
0
0
0
2010-09-18T17:36:00.000
4
0.197375
false
3,742,734
0
0
1
3
In django framework,When there are changes in urls.py or model.py or views.py .We would restart httpd. But as the documentation says we could restart runserver to get the latest changes. Which is the best efficient way for doing the above
Django restart server or httpd
3,742,781
1
7
39,920
0
python,django,django-models,django-urls,django-views
runserver refers to the development server that is distributed with Django. Restarting this one or your httpd are the same thing, in both cases you restart the webserver. If you're using apache, you are not using the development server that is startet by runserver.py.
0
0
0
0
2010-09-18T17:36:00.000
4
0.049958
false
3,742,734
0
0
1
3
In django framework,When there are changes in urls.py or model.py or views.py .We would restart httpd. But as the documentation says we could restart runserver to get the latest changes. Which is the best efficient way for doing the above
Python, how to instantiate classes from a class stored in a database?
3,743,351
5
2
262
0
python,database,django,class
Do not store code in the database!!! Imagine a class with a malicious __init__ method finding it's way in your "class repository" in the database. This means whoever has write access to those database tables has the ability to read any file from your web server and even nuke it's file system, since they have the ability to execute any python code on it.
0
0
0
0
2010-09-18T20:13:00.000
2
1.2
true
3,743,329
0
0
1
1
I'm using Django and want to be able to store classes in a database for things like forms and models so that I can easily make them creatable through a user interface since they are just stored in the database as opposed to a regular file. I don't really know a whole lot about this and am not sure if this is a situation where I need to use exec in python or if there is some other way. My searches on this aren't turning up much of anything. Basically, it would just be where I do a database call and get the contents of a class, then I want to instantiate it. Any advice is appreciated on how to best do this sort of thing. EDIT: In response to the idea of a malicious __init__ in the class, these are only for things like forms or models where it is tightly controlled through validation what goes in the class, there would never be an __init__ in the class and it would be basically impossible, since I would validate everything server side, to put anything malicious in the class.
Python / Django Web service Confusion
3,746,062
0
0
1,172
0
python,django,web-services
There are so many things like SOAPpy, XML-RPC, JSON-RPC RESTful, web service. This should give you a clue - there are different services out there that use one or more of these mechanisms. Basically all i want to know is what is the standard way of implementing web service in Python/Django and has anyone implemented in live production environment There is no single standard way of implementing a web service. This is as true for Django/Python as for other web frameworks. Different people have used Django in different ways to create a web service to suit their needs.
0
0
0
0
2010-09-19T12:47:00.000
2
0
false
3,745,724
0
0
1
1
I am trying to explore more about web service in Python/Django and to be honest i am quite confused. There are so many things like SOAPpy, XML-RPC, JSON-RPC RESTful, web service. Basically all i want to know is what is the standard way of implementing web service in Python/Django and has anyone implemented in live production environment
How to work with settings in Django
3,746,881
0
1
108
0
python,django,django-models
If you are okay with changing these setting programmatically via settings.py you should do that. However, if you want to change these settings via the Admin Console, you should use models.
0
0
0
0
2010-09-19T17:50:00.000
2
0
false
3,746,790
0
0
1
1
I want to keep some global settings for my project in Django. I need to have access to these settings from the code. For example, I need to set a current theme for my site that I can set using admin console or from the code. Or I need to set a tagline that will show in the header of all pages. I suppose I should use models for keeping the settings but I can't realize how I should better do it.
Getting BadValueError on Google App Engine Datastore Delete
3,747,783
3
3
481
0
python,google-app-engine
Try updating your model so that the Districts field is not required (i.e., pass required=False as a keyword parameter to the Districts field). Then the validator shouldn't complain about the existing entities and you should be able to delete the entities. Alternatively, if you know the keys for the entities you want to delete, you can delete them directly using db.delete() without ever needing to fetch them in the first place. You might even be able to use the datastore viewer from the Dashboard to delete them (if you don't have many entities to delete, this might be easiest).
0
1
0
0
2010-09-19T22:36:00.000
2
1.2
true
3,747,772
0
0
1
2
I am trying to delete records in the datastore. Unfortunately, whenever I try to delete the items, it gives me a BadValueError, saying Districts (one of the columns) is required. Because of an issue with the bulk loader, Districts is null for all of the rows...but I still need to clean out the datastore to try to fix the bulk loader error. What can I do?
Getting BadValueError on Google App Engine Datastore Delete
3,747,781
0
3
481
0
python,google-app-engine
Change your entities/models so that Districts is no longer a required property?
0
1
0
0
2010-09-19T22:36:00.000
2
0
false
3,747,772
0
0
1
2
I am trying to delete records in the datastore. Unfortunately, whenever I try to delete the items, it gives me a BadValueError, saying Districts (one of the columns) is required. Because of an issue with the bulk loader, Districts is null for all of the rows...but I still need to clean out the datastore to try to fix the bulk loader error. What can I do?
how to get the value of the 'class' attribute in a link?
3,777,996
0
0
34
0
python
should be 'className' in IE...
0
0
0
0
2010-09-20T13:58:00.000
1
1.2
true
3,752,154
1
0
1
1
I wrote the sentence as follows: allLinkValues = ie.getLinksValue('class') but the return values are all None, don't know why...
Open source Twitter clone (in Ruby/Python)
3,758,455
3
6
2,578
0
python,ruby,twitter
I know of twissandra which is an open source clone. Of course I doubt it meets your need of feature rich implementations.
0
0
0
1
2010-09-21T08:16:00.000
4
0.148885
false
3,758,440
0
0
1
1
Is there any production ready open source twitter clones written in Ruby or Python ? I am more interested in feature rich implementations, not just bare bones twitter like messages (e.g.: APIs, FBconnect, Notifications, etc) Thanks !
Customizing Django Admin Interface functionality
3,759,347
9
1
4,748
0
python,django,customization,admin
Slow down. Relax. Follow the Django philosophy. You have an "app". It presents data. Focus on presentation. You have a default, built-in admin for your "app". It updates data and it's already there. If the admin app doesn't meet your needs update Forms and update Models to get close. But don't strain yourself messing with admin. Get as close as you can. But relax about it. [Also, "more intuitive admin" is sometimes not an accurate description of what you're trying to do. It could be, but I've seen some "more intuitive" that actually wasn't.] a more designed and intuitive admin interface for the client. Is this part of the app? Does the app do more than simply present data? If the app is transactional -- add, change, delete -- crud rules -- that kind of thing, then that's your app. If you want a fancy UI, that's not admin any more. There's no redirect. That's your app. It's just coding. Stop messing with admin and start writing your app. Hint: Use generic views as much as possible. Other than that, you're talking about your app, not hacking the admin stuff that already works. if you know how to hack the admin views and templates to your heart's content you are not a semi-pro Wrong. All the source is there. You can read it, also. That's what the pros do. We read the source. And we don't hack the admin app. If you have complex transactions, you have a first-class, for-real, actual application. Not default admin, but a part of your app that has forms. If you have forms, then, well, you have forms. This does not require hacking the admin app, it's just coding more of your app.
0
0
0
0
2010-09-21T08:28:00.000
2
1.2
true
3,758,509
0
0
1
1
I am new to django and have gotten a bit stuck on trying to make the admin site work as I'd like it to. I am wondering if for making the admin functionality I want it is better to make a custom admin app with a template inheriting from admin/base_site.html, using the frontend login with a redirect when is_staff is true. The initial details that make me think this: I have a chain of foreignkeys and would like to display nested inlines on the parent admin page. I have tried using easymode, but it's got its own issues and requirements that may cause headaches later i can do without. I would like to add a function allowing the admin to add an instance of a model, which triggers the creation of instances its related models and redirects etc. This requires adding some callables at least, which I havent figured out yet how to really do with any success in the admin model, and at the moment seems easier to just quickly do this in the views.py of my own app rather than trying to toy with the admin views. In general, creating a custom admin app (using a is_staff=true redirect on the FrontEnd login) seems more flexible in the long run, and will result in a more designed and intuitive admin interface for the client - so I suppose my question is, what are the semi-pros doing? (if you know how to hack the admin views and templates to your heart's content you are not a semi-pro :) ) Thanks for any advice you can offer, Im still getting my feet wet and this kind of advice could save me alot of time and headache.
Django Google app engine reference issues
3,808,459
0
1
249
0
python,django,google-app-engine,django-models,google-cloud-datastore
Two possible solutions: Check if the reference still exists, before you access it: if not obj.reference: # Referenced entity was deleted When you delete a model object that may be referenced, query all models that might reference it, and set their reference property to None.
0
0
0
0
2010-09-21T09:37:00.000
3
1.2
true
3,759,003
0
0
1
3
I am working on an application on Django and google application engine. In my application I have several models with several ReferenceProperty fields. The issue is that if any of the ReferenceProperty field gets deleted it produces a ReferenceProperty related errors in all the other models where it has been used. What I want is, when a field is deleted say a User is deleted, all the fields having User as the ReferenceProperty should still work without any error messages displaying the associated user as unavailable or something like that. Can someone please suggest how that can be done? Thanks in advance.
Django Google app engine reference issues
3,759,035
0
1
249
0
python,django,google-app-engine,django-models,google-cloud-datastore
When I have the same problem ago, I could not find a general solution. The only way I found is to do try/except for every reference property. If you find another answer post it here.
0
0
0
0
2010-09-21T09:37:00.000
3
0
false
3,759,003
0
0
1
3
I am working on an application on Django and google application engine. In my application I have several models with several ReferenceProperty fields. The issue is that if any of the ReferenceProperty field gets deleted it produces a ReferenceProperty related errors in all the other models where it has been used. What I want is, when a field is deleted say a User is deleted, all the fields having User as the ReferenceProperty should still work without any error messages displaying the associated user as unavailable or something like that. Can someone please suggest how that can be done? Thanks in advance.
Django Google app engine reference issues
3,808,505
1
1
249
0
python,django,google-app-engine,django-models,google-cloud-datastore
You could also just set a flag, say deleted, on the entity you're deleting, and then leave it in the datastore. This has the advantage of avoiding all referential integrity problems in the first place, but it comes at the cost of two main disadvantages: All your existing queries need to be changed to deal with entities that have the deleted property set, either by omitting them from the result set or by special casing them somehow. "Deleted" data stays in the datastore; this can bloat the datastore, and also may not be an option for sensitive information. This doesn't really solve your problem at all, but I thought I'd mention it for completeness's sake.
0
0
0
0
2010-09-21T09:37:00.000
3
0.066568
false
3,759,003
0
0
1
3
I am working on an application on Django and google application engine. In my application I have several models with several ReferenceProperty fields. The issue is that if any of the ReferenceProperty field gets deleted it produces a ReferenceProperty related errors in all the other models where it has been used. What I want is, when a field is deleted say a User is deleted, all the fields having User as the ReferenceProperty should still work without any error messages displaying the associated user as unavailable or something like that. Can someone please suggest how that can be done? Thanks in advance.
is it possible to have keyname and an id for an entity in Appengine?
3,759,934
2
0
68
0
python,google-app-engine
No. An entity's Key is composed of the application ID, the Kind, the path of the parent entity (if any) and either a key name or an auto-generated ID. It's not possible to have both. The entire Key is the "primary key".
0
1
0
0
2010-09-21T09:39:00.000
1
1.2
true
3,759,021
0
0
1
1
I'm building a facebook app, and my users table's keyName is set to the Uid of the facebook user. I found this to be efficient because I can use db.Key.from_path() to efficiently query the datastore for a particular user instead of doing a query (where uid = x, limit = 1). This is actually my first time using key names. But when I did this in the sdk, the key().id() is set to None. Is there a way have an id as well? I'd like an id for use as a primary key is because it's shorter and an integer which makes it faster when I'm storing users in a listProperty (i.e a seperate Buddies entity with a list of friends the user has in the app). I hope this makes sense :) thanks a ton!
Designing my domain model around one 3rd-party library
3,764,942
1
1
191
0
python,oop
I would not couple my project tightly to the library, but instead try to abstract functionality and couple both using one or more objects in between. The mediator and/or facade pattern come to my mind here.
0
0
0
0
2010-09-21T22:02:00.000
2
0.099668
false
3,764,851
0
0
1
1
I'm working on a poker analysis tool with the following use case: User create Strategy class with one method: input GameState, output PokerAction User runs Analysis script, which launches a PokerGame between various Strategy subclasses (i.e. various strategies) PokerGame generates random deck PokerGame sends GameState to Strategy Strategy sends PokerAction to PokerGame PokerGame updates GameState When the game is done (managed by PokerGame), send GameResult to Analysis script User reviews output of Analysis script There's a third-party library that performs all of the PokerGame functionality. It doesn't match at all with my own modeling of the domain in some areas (e.g. card values, etc.) but performs much of the "hard-to-code" functionality that I need (i.e. the non-trivial steps 4 - 7). General design question When faced with a library like this (eliminates a lot of hard coding, but might constrain future design choices in related projects), do you tend to mold the rest of your project to the library? Do you refactor the key library to conform to your domain model? Or is it something else? Thanks, Mike
How to reload modules in django shell?
26,771,173
48
108
52,169
0
python,django,ipython
My solution to it is I write the code and save to a file and then use: python manage.py shell < test.py So I can make the change, save and run that command again till I fix whatever I'm trying to fix.
0
0
0
0
2010-09-22T18:02:00.000
12
1
false
3,772,260
0
0
1
2
I am working with Django and use Django shell all the time. The annoying part is that while the Django server reloads on code changes, the shell does not, so every time I make a change to a method I am testing, I need to quit the shell and restart it, re-import all the modules I need, reinitialize all the variables I need etc. While iPython history saves a lot of typing on this, this is still a pain. Is there a way to make django shell auto-reload, the same way django development server does? I know about reload(), but I import a lot of models and generally use from app.models import * syntax, so reload() is not much help.
How to reload modules in django shell?
3,816,813
25
108
52,169
0
python,django,ipython
It seems that the general consensus on this topic, is that python reload() sucks and there is no good way to do this.
0
0
0
0
2010-09-22T18:02:00.000
12
1
false
3,772,260
0
0
1
2
I am working with Django and use Django shell all the time. The annoying part is that while the Django server reloads on code changes, the shell does not, so every time I make a change to a method I am testing, I need to quit the shell and restart it, re-import all the modules I need, reinitialize all the variables I need etc. While iPython history saves a lot of typing on this, this is still a pain. Is there a way to make django shell auto-reload, the same way django development server does? I know about reload(), but I import a lot of models and generally use from app.models import * syntax, so reload() is not much help.
Django, where to import your modules
3,773,276
3
0
81
0
python,django
There is no requirement in Django that you import modules at function scope. You can, but that is true of python generally. I'd like to see your code and error message. I don't think that your problem is due to the cause you attribute it to.
0
0
0
0
2010-09-22T20:10:00.000
1
0.53705
false
3,773,208
0
0
1
1
I always thought it was OK to just import all of your modules at the top of a view file. Then if you ever change a model name you can just edit the import at the top and not go digging through every view function that you need it imported in. Well, I just ran into an instance where I had imported a model at the top of a view file, and then used it in a function, but for some reason django threw an unbound variable error when I tried to use the model to do a query, which leads me to believe that I do need to do my imports for each function? So, my question is, what is the proper way to do it? Import everything at the top of the file or in each function as needed. Thanks
How do I generate a connection reset programatically?
3,773,702
1
8
3,959
0
php,python,sockets,web-applications,tcp
I believe you need to close the low-level socket fairly abruptly. You won't be able to do it from Javascript. For the other languages you'll generally need to get a handle on the underlying socket object and close() it manually. I also doubt you can do this through Apache since it is Apache and not your application holding the socket. At best your efforts are likely to generate a HTTP 500 error which is not what you're after.
0
0
0
1
2010-09-22T20:56:00.000
3
0.066568
false
3,773,566
0
0
1
1
I'm sure you've seen the "the connection was reset" message displayed when trying to browse web pages. (The text is from Firefox, other browsers differ.) I need to generate that message/error/condition on demand, to test workarounds. So, how do I generate that condition programmatically? (How to generate a TCP RST from PHP -- or one of the other web-app languages?) Caveats and Conditions: It cannot be a general IP block. The test client must still be able to see the test server when not triggering the condition. Ideally, it would be done at the web-application level (Python, PHP, Coldfusion, Javascript, etc.). Access to routers is problematic. Access to Apache config is a pain. Ideally, it would be triggered by fetching a specific web-page. Bonus if it works on a standard, commercial web host. Update: Sending RST is not enough to cause this condition. See my partial answer, below. I've a solution that works on a local machine, Now need to get it working on a remote host.