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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Writing a Faster Python Spider | 1,853,689 | 3 | 6 | 7,091 | 0 | python,web-crawler | Spidering somebody's site with millions of requests isn't very polite. Can you instead ask the webmaster for an archive of the site? Once you have that, it's a simple matter of text searching. | 0 | 0 | 1 | 0 | 2009-12-05T22:28:00.000 | 6 | 0.099668 | false | 1,853,673 | 0 | 0 | 1 | 3 | I'm writing a spider in Python to crawl a site. Trouble is, I need to examine about 2.5 million pages, so I could really use some help making it optimized for speed.
What I need to do is examine the pages for a certain number, and if it is found to record the link to the page. The spider is very simple, it just needs t... |
Google App Engine Application Extremely slow | 2,908,765 | 3 | 17 | 8,372 | 0 | python,django,google-app-engine | I used pingdom for obvious reasons - no cold starts is a bonus. Of course the customers will soon come flocking and it will be a non-issue | 0 | 1 | 0 | 0 | 2009-12-06T08:58:00.000 | 8 | 0.07486 | false | 1,854,821 | 0 | 0 | 1 | 5 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. |
Google App Engine Application Extremely slow | 1,856,432 | 3 | 17 | 8,372 | 0 | python,django,google-app-engine | I encounteres the same with pylons based app. I have the initial page server as static, and have a dummy ajax call in it to bring the app up, before the user types in credentials. It is usually enough to avoid a lengthy response... Just an idea that you might use before you actually have a million users ;). | 0 | 1 | 0 | 0 | 2009-12-06T08:58:00.000 | 8 | 0.07486 | false | 1,854,821 | 0 | 0 | 1 | 5 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. |
Google App Engine Application Extremely slow | 1,854,829 | 4 | 17 | 8,372 | 0 | python,django,google-app-engine | If it's responding quickly after the first request, it's probably just a case of getting the relevant process up and running. Admittedly it's slightly surprising that it takes so long that it times out. Is this after you've updated the application and verified that the AppEngine dashboard shows it as being ready?
"Firs... | 0 | 1 | 0 | 0 | 2009-12-06T08:58:00.000 | 8 | 0.099668 | false | 1,854,821 | 0 | 0 | 1 | 5 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. |
Google App Engine Application Extremely slow | 1,854,875 | 14 | 17 | 8,372 | 0 | python,django,google-app-engine | This is a horrible suggestion but I'll make it anyway:
Build a little client application or just use wget with cron to periodically access your app, maybe once every 5 minutes or so. That should keep Google from putting it into a dormant state.
I say this is a horrible suggestion because it's a waste of resources and a... | 0 | 1 | 0 | 0 | 2009-12-06T08:58:00.000 | 8 | 1.2 | true | 1,854,821 | 0 | 0 | 1 | 5 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. |
Google App Engine Application Extremely slow | 1,856,888 | 4 | 17 | 8,372 | 0 | python,django,google-app-engine | One more tip which might increase the response time.
Enabling billing does increase the quotas, and, to my personal experience, increase the overall response of an application as well. Probably because of the higher priority for billing-enabled applications google has. For instance, an app with billing disabled, can se... | 0 | 1 | 0 | 0 | 2009-12-06T08:58:00.000 | 8 | 0.099668 | false | 1,854,821 | 0 | 0 | 1 | 5 | I created a Hello World website in Google App Engine. It is using Django 1.1 without any patch.
Even though it is just a very simple web page, it takes long time and often it times out.
Any suggestions to solve this?
Note: It is responding fast after the first call. |
How can a total, complete beginner read source code? | 2,628,550 | 0 | 2 | 1,248 | 0 | python,coding-style,code-readability | Maybe you have a project in mind that you want to code up? It's very hard to read what other people write, the best way to learn is to try something. Other people will have gone through the problems you will come across, and so why code is written the way it is may start to make sense. This is an excellent site to post... | 0 | 0 | 1 | 0 | 2009-12-06T09:04:00.000 | 9 | 0 | false | 1,854,827 | 0 | 0 | 1 | 5 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... |
How can a total, complete beginner read source code? | 1,854,832 | 6 | 2 | 1,248 | 0 | python,coding-style,code-readability | I would recommend you understand the basics. What are methods, classes, variables and so on. It would be important to understand the constructs you are seeing. If you don't understand those then it's just going to be a bunch of characters. | 0 | 0 | 1 | 0 | 2009-12-06T09:04:00.000 | 9 | 1 | false | 1,854,827 | 0 | 0 | 1 | 5 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... |
How can a total, complete beginner read source code? | 1,973,070 | 3 | 2 | 1,248 | 0 | python,coding-style,code-readability | Donald Knuth suggests:
"It [is] basically the way you solve some kind of unknown puzzle -- make tables and charts and get a little more information here and make a hypothesis."
(From "Coders at Work", Chapter 15)
In my opinion, the easiest way to understand a program is to study the data structures first. Write them d... | 0 | 0 | 1 | 0 | 2009-12-06T09:04:00.000 | 9 | 0.066568 | false | 1,854,827 | 0 | 0 | 1 | 5 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... |
How can a total, complete beginner read source code? | 1,854,841 | 3 | 2 | 1,248 | 0 | python,coding-style,code-readability | There is no magic way to learn anything without reading and writing code yourself. If you get stuck there are always folks in SO who will help you. | 0 | 0 | 1 | 0 | 2009-12-06T09:04:00.000 | 9 | 0.066568 | false | 1,854,827 | 0 | 0 | 1 | 5 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... |
How can a total, complete beginner read source code? | 1,854,836 | 3 | 2 | 1,248 | 0 | python,coding-style,code-readability | To understand source code in any language, you first need to learn the language. It's as simple as that!
Usually, reading source code (as a sole activity) will hurt your head without giving much benefit in terms of learning the underlying language. You need a structured tour through carefully chosen small source code e... | 0 | 0 | 1 | 0 | 2009-12-06T09:04:00.000 | 9 | 0.066568 | false | 1,854,827 | 0 | 0 | 1 | 5 | I am a complete, total beginner in programming, although I do have knowledge of CSS and HTML.
I would like to learn Python. I downloaded lots of source code but the amount of files and the complexity really confuses me. I don't know where to begin. Is there a particular order I should look for?
Thanks.
EDIT: Sorry guys... |
Dynamically Refreshed Pages produced by Python | 1,855,787 | 0 | 2 | 1,212 | 0 | javascript,python,ajax | Update img.src attribute in onsubmit() handler.
img.src url points to your Python script that should generate an image in response.
onsubmit() for your form could be registered and written using JQuery. | 0 | 0 | 0 | 1 | 2009-12-06T15:59:00.000 | 4 | 0 | false | 1,855,748 | 0 | 0 | 1 | 1 | I've been researching this on and off for a number of months now, but I am incapable of finding clear direction.
My goal is to have a page which has a form on it and a graph on it. The form can be filled out and then sent to the CGI Python script (yeah, I'll move to WSGI or fast_cgi later, I'm starting simple!) I'd li... |
Using AppEngine XMPP for Client Notifications | 1,859,664 | 0 | 1 | 1,077 | 0 | python,web-services,google-app-engine,xmpp | In that situation, I would perform ajax calls every 5 minutes in example to check it.
It's easy to implement and the data exchanged can be reduced to the max (taking advantage of "fast query/response" bonifications of google-app).
Regards. | 0 | 1 | 0 | 0 | 2009-12-07T12:12:00.000 | 3 | 0 | false | 1,859,634 | 0 | 0 | 1 | 2 | I've been looking for a way to tell clients about expired objects and AppEngine's XMPP implementation seems really interesting because it's scalable, should be reliable and can contain up to 100kb of data.
But as I understand it, before a client can listen to messages, he should have a gmail account. That's very impra... |
Using AppEngine XMPP for Client Notifications | 1,859,647 | 1 | 1 | 1,077 | 0 | python,web-services,google-app-engine,xmpp | No this isn't true: you can have the AppEngine robot as contact over any Jabber/XMPP based networks.
Unless you are talking about the need for a GMAIL account to create an AppEngine robot... in which case YES you need to have a Google account. | 0 | 1 | 0 | 0 | 2009-12-07T12:12:00.000 | 3 | 1.2 | true | 1,859,634 | 0 | 0 | 1 | 2 | I've been looking for a way to tell clients about expired objects and AppEngine's XMPP implementation seems really interesting because it's scalable, should be reliable and can contain up to 100kb of data.
But as I understand it, before a client can listen to messages, he should have a gmail account. That's very impra... |
Writing my own django-cms plugin. Any recommendations? | 1,872,391 | 1 | 1 | 1,710 | 0 | python,django,django-cms | This all depends on your model. Plugins use standard django admin features.
This also depends on the source data for the table.
If you have a CSV or Exel sheet as source i only would make a file field and render the file in the render function with some optional caching.
If you want to enter data by hand:
A Table mode... | 0 | 0 | 0 | 0 | 2009-12-07T16:52:00.000 | 1 | 1.2 | true | 1,861,267 | 0 | 0 | 1 | 1 | I don't see any possibility for creating a table in django-cms. I need this functionnality so I am evaluating the possibility to write my own plugin.
I am getting started with this product. I've read the documentation carefully and I see more or less how to do that.
However, I would be happy to hear some tips and trick... |
Render in infinity loop | 1,870,164 | 0 | 1 | 283 | 0 | python,google-app-engine,cron | Can you use cron to schedule the job to run at certain intervals? It's usually considered better than infinite loops, and was designed to help solve this sort of problem. | 0 | 0 | 0 | 0 | 2009-12-08T21:59:00.000 | 4 | 0 | false | 1,870,140 | 1 | 0 | 1 | 1 | Question for Python 2.6
I would like to create an simple web application which in specified time interval will run a script that modifies the data (in database). My problem is code for infinity loop or some other method to achieve this goal. The script should be run only once by the user. Next iterations should run aut... |
How to allow users to change their own passwords in Django? | 40,871,533 | 1 | 93 | 92,604 | 0 | python,django | Once the url pattern is added as shown in Ciro Santilli's answer, a quick way to allow users to change passwords is to give them "staff access" for the admin functions. If you don't add them to any groups or give them special permissions, they can still change their password by going to the example.com/admin page. Th... | 0 | 0 | 0 | 0 | 2009-12-09T13:15:00.000 | 10 | 0.019997 | false | 1,873,806 | 0 | 0 | 1 | 2 | Can any one point me to code where users can change their own passwords in Django? |
How to allow users to change their own passwords in Django? | 1,873,933 | 26 | 93 | 92,604 | 0 | python,django | You can also just use the django.contrib.auth.views.password_change view in your URLconf. It uses a default form and template; supplying your own is optional. | 0 | 0 | 0 | 0 | 2009-12-09T13:15:00.000 | 10 | 1 | false | 1,873,806 | 0 | 0 | 1 | 2 | Can any one point me to code where users can change their own passwords in Django? |
Loading a wave from waveid | 1,932,852 | 0 | 1 | 95 | 0 | python,google-wave | At the moment the answer is that i can't be done. Hopefully in a future version of the Api. | 0 | 0 | 1 | 0 | 2009-12-09T21:11:00.000 | 2 | 0 | false | 1,876,908 | 0 | 0 | 1 | 1 | I'm working on a small wave thingy where i need to load a wave based on an outside event. So i don't have a context to work with.
I've been looking at the python api for a while but i can't figure out the correct way to get a wave object (that i can then call CreateBlip() on) when i just have the waveid.
Is there somet... |
A business Case for Enterprise Python | 1,879,157 | 4 | 9 | 2,483 | 0 | python,enterprise | The larger your investment in an existing technology is, the more expensive it is to move away from it. COBOL is perhaps the best example here.
That investment isn't just in porting existing solutions, but also in retraining or hiring new staff so that you have the skill sets to build and support the new technologies e... | 0 | 1 | 0 | 0 | 2009-12-10T06:52:00.000 | 5 | 0.158649 | false | 1,879,113 | 0 | 0 | 1 | 3 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... |
A business Case for Enterprise Python | 1,880,411 | 0 | 9 | 2,483 | 0 | python,enterprise | There is -- almost -- no usable "Business Case" for any technology choice.
"what about a large MNC that already has a lot invested in Java" Ask around. See if there's a business case for Java.
I doubt you'll find anything. Most companies drift into technology choices slowly.
There was no business case for COBOL -- i... | 0 | 1 | 0 | 0 | 2009-12-10T06:52:00.000 | 5 | 0 | false | 1,879,113 | 0 | 0 | 1 | 3 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... |
A business Case for Enterprise Python | 2,506,203 | 1 | 9 | 2,483 | 0 | python,enterprise | The answer to your question is yes. Python can be well suited for Enterprise because python is a language which has raw power, flexible and can be glued with other programming languages. What enterprise really requires is a language which does everything and i feel python is already enterprise ready. If you want exampl... | 0 | 1 | 0 | 0 | 2009-12-10T06:52:00.000 | 5 | 0.039979 | false | 1,879,113 | 0 | 0 | 1 | 3 | This will not be a "programming" question but more technology / platform related question. I'm trying to figure out whether Python can be a suitable Java alternative for enterprise / web applications.
Which are the ideal cases where you would prefer to use Python instead of Java? How would a typical Python web applica... |
DJANGO : Update div with AJAX | 1,879,991 | 2 | 8 | 5,349 | 0 | jquery,python,ajax,django,django-templates | Since you're already using an AJAX post, why don't you return the data from that and insert it into the div? The view that accepts the post can return a rendered template or JSON, and your javascript can insert it in the callback. | 0 | 0 | 0 | 0 | 2009-12-10T09:42:00.000 | 3 | 0.132549 | false | 1,879,872 | 0 | 0 | 1 | 1 | I am building a chat application. So far I am adding chat messages with jquery $.post() and this works fine.
Now I need to retrieve the latest chat message from the table and append the list on the chat page.
I am new to Django, so please go slow.
So how do I get data from the chat table back to the chat page?
Thanks i... |
Importing Excel sheets, including formulae, into Django | 1,937,261 | 0 | 2 | 1,592 | 1 | python,django,excel | You need to use Excel to calculate the results? I mean, maybe you could run the Excel sheet from OpenOffice and use a pyUNO macro, which is somehow "native" python.
A different approach will be to create a macro to generate some more friendly code to python, if you want Excel to perform the calculation is easy you end... | 0 | 0 | 0 | 0 | 2009-12-10T18:39:00.000 | 4 | 0 | false | 1,883,098 | 0 | 0 | 1 | 1 | I have an Excel spreadsheet with calculations I would like to use in a Django web application. I do not need to present the spreadsheet as it appears in Excel. I only want to use the formulae embedded in it. What is the best way to do this? |
Where should django manager code live? | 1,883,526 | 9 | 25 | 4,377 | 0 | python,django,design-patterns,django-models,django-managers | I always place mine in managers.py. If you have a circular import issue remember that a) You can reference the model class for a manager at self.model, and b) You can do imports inside of functions. | 0 | 0 | 0 | 0 | 2009-12-10T19:21:00.000 | 4 | 1 | false | 1,883,322 | 0 | 0 | 1 | 3 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... |
Where should django manager code live? | 1,883,460 | 32 | 25 | 4,377 | 0 | python,django,design-patterns,django-models,django-managers | I prefer to keep my models in models.py and managers in managers.py (forms in forms.py) all within the same app. For more generic managers, I prefer to keep them in core.managers if they can be re-used for other apps. In some of our larger apps with models/modelname.py that will contains a manager and the model code ... | 0 | 0 | 0 | 0 | 2009-12-10T19:21:00.000 | 4 | 1.2 | true | 1,883,322 | 0 | 0 | 1 | 3 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... |
Where should django manager code live? | 1,883,342 | 4 | 25 | 4,377 | 0 | python,django,design-patterns,django-models,django-managers | What I did when building Django apps was to create a [modelname].py file with just the specific model code, manager code and sometimes form code and used an __init__.py file to import then all in the models directory. This helped me atleast in keeping it managable. | 0 | 0 | 0 | 0 | 2009-12-10T19:21:00.000 | 4 | 0.197375 | false | 1,883,322 | 0 | 0 | 1 | 3 | This is a pretty simple django patterns question. My manager code usually lives in models.py, but what happens when models.py is really huge? Is there any other alternative pattern to letting your manager code live in models.py for maintainability and to avoid circular imports?
A question may be asked as to why models.... |
Django: vps or shared hosting? | 1,885,629 | 6 | 12 | 5,421 | 0 | python,django,hosting,shared,vps | Django runs on GoogleAppEngine but php doesn't.
Your Django code will have to use Google's datastore models instead of Django's usual ORM, so there is some tie in to GAE - if you decide you want to host your own app later on it could be quite a lot of work.
If you go with a VPS obviously you can run Django and php toge... | 0 | 0 | 0 | 0 | 2009-12-11T03:19:00.000 | 6 | 1 | false | 1,885,594 | 0 | 0 | 1 | 3 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... |
Django: vps or shared hosting? | 1,885,597 | 3 | 12 | 5,421 | 0 | python,django,hosting,shared,vps | Should i know something else to make a decision?
Django (albeit a subset) runs on Google AppEngine:
free for starters and pay as you grow.
auto-scale
resilient (backups are "automatic" i.e. datastore)
The drawback of course is you only have Python and Java as options... | 0 | 0 | 0 | 0 | 2009-12-11T03:19:00.000 | 6 | 0.099668 | false | 1,885,594 | 0 | 0 | 1 | 3 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... |
Django: vps or shared hosting? | 1,886,390 | 7 | 12 | 5,421 | 0 | python,django,hosting,shared,vps | I've been using Webfaction for shared hosting of Django. The price is pretty decent, they have good forums, and have a nice web-based interface to help get you setup. Despite the web interface, it doesn't impede you from having full control over your site form the command line. You can host all sorts of things, from ... | 0 | 0 | 0 | 0 | 2009-12-11T03:19:00.000 | 6 | 1.2 | true | 1,885,594 | 0 | 0 | 1 | 3 | I am new to web development and everything involved with it. Im finishing my website in django and i will soon have to find a hosting and deploy it. I heard there are vps or shared hosting types. So here are the questions:
1. How many visits/clicks per day make it worth choosing vps? shared?
2. How hard is it to tune a... |
Is Google App Engine right for me? | 1,903,297 | 3 | 9 | 1,390 | 0 | python,google-app-engine,web2py | The AppEngine uses BigTable as it's datastore backend. Don't try to write a traditional relational-database driven application. BigTable is much more well suited for use as a highly-scalable key-value store. Avoid joins if at all possible. | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | 0.085505 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Is Google App Engine right for me? | 1,904,574 | 2 | 9 | 1,390 | 0 | python,google-app-engine,web2py | I wouldn't worry about any of this. After having played with Google App Engine for a while now, I've found that it scales quite well for large data sets. If your data elements are large (i.e. photos), then you'll need to integrate with another service to handle them, but that's probably going to be true no matter wha... | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | 0.057081 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Is Google App Engine right for me? | 1,905,263 | 5 | 9 | 1,390 | 0 | python,google-app-engine,web2py | using web2py on Google App Engine is a great strategy. It lets you get up and running fast, and if you do outgrow the restrictions of GAE then you can move your web2py application elsewhere.
However, keeping this portability means you should stay away from the advanced parts of GAE (Task Queues, Transactions, ListProp... | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | 0.141893 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Is Google App Engine right for me? | 1,994,758 | 0 | 9 | 1,390 | 0 | python,google-app-engine,web2py | What about Google Wave? It's being built on appengine, and once live, real-time translatable chat reaches the corporate sector... I could see it hitting top 1000th... But then again, that's an internal project that gets to do special stuff other appengine apps can't.... Like hanging threads; I think... And whateve... | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | 0 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Is Google App Engine right for me? | 1,904,610 | 8 | 9 | 1,390 | 0 | python,google-app-engine,web2py | Having developed a smallish site with GAE, I have some thoughts
If you mean "huge" like "the next YouTube", then GAE might be a great fit, because of the previously mentioned scaling.
If you mean "huge" like "massively complex, with a whole slew of screens, models, and features", then GAE might not be a good fit. Thin... | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | 1 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Is Google App Engine right for me? | 1,903,114 | -11 | 9 | 1,390 | 0 | python,google-app-engine,web2py | If you are planning on a 'huge' website, then don't use App Engine. Simple as that. The App Engine is not built to deliver the next top 1000th website.
Allow me to also ask what do you mean by 'huge', how many simultaneous users? Queries per second? DB load? | 0 | 1 | 0 | 0 | 2009-12-14T19:51:00.000 | 7 | -1 | false | 1,903,065 | 0 | 0 | 1 | 6 | I am thinking about using Google App Engine.It is going to be a huge website. In that case, what is your piece of advice using Google App Engine. I heard GAE has restrictions like we cannot store images or files more than 1MB limit(they are going to change this from what I read in the GAE roadmap),query is limited to 1... |
Integrate Python app into PHP site | 1,909,272 | 0 | 4 | 2,293 | 0 | php,python,integration,trac | Your Python code will have access to your users' cookies. A template would be best, but if you don't have one available (or the header/footer are trivially small, or whatever), you can simply port the PHP header and footer code to Python, using the cookies that are already there to query the database or whatever you ne... | 0 | 0 | 0 | 1 | 2009-12-15T14:21:00.000 | 3 | 0 | false | 1,907,782 | 0 | 0 | 1 | 2 | This might sound really crazy, but still...
For our revamped project site, we want to integrate Trac (as code browser, developer wiki and issue tracker) into the site design. That is, of course, difficult, since Trac is written in Python and our site in PHP. Does anybody here know a way how to integrate a header and fo... |
Integrate Python app into PHP site | 1,907,850 | 1 | 4 | 2,293 | 0 | php,python,integration,trac | The best option probably is to (re)write the header and footer using python.
If the header and footer are relatively static you can also generate them once using php (or once every x minutes) and include them from the filesystem. (You probably already thought about this and dismissed the idea because your sites are too... | 0 | 0 | 0 | 1 | 2009-12-15T14:21:00.000 | 3 | 0.066568 | false | 1,907,782 | 0 | 0 | 1 | 2 | This might sound really crazy, but still...
For our revamped project site, we want to integrate Trac (as code browser, developer wiki and issue tracker) into the site design. That is, of course, difficult, since Trac is written in Python and our site in PHP. Does anybody here know a way how to integrate a header and fo... |
How to combine multiple images fast for page views counter | 1,908,428 | 0 | 0 | 743 | 0 | python,python-imaging-library,counter | If you really need to handle thousands "renders" per second I would not suggest to generate the images on the fly. How about precomputing n images where n is the expected (you might want to be generous here) count you have to handle?
I know you state that you don't want to use javascript and you only want one img tag, ... | 0 | 0 | 0 | 0 | 2009-12-15T15:49:00.000 | 3 | 0 | false | 1,908,334 | 0 | 0 | 1 | 2 | How can I combine multiple images, such as base image with logo and number of digits images to display graphical counter with pageviews count, updated dynamically?
It should be very fast, with thousands of renders per second. User should see counter image without Javascript and with single img tag.
I prefer to implemen... |
How to combine multiple images fast for page views counter | 1,908,385 | 2 | 0 | 743 | 0 | python,python-imaging-library,counter | Precompute for the given background the image of a single digit (for each digit 0 ... 10) at each digit position.
Then to create arbitrary number you only have to paste the correct images next to eachother, but you won't have to do any alpha blending. Therefore this must be more efficient.
Also, if certain page counts ... | 0 | 0 | 0 | 0 | 2009-12-15T15:49:00.000 | 3 | 1.2 | true | 1,908,334 | 0 | 0 | 1 | 2 | How can I combine multiple images, such as base image with logo and number of digits images to display graphical counter with pageviews count, updated dynamically?
It should be very fast, with thousands of renders per second. User should see counter image without Javascript and with single img tag.
I prefer to implemen... |
facebook app in python showing file list | 1,910,419 | 3 | 0 | 108 | 0 | python,django,facebook | Based on your comments, I think I see what's going on. 192.168.2.2 is not a valid URL. That is a local network IP, and cannot be accessed from outside your network.
You need to set your Canvas Callback URL to the external IP address of your modem. | 0 | 0 | 0 | 0 | 2009-12-15T20:22:00.000 | 1 | 0.53705 | false | 1,910,131 | 0 | 0 | 1 | 1 | i am making a facebook app in python with django. now i have successfully resolved the callback url to my localhost account. but the app is not displaying on facebook.
when i navigate to apps.facebook.com/'myappname', it authenticates and then displays the file list on project folder? |
Django: Where to put helper functions? | 1,914,081 | 18 | 80 | 40,688 | 0 | python,django | create a reusable app that include your generic functions so you can share between projects.
use for example a git repo to store this app and manage deployments and evolution (submodule)
use a public git repo so you can share with the community :) | 0 | 0 | 0 | 0 | 2009-12-16T04:44:00.000 | 4 | 1 | false | 1,912,351 | 0 | 0 | 1 | 3 | I have a couple of functions that I wrote that I need to use in my django app. Where would I put the file with them and how would I make them callable within my views? |
Django: Where to put helper functions? | 1,912,371 | 13 | 80 | 40,688 | 0 | python,django | If they are related to a specific app, I usually just put them in the related app folder and name the file, 'functions.py'.
If they're not specific to an app, I make a commons app for components (tests, models, functions, etc) that are shared across apps. | 0 | 0 | 0 | 0 | 2009-12-16T04:44:00.000 | 4 | 1 | false | 1,912,351 | 0 | 0 | 1 | 3 | I have a couple of functions that I wrote that I need to use in my django app. Where would I put the file with them and how would I make them callable within my views? |
Django: Where to put helper functions? | 13,270,468 | 2 | 80 | 40,688 | 0 | python,django | I am using new python file service.py in app folder. The file contains mostly helper queries for specific app. Also I used to create a folder inside Django application that contains global helper functions and constants. | 0 | 0 | 0 | 0 | 2009-12-16T04:44:00.000 | 4 | 0.099668 | false | 1,912,351 | 0 | 0 | 1 | 3 | I have a couple of functions that I wrote that I need to use in my django app. Where would I put the file with them and how would I make them callable within my views? |
App engine app design questions | 1,916,805 | 0 | 1 | 127 | 0 | python,google-app-engine | If you want some handler on your GAE app (including one for a scheduled task, reception of messages, web page visits, etc) to store some new information in such a way that some handler in the future can recover that information, then GAE's storage is the only good general way (memcache could expire from under you, for ... | 0 | 0 | 0 | 0 | 2009-12-16T16:49:00.000 | 3 | 0 | false | 1,916,009 | 0 | 0 | 1 | 2 | I want to load info from another site (this part is done), but i am doing this every time the page is loaded and that wont do. So i was thinking of having a variable in a table of settings like 'last checked bbc site' and when the page loads it would check if its been long enough since last check to check again. Is the... |
App engine app design questions | 1,917,064 | 2 | 1 | 127 | 0 | python,google-app-engine | I think there are 2 options that would work for you, besides creating a entity in the datastore to keep track of "last visited time".
One way is to just check the external page periodically, using the cron api as described by jldupont.
The second way is to store the last visited time in memcache. Although memcache ... | 0 | 0 | 0 | 0 | 2009-12-16T16:49:00.000 | 3 | 1.2 | true | 1,916,009 | 0 | 0 | 1 | 2 | I want to load info from another site (this part is done), but i am doing this every time the page is loaded and that wont do. So i was thinking of having a variable in a table of settings like 'last checked bbc site' and when the page loads it would check if its been long enough since last check to check again. Is the... |
In Python, how can I test if I'm in Google App Engine SDK? | 64,592,250 | 0 | 41 | 8,997 | 0 | python,google-app-engine | Update on October 2020:
I tried using os.environ["SERVER_SOFTWARE"] and os.environ["APPENGINE_RUNTIME"] but both didn't work so I just logged all keys from the results from os.environ.
In these keys, there was GAE_RUNTIME which I used to check if I was in the local environment or cloud environment.
The exact key migh... | 0 | 1 | 0 | 0 | 2009-12-16T18:14:00.000 | 7 | 0 | false | 1,916,579 | 0 | 0 | 1 | 1 | Whilst developing I want to handle some things slight differently than I will when I eventually upload to the Google servers.
Is there a quick test that I can do to find out if I'm in the SDK or live? |
The best solution for distribution website? | 1,922,486 | 2 | 0 | 138 | 0 | python,django,postgresql | "What i need to know is whether the porposed solution is suitable for such a small project and could not be easily replaced by less complicated languages/frameworks/dmbses like PHP with MySQL etc.
"
Yes. It's suitable.
No. Nothing is "less complicated" than Django. PHP language may appear less complicated than Pyt... | 0 | 0 | 0 | 0 | 2009-12-17T12:49:00.000 | 3 | 1.2 | true | 1,921,559 | 0 | 0 | 1 | 2 | Ok, I have a question from a "client" perspective. Let's say we are talking about website designed for distribution: products + their logistics info.
Definitely less than a 2k rows, rarely changed but often accessed. Typical row with several columns will have to consist of a picture so it might make it a bit "heavy". ... |
The best solution for distribution website? | 1,921,584 | 0 | 0 | 138 | 0 | python,django,postgresql | I would not comment about Django & Python. But a more simpler way to store images would be to store just the "path" (location in the directory) in the tables, and load the path in your application/framework. | 0 | 0 | 0 | 0 | 2009-12-17T12:49:00.000 | 3 | 0 | false | 1,921,559 | 0 | 0 | 1 | 2 | Ok, I have a question from a "client" perspective. Let's say we are talking about website designed for distribution: products + their logistics info.
Definitely less than a 2k rows, rarely changed but often accessed. Typical row with several columns will have to consist of a picture so it might make it a bit "heavy". ... |
Split views.py in several files | 1,921,921 | 1 | 172 | 42,864 | 0 | python,django | Since Django just expects a view to be a callable object, you can put then wherever you like in your PYTHONPATH. So you could for instance just make a new package myapp.views and put views into multiple modules there. You will naturally have to update your urls.py and other modules that reference these view callables. | 0 | 0 | 0 | 0 | 2009-12-17T13:26:00.000 | 10 | 0.019997 | false | 1,921,771 | 1 | 0 | 1 | 4 | My views.py has become too big and it's hard to find the right view.
How do I split it in several files and then import it? Does it involve any speed loss?
Can I do the same with models.py? |
Split views.py in several files | 1,921,892 | 10 | 172 | 42,864 | 0 | python,django | Basically, you can put your code, whereever you wish. Just make sure, you change the import statements accordingly, e.g. for the views in the urls.py.
Not knowing your actual code its hard to suggest something meaningful. Maybe you can use some kind of filename prefix, e.g. views_helper.py, views_fancy.py, views_that_a... | 0 | 0 | 0 | 0 | 2009-12-17T13:26:00.000 | 10 | 1 | false | 1,921,771 | 1 | 0 | 1 | 4 | My views.py has become too big and it's hard to find the right view.
How do I split it in several files and then import it? Does it involve any speed loss?
Can I do the same with models.py? |
Split views.py in several files | 1,923,475 | 1 | 172 | 42,864 | 0 | python,django | I split almost all views in my apps into a views folder (with an init.py of course). I do not, however, import all of the subviews in the init.py like some of the answers have suggested. It seems to work just fine. | 0 | 0 | 0 | 0 | 2009-12-17T13:26:00.000 | 10 | 0.019997 | false | 1,921,771 | 1 | 0 | 1 | 4 | My views.py has become too big and it's hard to find the right view.
How do I split it in several files and then import it? Does it involve any speed loss?
Can I do the same with models.py? |
Split views.py in several files | 32,090,920 | 1 | 172 | 42,864 | 0 | python,django | Suppose if you have a file named: password_generator.py then inside views.py add: from password_generator import *
Then you can call that module's function from views.py. | 0 | 0 | 0 | 0 | 2009-12-17T13:26:00.000 | 10 | 0.019997 | false | 1,921,771 | 1 | 0 | 1 | 4 | My views.py has become too big and it's hard to find the right view.
How do I split it in several files and then import it? Does it involve any speed loss?
Can I do the same with models.py? |
django + mysql + UTF-8 - Chars are not displayed | 1,931,067 | 0 | 0 | 312 | 1 | python,django,unicode | As Dominic has said, the generated HTML source code is correct (these are your Japanese characters translated into HTML entities), but we're not sure, if you see the same code rendered in the page (in this case, you have probably set content-type to "text/plain" instead of "text/html" - do you use render_to_response() ... | 0 | 0 | 0 | 0 | 2009-12-18T13:04:00.000 | 3 | 0 | false | 1,928,087 | 0 | 0 | 1 | 1 | I have both, django and mysql set to work with UTF-8.
My base.html set utf-8 in head.
row on my db :
+----+--------+------------------------------------------------------------------+-----------------------------+-----------------------------+---------------------+
| id | psn_id | name ... |
Is there a better way to serve the results of an expensive, blocking python process over HTTP? | 1,929,711 | 1 | 5 | 495 | 0 | python,http,mod-wsgi,tornado | You might consider a queuing system with AJAX notification methods.
Whenever there is a request for your expensive resource, and that resource needs to be generated, add that request to the queue (if it's not already there). That queuing operation should return an ID of an object that you can query to get its status.
N... | 0 | 1 | 0 | 1 | 2009-12-18T17:39:00.000 | 5 | 0.039979 | false | 1,929,681 | 0 | 0 | 1 | 3 | We have a web service which serves small, arbitrary segments of a fixed inventory of larger MP3 files. The MP3 files are generated on-the-fly by a python application. The model is, make a GET request to a URL specifying which segments you want, get an audio/mpeg stream in response. This is an expensive process.
We're... |
Is there a better way to serve the results of an expensive, blocking python process over HTTP? | 1,929,738 | 0 | 5 | 495 | 0 | python,http,mod-wsgi,tornado | It looks like you are doing things right -- just lacking CPU power: can you determine what is the CPU loading in the process of generating these MP3?
I think the next thing you have to do there is to add more hardware to render the MP3's on other machines. Or that or find a way to deliver pre-rendered MP3 (maybe you c... | 0 | 1 | 0 | 1 | 2009-12-18T17:39:00.000 | 5 | 0 | false | 1,929,681 | 0 | 0 | 1 | 3 | We have a web service which serves small, arbitrary segments of a fixed inventory of larger MP3 files. The MP3 files are generated on-the-fly by a python application. The model is, make a GET request to a URL specifying which segments you want, get an audio/mpeg stream in response. This is an expensive process.
We're... |
Is there a better way to serve the results of an expensive, blocking python process over HTTP? | 1,937,378 | 1 | 5 | 495 | 0 | python,http,mod-wsgi,tornado | Please define "cascading load", as it has no common meaning.
Your most likely problem is going to be if you're running too many Apache processes.
For a load like this, make sure you're using the prefork mpm, and make sure you're limiting yourself to an appropriate number of processes (no less than one per CPU, no more ... | 0 | 1 | 0 | 1 | 2009-12-18T17:39:00.000 | 5 | 0.039979 | false | 1,929,681 | 0 | 0 | 1 | 3 | We have a web service which serves small, arbitrary segments of a fixed inventory of larger MP3 files. The MP3 files are generated on-the-fly by a python application. The model is, make a GET request to a URL specifying which segments you want, get an audio/mpeg stream in response. This is an expensive process.
We're... |
Weblogic domain and cluster creation with WLST | 2,258,690 | 5 | 3 | 3,100 | 0 | python,weblogic,jython,wlst | I eventually found the answer. I am posting here for reference.
Out of the 5 mentioned tasks, all can be performed with an offline wlst script. All of them have to be performed on the node where AdminServer is supposed to live.
Now, for updating the domain information on the second node, there is an nmEnroll command in... | 0 | 1 | 0 | 0 | 2009-12-19T14:10:00.000 | 2 | 1.2 | true | 1,933,000 | 0 | 0 | 1 | 2 | I want to create a cluster with 2 managed servers on 2 different physical machines.
I have following tasks to be performed (please correct me if I miss something)
Domain creation.
Set admin server properties and create AdminServer under SSL
Create logical machines for the physical ones
Create managed servers
create c... |
Weblogic domain and cluster creation with WLST | 32,569,619 | 0 | 3 | 3,100 | 0 | python,weblogic,jython,wlst | There are two steps missed after the step 1, you need to copy the configuration from the machine where the AdminServer is running run to the other machine in the cluster using the command pack content in Weblogic installation:
1.1 On the machine where the AdminServer is running run ./pack.shdomain=/home/oracle/config/d... | 0 | 1 | 0 | 0 | 2009-12-19T14:10:00.000 | 2 | 0 | false | 1,933,000 | 0 | 0 | 1 | 2 | I want to create a cluster with 2 managed servers on 2 different physical machines.
I have following tasks to be performed (please correct me if I miss something)
Domain creation.
Set admin server properties and create AdminServer under SSL
Create logical machines for the physical ones
Create managed servers
create c... |
Why use Django on Google App Engine? | 2,988,728 | 0 | 89 | 25,088 | 0 | python,django,google-app-engine | I am still very new to Google App engine development, but the interfaces Django provides do appear much nicer than the default. The benefits will depend on what you are using to run Django on the app engine. The Google App Engine Helper for Django allows you to use the full power of the Google App Engine with some Djan... | 0 | 1 | 0 | 0 | 2009-12-20T05:03:00.000 | 8 | 0 | false | 1,934,914 | 0 | 0 | 1 | 5 | When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Djan... |
Why use Django on Google App Engine? | 1,934,918 | 3 | 89 | 25,088 | 0 | python,django,google-app-engine | I have experience using Django and not GAE. From my experiences with Django it was a very simplistic setup and the deployment process was incredibly easy in terms of web projects. Granted I had to learn Python to really get a good hold on things, but at the end of the day I would use it again on a project. This was ... | 0 | 1 | 0 | 0 | 2009-12-20T05:03:00.000 | 8 | 0.07486 | false | 1,934,914 | 0 | 0 | 1 | 5 | When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Djan... |
Why use Django on Google App Engine? | 1,942,826 | 0 | 89 | 25,088 | 0 | python,django,google-app-engine | If you decide to run you app outside of GAE, you can still use Django. You won't really have that much luck with the GAE webapp | 0 | 1 | 0 | 0 | 2009-12-20T05:03:00.000 | 8 | 0 | false | 1,934,914 | 0 | 0 | 1 | 5 | When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Djan... |
Why use Django on Google App Engine? | 1,934,925 | 51 | 89 | 25,088 | 0 | python,django,google-app-engine | Django probably isn't the right choice for you, if you're sure that GAE is right for you. The strengths of the two technologies don't align very well - you completely lose a lot of Django's wonderful orm on GAE, and if you do use it, you write code that isn't really directly suitable to bigtable and the way GAE works.
... | 0 | 1 | 0 | 0 | 2009-12-20T05:03:00.000 | 8 | 1 | false | 1,934,914 | 0 | 0 | 1 | 5 | When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Djan... |
Why use Django on Google App Engine? | 1,935,061 | 0 | 89 | 25,088 | 0 | python,django,google-app-engine | I cannot answer the question but you may want to look into web2py. It is similar to Django in many respects but its database abstraction layer works on GAE and supports most of the GAE functionality (not all but we try to catch up). In this way if GAE works for you great, if it does not, you can move your code to a dif... | 0 | 1 | 0 | 0 | 2009-12-20T05:03:00.000 | 8 | 0 | false | 1,934,914 | 0 | 0 | 1 | 5 | When researching Google App Engine (GAE), it's clear that using Django is wildly popular for developing in Python on GAE. I've been scouring the web to find information on the costs and benefits of using Django, to find out why it's so popular. While I've been able to find a wide variety of sources on how to run Djan... |
pyfacebook and javascript query | 1,935,664 | 1 | 0 | 66 | 0 | javascript,python | You can't pass a variable directly, as JavaScript is running on the client (browser), and Python is running on the server.
You could make a XHR (AJAX) request from JavaScript to the server which would then return your values back to JS (JSON could be used here).
Or you could put a hidden field to your markup that would... | 0 | 0 | 0 | 0 | 2009-12-20T12:04:00.000 | 1 | 1.2 | true | 1,935,636 | 0 | 0 | 1 | 1 | I'm using pyfacebook on the backend and javascript on the client side. Now if I want to pass a variable to the javascript from pyfacebook. how would I go about doing that, any ideas? |
Can I do Django & Python web development using Xcode 3.2? | 1,936,102 | 2 | 3 | 6,512 | 0 | python,django | I think Eclipse+Pydev Plugin is a good choice!! | 0 | 0 | 0 | 0 | 2009-12-20T15:06:00.000 | 4 | 0.099668 | false | 1,936,080 | 0 | 0 | 1 | 1 | I'm not sure but I believe that Python is -next to Objective-C- somewhat natural to Mac OSX and the Xcode IDE. I might be wrong. So is it a good idea to use Xcode for Django / Python web development when I'm already a bit familiar with Xcode? Actually I only do iPhone dev with it, but now I need a website and I stumble... |
Does anyone had success getting Django to send emails when hosting on Dreamhost? | 1,939,248 | 0 | 7 | 4,627 | 0 | python,django,dreamhost | Do you have an SMTP server set up anywhere? As people have suggested here, you can easily use gmail, but you are by no means limited to using only Gmails SMTP server. You can create your own on your own hardware if you like, or you can use a number of free SMTP servers out there. I'd say the most fun would be to set up... | 0 | 0 | 0 | 0 | 2009-12-21T06:57:00.000 | 5 | 0 | false | 1,938,609 | 0 | 0 | 1 | 2 | Greetings,
Does anyone know what are the required fields to have Django send emails when a "500 Internal Server Error" happend? I am hosting my project on Dreamhost and for the life of me I can't get Django to send emails. What are the required fields when hosting on Dreamhost? |
Does anyone had success getting Django to send emails when hosting on Dreamhost? | 3,738,431 | 0 | 7 | 4,627 | 0 | python,django,dreamhost | One issue we seem to have found with this gmail work around, is that if you try testing by sending from a gmail account to a dreamhost email that forwards back to the same gmail, the message is dropped. This may be some weird security 'feature' that dreamhost has going. | 0 | 0 | 0 | 0 | 2009-12-21T06:57:00.000 | 5 | 0 | false | 1,938,609 | 0 | 0 | 1 | 2 | Greetings,
Does anyone know what are the required fields to have Django send emails when a "500 Internal Server Error" happend? I am hosting my project on Dreamhost and for the life of me I can't get Django to send emails. What are the required fields when hosting on Dreamhost? |
Django index page best/most common practice | 1,940,751 | 3 | 21 | 12,324 | 0 | python,django,indexing | I tend to create a views.py in the root of the project where I keep the index view. | 0 | 0 | 0 | 0 | 2009-12-21T14:51:00.000 | 2 | 0.291313 | false | 1,940,528 | 0 | 0 | 1 | 1 | I am working on a site currently (first one solo) and went to go make an index page. I have been attempting to follow django best practices as I go, so naturally I go search for this but couldn't a real standard in regards to this.
I have seen folks creating apps to serve this purpose named various things (main, home, ... |
fastcgi, cherrypy, and python | 1,947,457 | 0 | 5 | 2,035 | 0 | python,fastcgi,lighttpd,cherrypy | From a system-software-writer's pointer of view: This all depends on how the meta-data about the server process is organized within your daemon (lighttpd or fcgi). Some programs are designed for one time only initialization -- MOSTLY this allows a much simpler and better performing internal programming model.
Often it ... | 0 | 0 | 0 | 1 | 2009-12-22T16:09:00.000 | 2 | 0 | false | 1,947,344 | 0 | 0 | 1 | 1 | So I'm trying to do more web development in python, and I've picked cherrypy, hosted by lighttpd w/ fastcgi. But my question is a very basic one: why do I need to restart lighttpd (or apache) every time I change my application code, or the code for an underlying library?
I realize this question extends from a basic mis... |
Why do all twisted/wokkel xmpp examples ignore the proper usage of JID in the xmpp protocol? | 2,590,641 | 5 | 1 | 1,213 | 0 | python,xmpp,twisted,google-talk | In this particular case, the better answer to the non-question is that you should not set the from address at all. Every server will happily fill in the blank for you, saving you from figuring out what JID your client has. | 0 | 0 | 0 | 0 | 2009-12-24T07:43:00.000 | 2 | 0.462117 | false | 1,957,255 | 0 | 0 | 1 | 1 | Okay, this isn't a question. All the examples of wokkel and twisted I have seen do not properly observe generated resources in the JID.
Google talk clients built using wokkel/twisted generally break because they do not set the full JID on responses, resulting in (very hidden, low level) errors like:
<message to="exampl... |
python source code conversion to uml diagram with Sparx Systems Enterprise Architect | 1,964,328 | 4 | 2 | 4,824 | 0 | python | File / New Project / enter your project name.
In the Project Browser, create a package named "source"
Right-click the source package, "Code Engineering", "Import Source Directory".
Pick the directory containing your module(s) as the "Root Directory"
Set "Source Type" to Python
Enable "Recursively Process Subdirectories... | 0 | 0 | 0 | 0 | 2009-12-26T02:05:00.000 | 4 | 0.197375 | false | 1,962,447 | 0 | 0 | 1 | 2 | Please let me know how to create a uml diagram along with its equivalent documentation for the source code(.py format) using enterprise architecture 7.5
Please help me find the solution, I have read the solution for the question on this website related to my topic but in vain |
python source code conversion to uml diagram with Sparx Systems Enterprise Architect | 45,345,997 | 1 | 2 | 4,824 | 0 | python | Go to project browser
Create a model
Right-click model > Add > Add View > Class
Right-click class > Code Engineering > Import Source Directory...
Check "one package per folder"
The last one ensures you'll have an interesting diagram full of classes. | 0 | 0 | 0 | 0 | 2009-12-26T02:05:00.000 | 4 | 0.049958 | false | 1,962,447 | 0 | 0 | 1 | 2 | Please let me know how to create a uml diagram along with its equivalent documentation for the source code(.py format) using enterprise architecture 7.5
Please help me find the solution, I have read the solution for the question on this website related to my topic but in vain |
How can I tell if a field has changed value in an AT object in plone? | 1,977,227 | 1 | 2 | 231 | 0 | python,plone,zope,archetypes | Yes, IObjectEditedEvent (a direct subclass of IObjectModifiedEvent) is emitted when an Archetypes content object is being changed.
However, the event itself will not tell you if a new file was uploaded. It should be possible however, to obtain the request (context.REQUEST should give you the current request through acq... | 0 | 0 | 0 | 0 | 2009-12-28T07:16:00.000 | 2 | 1.2 | true | 1,968,343 | 0 | 0 | 1 | 1 | I have an AT content type in Plone. It has a number of fields, including a file field. When the user edits an object of this type, how can I tell if a new file was uploaded?
For that matter, how can I tell if any of the fields have been changed?
I am currently using subscribers to hook into the IObjectEditedEvent to d... |
Piecing together Django views | 1,976,174 | 0 | 1 | 141 | 0 | python,django | Your question is little too generic.
The general way of doing it involves:
Extend templates of the reusable apps
Pass the new template name to the view (Reusable apps should accepts that argument)
Also pass extra_context to the reusable-generic-view
Use your own view to create an extra_context and return the reuse-abl... | 0 | 0 | 0 | 0 | 2009-12-29T17:19:00.000 | 3 | 0 | false | 1,975,769 | 0 | 0 | 1 | 1 | Is it good practice to treat individual app views as a blocks of HTML that can be pieced together to form a larger site? If not, what is the best way to reuse app views from project to project, assuming each one uses a different set of templates? |
Play Subset of audio file using Pyglet | 1,980,577 | 1 | 1 | 1,156 | 0 | python,audio,pyglet | It doesn't appear that pyglet has support for setting a stop time. Your options are:
Poll the current time and stop playback when you've reached your desired endpoint. This may not be precise enough for you.
Or, use a sound file library to extract the portion you want into a temporary sound file, then use pyglet to ... | 0 | 0 | 0 | 0 | 2009-12-29T23:15:00.000 | 2 | 1.2 | true | 1,977,521 | 0 | 0 | 1 | 1 | How can I use the pyglet API for sound to play subsets of a sound file e.g. from 1 second in to 3.5seconds of a 6 second sound clip?
I can load a sound file and play it, and can seek to the start of the interval desired, but am wondering how to stop playback at the point indicated? |
Web2Py Working Directory | 1,987,564 | 5 | 3 | 1,740 | 0 | python,directory,web2py | In any multi-threaded Python program (and not only Python) you should not use os.chdir and you should not change sys.path when you have more than one thread running. It is not safe because it affects other threads. Moreover you should not sys.path.append() in a loop because it may explode.
All web frameworks are multi-... | 0 | 0 | 0 | 0 | 2009-12-30T03:01:00.000 | 3 | 0.321513 | false | 1,978,188 | 0 | 0 | 1 | 1 | Well I want to use WEb2Py because it's pretty nice..
I just need to change the working directory to the directory where all my modules/libraries/apps are so i can use them. I want to be able to import my real program when I use the web2py interface/applications. I need to do this instead of putting all my apps and stu... |
Web2py Import Once per Session | 1,980,510 | 6 | 4 | 953 | 0 | python,web2py | In web2py your models and controllers are executed, not imported. They are executed every time a request arrives. If you press the button [compile] in admin, they will be bytecode compiled and some other optimizations are performs.
If your app (in models and controllers) does "import somemodule", then the import statem... | 0 | 0 | 1 | 0 | 2009-12-30T04:27:00.000 | 1 | 1 | false | 1,978,426 | 0 | 0 | 1 | 1 | I'm using Web2Py and i want to import my program simply once per session... not everytime the page is loaded. is this possible ? such as "import Client" being used on the page but only import it once per session.. |
Spam Filtering Forms Without Akismet | 1,983,179 | 1 | 4 | 394 | 0 | python,django,spam-prevention | I can't think of any critically sensitive data that could be submitted by anonymous users. If the data is really sensitive (like you mentioned patient records), it is probably submitted by known and registered user so you should do manual approval of new users and protect the registration part from spammers. | 0 | 0 | 0 | 0 | 2009-12-30T20:24:00.000 | 2 | 0.099668 | false | 1,982,277 | 0 | 0 | 1 | 1 | I'm curious if anyone out there knows of something perhaps like Akismet, but where content doesn't have to go off to a 3rd party server. In a situation with critically sensitive data (patient records for instance) I wouldn't necessarily want that information sent off to another server I don't have control over. I reall... |
Please discuss what are and why use portlets | 1,985,241 | 1 | 2 | 4,765 | 0 | java,.net,python,portlet | Why would I want to use java portlets above tomcat and gwt?
These technologies are not directly comparable. Coming from regular web page development, Portlets seem like a very restrictive technology. But then the value of Portal servers is largely the control they give to administrators and users - the fact that this ... | 0 | 0 | 0 | 0 | 2009-12-31T00:21:00.000 | 3 | 0.066568 | false | 1,983,282 | 0 | 0 | 1 | 1 | Why would I want to use java portlets above tomcat and gwt?
Would portlets make it less- or un- necessary for me to use jsp and jsf?
Has Jboss been part of the portlet evolution culture? Does Jboss satisfy the portlet jsrs?
What portlet implementation/brand would run on gae java and gae python?
Are portlet specs due to... |
Interaction between Java App and Python App | 1,984,457 | 0 | 3 | 6,004 | 0 | java,python,interface,interaction | Expose one of the two as a service of some kind, web service maybe. Another option is to port the python code to Jython | 0 | 1 | 0 | 0 | 2009-12-31T07:52:00.000 | 6 | 0 | false | 1,984,445 | 0 | 0 | 1 | 2 | I have a python application which I cant edit its a black box from my point of view. The python application knows how to process text and return processed text.
I have another application written in Java which knows how to collect non processed texts.
Current state, the python app works in batch mode every x minutes.
I... |
Interaction between Java App and Python App | 1,984,650 | 0 | 3 | 6,004 | 0 | java,python,interface,interaction | An option is making the python application work as a server, listens for request via sockets (TCP). | 0 | 1 | 0 | 0 | 2009-12-31T07:52:00.000 | 6 | 0 | false | 1,984,445 | 0 | 0 | 1 | 2 | I have a python application which I cant edit its a black box from my point of view. The python application knows how to process text and return processed text.
I have another application written in Java which knows how to collect non processed texts.
Current state, the python app works in batch mode every x minutes.
I... |
update django database to reflect changes in existing models | 1,985,415 | 2 | 70 | 85,597 | 0 | python,django,django-models | You need to drop your tables before you can recreate them with syncdb.
If you want to preserve your existing data, then you need to unload your database,
drop your tables, run syncdb to build a new database, then reload your old data into your new tables.
There are tools that help with this. However, in many cases, it... | 0 | 0 | 0 | 0 | 2009-12-31T13:23:00.000 | 8 | 0.049958 | false | 1,985,383 | 0 | 0 | 1 | 1 | I've already defined a model and created its associated database via manager.py syncdb. Now that I've added some fields to the model, I tried syncdb again, but no output appears. Upon trying to access these new fields from my templates, I get a "No Such Column" exception, leading me to believe that syncdb didn't actual... |
Where should I place the one-time operation operation in the Django framework? | 1,986,323 | 0 | 3 | 781 | 0 | python,django | __init__.py will be called every time the app is imported. So if you're using mod_wsgi with Apache for instance with the prefork method, then every new process created is effectively 'starting' the project thus importing __init__.py. It sounds like your best method would be to create a new management command, and then ... | 0 | 0 | 0 | 0 | 2009-12-31T16:38:00.000 | 4 | 0 | false | 1,986,060 | 0 | 0 | 1 | 2 | I want to perform some one-time operations such as to start a background thread and populate a cache every 30 minutes as initialize action when the Django server is started, so it will not block user from visiting the website. Where should I place all this code in Django?
Put them into the setting.py file does not wor... |
Where should I place the one-time operation operation in the Django framework? | 1,986,926 | 4 | 3 | 781 | 0 | python,django | We put one-time startup scripts in the top-level urls.py. This is often where your admin bindings go -- they're one-time startup, also.
Some folks like to put these things in settings.py but that seems to conflate settings (which don't do much) with the rest of the site's code (which does stuff). | 0 | 0 | 0 | 0 | 2009-12-31T16:38:00.000 | 4 | 0.197375 | false | 1,986,060 | 0 | 0 | 1 | 2 | I want to perform some one-time operations such as to start a background thread and populate a cache every 30 minutes as initialize action when the Django server is started, so it will not block user from visiting the website. Where should I place all this code in Django?
Put them into the setting.py file does not wor... |
Django: signal when user logs in? | 1,991,497 | 0 | 84 | 38,642 | 0 | python,django,login,signals | Rough idea - you could use middleware for this. This middleware could process requests and fire signal when relevant URL is requested. It could also process responses and fire signal when given action actually succeded. | 0 | 0 | 0 | 0 | 2010-01-02T03:19:00.000 | 7 | 0 | false | 1,990,502 | 0 | 0 | 1 | 2 | In my Django app, I need to start running a few periodic background jobs when a user logs in and stop running them when the user logs out, so I am looking for an elegant way to
get notified of a user login/logout
query user login status
From my perspective, the ideal solution would be
a signal sent by each django.co... |
Django: signal when user logs in? | 1,991,512 | 1 | 84 | 38,642 | 0 | python,django,login,signals | The only reliable way (that also detects when the user has closed the browser) is to update some last_request field every time the user loads a page.
You could also have a periodic AJAX request that pings the server every x minutes if the user has a page open.
Then have a single background job that gets a list of recen... | 0 | 0 | 0 | 0 | 2010-01-02T03:19:00.000 | 7 | 0.028564 | false | 1,990,502 | 0 | 0 | 1 | 2 | In my Django app, I need to start running a few periodic background jobs when a user logs in and stop running them when the user logs out, so I am looking for an elegant way to
get notified of a user login/logout
query user login status
From my perspective, the ideal solution would be
a signal sent by each django.co... |
Role of C,C++,python,perl in Web development | 1,991,076 | 10 | 0 | 719 | 0 | c++,python,c,perl | All languages can all do basically any task any other one of them can do, as they are all Turing complete.
PHP works as a server-side scripting language, but you can also use Perl, Python, Ruby, Haskell, Lisp, Java, C, C++, assembly, or pretty much any other language that can access standard input and standard output f... | 0 | 0 | 0 | 1 | 2010-01-02T09:14:00.000 | 4 | 1.2 | true | 1,991,065 | 0 | 0 | 1 | 1 | Please bear with me experts i'm a newbie in web dev.
With html,css can take care of webpages..
javascript,ajax for some dynamic content..
php for server side scripting,accessing databases,sending emails,doing all other stuf...
What role do these programming languages play?
Can they do any other important task which can... |
How does Django + mod_wsgi affect the python path? | 1,991,778 | 2 | 1 | 927 | 0 | python,django,apache,mod-wsgi | I think the problem is related with the permissions of that file. Check that the user running wsgi (apache user, usually) is capable of reading and writing the everything in the libs folder and specially capable of reading the file pywapi.py. | 0 | 0 | 0 | 1 | 2010-01-02T14:29:00.000 | 1 | 1.2 | true | 1,991,743 | 0 | 0 | 1 | 1 | I have a simple setup with my python libraries in /domains/somedomain.com/libs/ and all my tests run fine. I start WSGI with DJANGO_SETTINGS_MODULE to "somedomain.settings" where somedomain is a package in libs/
Suddenly, when adding pywapi.py into libs/ I can't import it when hitting the site. But, if I add 'import py... |
how to start a thread when django runserver? | 1,994,563 | 7 | 0 | 2,758 | 0 | python,django,multithreading | Why would you want to do that? runserver is for development only, it should never be used in production. And if you're running via Apache, it should manage threads/processes for you anyway. | 0 | 0 | 0 | 0 | 2010-01-03T10:14:00.000 | 2 | 1 | false | 1,994,507 | 0 | 0 | 1 | 2 | I want to start a thread when django project runserver successfully.
where can I put the create-thread-and-start code? Is there any hook for the django runserver? |
how to start a thread when django runserver? | 1,997,921 | 0 | 0 | 2,758 | 0 | python,django,multithreading | Agree with the above answer, you probably don't want to do this. Runserver should be used for development only. Once you deploy, you'll want to move to Apache/WSGI. On my dev machine (where I do use runserver), I usually throw it in a screen session, so it doesn't get in the way, but I can pull it back up if I need to ... | 0 | 0 | 0 | 0 | 2010-01-03T10:14:00.000 | 2 | 0 | false | 1,994,507 | 0 | 0 | 1 | 2 | I want to start a thread when django project runserver successfully.
where can I put the create-thread-and-start code? Is there any hook for the django runserver? |
Which programming languages can I use on Android Dalvik? | 56,733,101 | 0 | 65 | 20,672 | 0 | java,python,android,scala,dalvik | 1) Angular + nativeScript
2) Reactnative | 0 | 0 | 0 | 0 | 2010-01-03T11:35:00.000 | 8 | 0 | false | 1,994,703 | 0 | 0 | 1 | 2 | In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of
AspectJ
ColdFusion
Clojure
Groovy
JavaFX Script
JRuby
Jython
Rhino
Scala
Are there already working versions of bytecode compilers for Dalvik available for other languages than Java? |
Which programming languages can I use on Android Dalvik? | 1,994,959 | 0 | 65 | 20,672 | 0 | java,python,android,scala,dalvik | The dynamically typed languages wont be possible until Dalvik supports JIT (Just In Time) compiling. I believe there is JIT support in one of the experimental Eclair branches, but it is not yet officially available/supported in Android. | 0 | 0 | 0 | 0 | 2010-01-03T11:35:00.000 | 8 | 0 | false | 1,994,703 | 0 | 0 | 1 | 2 | In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of
AspectJ
ColdFusion
Clojure
Groovy
JavaFX Script
JRuby
Jython
Rhino
Scala
Are there already working versions of bytecode compilers for Dalvik available for other languages than Java? |
sharing objects between module in GAE | 1,997,676 | 0 | 1 | 130 | 0 | python,google-app-engine | Later requests that happen to be served on the same process (you can't control that) would access just the same mod1.my_data object (unless you take pains to reassign it as a fresh object at the start of each request, of course). | 0 | 1 | 0 | 0 | 2010-01-04T05:37:00.000 | 1 | 1.2 | true | 1,997,663 | 0 | 0 | 1 | 1 | To share a state(e.g. user) between a module in django people sometime use thread local storage, but as google app engine follows CGI standard and keeps state of a request in os.environ , can I share objects between two modules just by setting it e.g.
mod1.my_data = {} and now any other module can get handle to my_data... |
Problem allocating heap space over 4 GB when calling java "from Python" | 2,000,424 | 2 | 1 | 1,663 | 0 | java,python,ram | It's hard to be sure without knowing more detail - like which OS you're on - but my guess is that you're using a 32-bit version of Python which means that when you launch Java, you're also getting the 32-bit version which has a heap size limit of 4GB.
To test if this is the case, compare the output of java -version whe... | 0 | 1 | 0 | 0 | 2010-01-04T15:52:00.000 | 3 | 1.2 | true | 2,000,331 | 0 | 0 | 1 | 2 | I am using using os.system call from python to run jar file.
The jar file requires large heap space and thus i am allocating 4 Gb heap space using Xmx.
When i execute the command
"java -Xms4096m -Xmx4096m -jar camXnet.jar net.txt"
from command line it executes properly, however when i call it from a python program vi... |
Problem allocating heap space over 4 GB when calling java "from Python" | 2,122,159 | 1 | 1 | 1,663 | 0 | java,python,ram | I was having the same problem launching 64bit Java from 32bit python. I solved the problem using Dave Webb's suggestiong of putting the full path to 64bit Java.exe in the python script. This worked fine so it is not necessary to use 64 bit Python | 0 | 1 | 0 | 0 | 2010-01-04T15:52:00.000 | 3 | 0.066568 | false | 2,000,331 | 0 | 0 | 1 | 2 | I am using using os.system call from python to run jar file.
The jar file requires large heap space and thus i am allocating 4 Gb heap space using Xmx.
When i execute the command
"java -Xms4096m -Xmx4096m -jar camXnet.jar net.txt"
from command line it executes properly, however when i call it from a python program vi... |
Does Django need an IDE? | 2,001,956 | 8 | 8 | 3,510 | 0 | python,django | I would pay a reasonable amount for a Django-tailored IDE or plug-in. I don't know what I mean by reasonable, but maye it helps to know that I would not pay more than $75, and I would only pay the $75 if the tool was really awesome.
Now, Django specific features:
Seamless integration with Google Apps
(get me the urchi... | 0 | 0 | 0 | 0 | 2010-01-04T16:39:00.000 | 9 | 1 | false | 2,000,631 | 0 | 0 | 1 | 6 | My company is evaluating the possibility of developing a specialized IDE for Django.
So we would like to ask Django users:
Do you feel the need for a specialized IDE for Django?
Would you be willing to pay for it, or would you only consider free a open-source product?
What Django-specific features are you missing c... |
Does Django need an IDE? | 2,012,679 | 0 | 8 | 3,510 | 0 | python,django | I would definitely pay or donate for a pure Django IDE, even tho there are already some existing plugins, I feel something is always "floating". | 0 | 0 | 0 | 0 | 2010-01-04T16:39:00.000 | 9 | 0 | false | 2,000,631 | 0 | 0 | 1 | 6 | My company is evaluating the possibility of developing a specialized IDE for Django.
So we would like to ask Django users:
Do you feel the need for a specialized IDE for Django?
Would you be willing to pay for it, or would you only consider free a open-source product?
What Django-specific features are you missing c... |
Does Django need an IDE? | 2,001,415 | 1 | 8 | 3,510 | 0 | python,django | It's great that your company wants to contribute to the community, but I have to say that I don't see what a 'Django IDE' would achieve. There are already plugins for all the main editors and IDEs to support Django - from Vim to TextMate to NetBeans - and these provide syntax highlighting, indentation, shortcuts and sn... | 0 | 0 | 0 | 0 | 2010-01-04T16:39:00.000 | 9 | 1.2 | true | 2,000,631 | 0 | 0 | 1 | 6 | My company is evaluating the possibility of developing a specialized IDE for Django.
So we would like to ask Django users:
Do you feel the need for a specialized IDE for Django?
Would you be willing to pay for it, or would you only consider free a open-source product?
What Django-specific features are you missing c... |
Does Django need an IDE? | 2,000,657 | 2 | 8 | 3,510 | 0 | python,django | I use NotePad++, and have yet to need a fully-fledged IDE specifically for Django (though I do wish NotePad++ would stop periodically crashing).
I wouldn't, unless it was really really good (and I have no idea what features it'd need to make me enthusiastic enough to pay for it).
Maybe a neater way to tie together code... | 0 | 0 | 0 | 0 | 2010-01-04T16:39:00.000 | 9 | 0.044415 | false | 2,000,631 | 0 | 0 | 1 | 6 | My company is evaluating the possibility of developing a specialized IDE for Django.
So we would like to ask Django users:
Do you feel the need for a specialized IDE for Django?
Would you be willing to pay for it, or would you only consider free a open-source product?
What Django-specific features are you missing c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.