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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Whats the best way to extend Anonymous User in Django?
| 2,809,562 | 2 | 14 | 5,125 | 0 |
python,django,authentication
|
I'm starting to think a middleware is probably the easiest solution that checks the request.user class and if is AnonymousUser then replaces it with a subclassed AnonymousUser that has the extra properties.
That sound reasonable?
| 0 | 0 | 0 | 0 |
2010-05-11T07:15:00.000
| 6 | 0.066568 | false | 2,808,723 | 0 | 0 | 1 | 2 |
I want to make my User objects all have the same base behaviour and to do so I need to add a couple of methods / properties to Anonymous User.
I've already subclassed User to make richer user objects but I was wondering if anyone has done the same for Anonymous User? And if there are any preferred ways of doing it!
|
Reverse Engineer a .pyo python file
| 2,814,647 | 0 | 3 | 7,406 | 0 |
python,disassembly
|
This is Brian, the question asker.
I have completed what I needed to do by just trial and error and hex editing, hex edit...then convert the source...see what I changed..until I finally narrowed down what I was looking for. The constants (Admin IDs) were in the hex file as converted hex (obviously) but backwards.
I still have no idea how or where I'd find the !=
I heard IDA Pro newest version supports python, but I havent learned how to get python to work on it.
| 0 | 1 | 0 | 0 |
2010-05-11T09:20:00.000
| 5 | 0 | false | 2,809,578 | 0 | 0 | 1 | 3 |
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify.
Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array:
ADMIN_USERIDS = [116901,
141,
349244,
39,
1159488]
I would like to take the original .pyo and disassembly or whatever I need to do inorder to change one of these IDs.
Or....
in model.pyo the source indicates a
if (productsDeveloperId != self.getUserId()):
All I would want to do is hex edit the != to be a == .....Simple with a windows exe program but I can't find a good python disassembler anywhere.
Any suggestions are welcomed...I am new to reading bytecode and new to python as well.
|
Reverse Engineer a .pyo python file
| 2,809,684 | 0 | 3 | 7,406 | 0 |
python,disassembly
|
Convert the .pyo files to .py and then edit the .py and then run python on the .py files. Python will regenerate the .pyo files Don't edit the pyo
I don't know the python bytecode but I would doubt that the strings == or 1= would appear in the .pyo file
Although a much better way is get the original .py files and use them. If they give the wrong program as implied by wanting to change != to == then you could ask the supplier to fix the bug.
| 0 | 1 | 0 | 0 |
2010-05-11T09:20:00.000
| 5 | 0 | false | 2,809,578 | 0 | 0 | 1 | 3 |
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify.
Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array:
ADMIN_USERIDS = [116901,
141,
349244,
39,
1159488]
I would like to take the original .pyo and disassembly or whatever I need to do inorder to change one of these IDs.
Or....
in model.pyo the source indicates a
if (productsDeveloperId != self.getUserId()):
All I would want to do is hex edit the != to be a == .....Simple with a windows exe program but I can't find a good python disassembler anywhere.
Any suggestions are welcomed...I am new to reading bytecode and new to python as well.
|
Reverse Engineer a .pyo python file
| 3,895,279 | 0 | 3 | 7,406 | 0 |
python,disassembly
|
IDA up to 6.0 doesn't have a .pyc decompilation module.
| 0 | 1 | 0 | 0 |
2010-05-11T09:20:00.000
| 5 | 0 | false | 2,809,578 | 0 | 0 | 1 | 3 |
I have 2 .pyo python files that I can convert to .py source files, but they don't compile perfectly as hinted by decompyle's verify.
Therefore looking at the source code, I can tell that config.pyo simply had variables in in an array:
ADMIN_USERIDS = [116901,
141,
349244,
39,
1159488]
I would like to take the original .pyo and disassembly or whatever I need to do inorder to change one of these IDs.
Or....
in model.pyo the source indicates a
if (productsDeveloperId != self.getUserId()):
All I would want to do is hex edit the != to be a == .....Simple with a windows exe program but I can't find a good python disassembler anywhere.
Any suggestions are welcomed...I am new to reading bytecode and new to python as well.
|
PyDev and Django: Autocomplete not detecting Django?
| 44,662,580 | 0 | 4 | 3,244 | 0 |
python,django,eclipse,ide,pydev
|
Navigate to
Window->Preferences->PyDev->Interpreters–>Python Interpreter
From Libraries (System PYTHONPATH),
make sure ..lib/site-packages is listed.
Remove any mention of lib/site-packages/Django
| 0 | 0 | 0 | 0 |
2010-05-11T23:15:00.000
| 2 | 0 | false | 2,815,094 | 0 | 0 | 1 | 2 |
I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this?
I'm using:
Eclipse build #20100218-1602
PyDev 1.5.6
Eclipse IDE for Java Devs 1.2.2
|
PyDev and Django: Autocomplete not detecting Django?
| 2,816,189 | 8 | 4 | 3,244 | 0 |
python,django,eclipse,ide,pydev
|
You might need to set the editor code completion settings. They are under:
Window->Preferences->PyDev->Editor->Code Completion
You might also need to add the Django install or your Django project to your path. You can set this under:
Window->Preferences->PyDev->Interpreter - Python
Hope this helps.
| 0 | 0 | 0 | 0 |
2010-05-11T23:15:00.000
| 2 | 1.2 | true | 2,815,094 | 0 | 0 | 1 | 2 |
I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this?
I'm using:
Eclipse build #20100218-1602
PyDev 1.5.6
Eclipse IDE for Java Devs 1.2.2
|
Eval IronPython Scripts during ASP.NET Web Request; Static Engine or Not
| 2,820,043 | 3 | 2 | 310 | 0 |
asp.net,asp.net-mvc,ironpython,dynamic-language-runtime
|
I've just started using IronPython as extensibility point in my ASP.NET MVC aplication. I have one ipy engine (in static property) and for each request I create new scope and execute the script in that scope.
Each scope should be independent on other scopes, no locking is needed.
If I run into issues, I'll post it here. However, I don't expect any ;)
| 0 | 0 | 0 | 0 |
2010-05-12T13:21:00.000
| 1 | 1.2 | true | 2,819,134 | 0 | 0 | 1 | 1 |
I would like to create an ASP.NET MVC web application which has extensible logic that does not require a re-build. I was thinking of creating a filter which had an instance of the IronPython engine. What I would like to know is: how much overhead is there in creating a new engine during each web request, and would it be a better idea to keep a static engine around? However, if I were to keep a single static engine around, what are the issues I might run into as far as locking and script scope? Is it possible to have multiple scopes in the same IropPython engine so I don't get variable collision and security issues between web requests?
|
How do you extend the Site model in django?
| 2,824,112 | 9 | 12 | 4,589 | 0 |
python,django,django-models
|
I just used my own subclass of Site and created a custom admin for it.
Basically, when you subclass a model in django it creates FK pointing to parent model and allows to access parent model's fields transparently- the same way you'd access parent class attributes in pyhon.
Built in admin won't suffer in any way, but you'll have to un-register Sites ModelAdmin and register your own ModelAdmin.
| 0 | 0 | 0 | 0 |
2010-05-12T18:33:00.000
| 7 | 1.2 | true | 2,821,702 | 0 | 0 | 1 | 2 |
What is the best approach to extending the Site model in django? Creating a new model and ForeignKey the Site or there another approach that allows me to subclass the Site model?
I prefer subclassing, because relationally I'm more comfortable, but I'm concerned for the impact it will have with the built-in Admin.
|
How do you extend the Site model in django?
| 45,414,164 | 3 | 12 | 4,589 | 0 |
python,django,django-models
|
You can have another model like SiteProfile which has a OneToOne relation with Site.
| 0 | 0 | 0 | 0 |
2010-05-12T18:33:00.000
| 7 | 0.085505 | false | 2,821,702 | 0 | 0 | 1 | 2 |
What is the best approach to extending the Site model in django? Creating a new model and ForeignKey the Site or there another approach that allows me to subclass the Site model?
I prefer subclassing, because relationally I'm more comfortable, but I'm concerned for the impact it will have with the built-in Admin.
|
Python templates for huge HTML/XML
| 2,897,474 | 1 | 4 | 1,055 | 0 |
python,templates
|
You don't need a streaming templating engine - I do this all the time, and long before you run into anything vaguely heavy server-side, the browser will start to choke. Rendering a 10000 row table will peg the CPU for several seconds in pretty much any browser; scrolling it will be bothersomely choppy in chrome, and the browser mem usage will rise regardless of browser.
What you can do (and I've previously implemented, even though in retrospect it turns out not to be necessary) is use client-side xslt. Printing the xslt processing instruction and the opening and closing tag using strings is easy and fairly safe; then you can stream each individual row as a standalone xml element using whatever xml writer technique you prefer.
However - you really don't need this, and likely never will - if ever your html generator gets too slow, the browser will be an order of magnitude more problematic.
So, unless you benchmarked this and have determined you really have a problem, don't waste your time. If you do have a problem, you can solve it without fundamentally changing the method - in memory generation can work just fine.
| 0 | 0 | 1 | 0 |
2010-05-14T09:02:00.000
| 5 | 0.039979 | false | 2,832,915 | 0 | 0 | 1 | 2 |
Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution.
Thus, I wonder whether there are Python templating engines that can yield resulting page content by parts.
UPD 1: I am not interested in listing all available frameworks and templating engines.
I am interested in templating solutions that I can use separately from any framework and which can yield content by portions instead of building the whole result in memory.
I understand the usability enhancements from partial content loading with client scripting, but that is out of the scope of my current question. Say, I want to generate a huge HTML/XML and stream it into a local file.
|
Python templates for huge HTML/XML
| 2,832,958 | 2 | 4 | 1,055 | 0 |
python,templates
|
It'd be more user-friendly (assuming they have javascript enabled) to build the table via javascript by using e.g. a jQuery plugin which allows automatical loading of contents as soon as you scroll down. Then only few rows are loaded initially and when the user scrolls down more rows are loaded on demand.
If that's not a solution, you could use three templates: one for everything before the rows, one for everything after the rows and a third one for the rows.
Then you first send the before-rows template, then generate the rows and send them immediately, then the after-rows template. Then you will have only one block/row in memory instead of the whole table.
| 0 | 0 | 1 | 0 |
2010-05-14T09:02:00.000
| 5 | 0.07983 | false | 2,832,915 | 0 | 0 | 1 | 2 |
Recently I needed to generate a huge HTML page containing a report with several thousand row table. And, obviously, I did not want to build the whole HTML (or the underlying tree) in memory. As result, I built the page with the old good string interpolation, but I do not like the solution.
Thus, I wonder whether there are Python templating engines that can yield resulting page content by parts.
UPD 1: I am not interested in listing all available frameworks and templating engines.
I am interested in templating solutions that I can use separately from any framework and which can yield content by portions instead of building the whole result in memory.
I understand the usability enhancements from partial content loading with client scripting, but that is out of the scope of my current question. Say, I want to generate a huge HTML/XML and stream it into a local file.
|
Group Chat XMPP with Google App Engine
| 2,836,255 | 3 | 3 | 1,577 | 0 |
java,python,google-app-engine,xmpp
|
No. App Engine apps can only directly handle HTTP requests - you can't run arbitrary servers on App Engine.
| 0 | 1 | 0 | 0 |
2010-05-14T15:44:00.000
| 1 | 1.2 | true | 2,835,472 | 0 | 0 | 1 | 1 |
Google App Engine has a great XMPP service built in. One of the few limitations it has is that it doesn't support receiving messages from a group chat. That's the one thing I want to do with it. :(
Can I run a 3rd party XMPP/Jabber server on App Engine that supports group chat?
If so, which one?
|
tail -f in a webbrowser
| 2,837,019 | 0 | 8 | 12,000 | 0 |
javascript,jquery,python,django,console
|
Why don't you output the data to a HTML file? You could run a cron job to run your script which would in turn spurt out a HTML file which could be accesses from the browser.
| 0 | 0 | 0 | 0 |
2010-05-14T19:01:00.000
| 4 | 0 | false | 2,836,838 | 0 | 0 | 1 | 1 |
I've created a Python script that monitors a logfile for changes (like tail -f) and displays it on a console. I would like to access the output of the Python script in a webbrowser. What would I need to create this? I was thinking about using Django and jQuery. Any tips or examples are greatly appreciated.
|
What are the most valuable certification available for Programming?
| 2,840,048 | 0 | 4 | 3,805 | 0 |
php,javascript,python,programming-languages,certificate
|
For linux (implies perl/bash)
Comptia+
Red Hat Certified Engineer
| 0 | 0 | 0 | 1 |
2010-05-15T09:53:00.000
| 5 | 0 | false | 2,839,663 | 0 | 0 | 1 | 3 |
I would like to know what are the certificates available for programming, like
Zend for PHP
SUN Certification for java
What are the others? Javascript? C++? Python? etc...
Please give me some suggestion for other available certifications.
|
What are the most valuable certification available for Programming?
| 2,839,684 | 16 | 4 | 3,805 | 0 |
php,javascript,python,programming-languages,certificate
|
Most valuable thing for a developer: being able to show you can convert requirements into working and maintainable software.
Certifications generally are worth very little, except in a few niches that demand them (or at least ask, until they give up and get someone who puts practice before pieces of paper).
| 0 | 0 | 0 | 1 |
2010-05-15T09:53:00.000
| 5 | 1 | false | 2,839,663 | 0 | 0 | 1 | 3 |
I would like to know what are the certificates available for programming, like
Zend for PHP
SUN Certification for java
What are the others? Javascript? C++? Python? etc...
Please give me some suggestion for other available certifications.
|
What are the most valuable certification available for Programming?
| 2,839,748 | 7 | 4 | 3,805 | 0 |
php,javascript,python,programming-languages,certificate
|
Let me be bold and say that your Experience is your best certificate.
| 0 | 0 | 0 | 1 |
2010-05-15T09:53:00.000
| 5 | 1 | false | 2,839,663 | 0 | 0 | 1 | 3 |
I would like to know what are the certificates available for programming, like
Zend for PHP
SUN Certification for java
What are the others? Javascript? C++? Python? etc...
Please give me some suggestion for other available certifications.
|
Prevent web2py from caching?
| 2,840,650 | 5 | 5 | 1,547 | 0 |
python,caching,web2py
|
web2py does cache your code, except for Google App Engine (for speed). That is not the problem. If you you edit code in models, views or controllers, you see the effect immediately.
The problem may be modules; if you edit code in modules you will not see the effect immediately, unless you import them with local_import('module', reload=True), or by restarting web2py.
Is that is also not your problem, then your browser is caching something. Please bring up this question to the web2py mailing list as we can help more.
P.S. If you are using the latest web2py it no longer comes with cherrypy. The built-in web server is called Rocket.
| 0 | 0 | 0 | 1 |
2010-05-15T13:07:00.000
| 2 | 0.462117 | false | 2,840,201 | 0 | 0 | 1 | 1 |
I'm working with web2py and for some reason web2py seems to fail to notice when code has changed in certain cases. I can't really narrow it down, but from time to time changes in the code are not reflected, web2py obviously has the old version cached somewhere.
The only thing that helps is quitting web2py and restarting it (i'm using the internal server).
Any hints ? Thank you !
|
Django: What's the correct way to get the requesting IP address?
| 2,840,883 | 1 | 0 | 748 | 0 |
python,django
|
I use the middleware because this way I don't have to change the app's code.
If I want to migrate my app to other hosting servers, I only need to modify the middleware without affecting other parts.
Security is not an issue because on WebFaction you can trust what comes in from the front end server.
| 0 | 0 | 1 | 0 |
2010-05-15T13:46:00.000
| 2 | 1.2 | true | 2,840,329 | 0 | 0 | 1 | 1 |
I'm trying to develop an app using Django 1.1 on Webfaction. I'd like to get the IP address of the incoming request, but when I use request.META['REMOTE_ADDR'] it returns 127.0.0.1. There seems to be a number of different ways of getting the address, such as using
HTTP_X_FORWARDED_FOR or plugging in some middleware called SetRemoteAddrFromForwardedFor. Just wondering what the best approach was?
|
Creating a spider using Scrapy, Spider generation error
| 2,843,118 | 0 | 2 | 2,058 | 0 |
python,web-crawler,scrapy
|
Set PYTHONPATH environment variable to python26/scripts.
| 0 | 0 | 0 | 0 |
2010-05-16T04:52:00.000
| 3 | 0 | false | 2,842,629 | 0 | 0 | 1 | 3 |
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command:
scrapy-ctl.py genspider myspider myspdier-domain.com
but it did not work and returns the error:
Error running: scrapy-ctl.py genspider, Cannot find project settings module in python path: scrapy_settings.
I know I have the path set right (to python26/scripts), but I am having difficulty figuring out what the problem is. I am new to both scrapy and python so there is a good possibility that I have failled to do something important.
Also, I have been using eclipse with the Pydev plugin to edit the code if that might cause some problems.
|
Creating a spider using Scrapy, Spider generation error
| 3,312,950 | 1 | 2 | 2,058 | 0 |
python,web-crawler,scrapy
|
use the scrapy-ctl.py in the project's dir. that script will know about that project's settings. the main scrapy-ctl.py doesn't have a clue about that specific project's settings.
| 0 | 0 | 0 | 0 |
2010-05-16T04:52:00.000
| 3 | 0.066568 | false | 2,842,629 | 0 | 0 | 1 | 3 |
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command:
scrapy-ctl.py genspider myspider myspdier-domain.com
but it did not work and returns the error:
Error running: scrapy-ctl.py genspider, Cannot find project settings module in python path: scrapy_settings.
I know I have the path set right (to python26/scripts), but I am having difficulty figuring out what the problem is. I am new to both scrapy and python so there is a good possibility that I have failled to do something important.
Also, I have been using eclipse with the Pydev plugin to edit the code if that might cause some problems.
|
Creating a spider using Scrapy, Spider generation error
| 2,842,952 | 2 | 2 | 2,058 | 0 |
python,web-crawler,scrapy
|
There is a difference between PATH and PYTHON_PATH. Is your PYTHON_PATH set correctly? This path is where python looks to include packages / modules.
| 0 | 0 | 0 | 0 |
2010-05-16T04:52:00.000
| 3 | 1.2 | true | 2,842,629 | 0 | 0 | 1 | 3 |
I just downloaded Scrapy (web crawler) on Windows 32 and have just created a new project folder using the "scrapy-ctl.py startproject dmoz" command in dos. I then proceeded to created the first spider using the command:
scrapy-ctl.py genspider myspider myspdier-domain.com
but it did not work and returns the error:
Error running: scrapy-ctl.py genspider, Cannot find project settings module in python path: scrapy_settings.
I know I have the path set right (to python26/scripts), but I am having difficulty figuring out what the problem is. I am new to both scrapy and python so there is a good possibility that I have failled to do something important.
Also, I have been using eclipse with the Pydev plugin to edit the code if that might cause some problems.
|
Java or Python distributed compute job (on a student budget)?
| 2,844,449 | 1 | 5 | 334 | 0 |
java,python,nlp,hadoop,nltk
|
no actual answers; i'd have put this as a comment but on this site you're forced to only answer if you're still a noob
if it's genuinely as parallel as that, and it's only a couple of computers, could you not split the dataset up manually ahead of time?
have you confirmed that there isn't going to be a firewall or similar stopping you using something like that anyway?
you may only have 1GB of user space, but, if linux, what about /tmp ? (if windows, what about %temp% ? )
| 0 | 0 | 0 | 0 |
2010-05-16T14:28:00.000
| 4 | 0.049958 | false | 2,844,105 | 0 | 0 | 1 | 3 |
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space.
I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive, and i cant load it on to the dfs because of the 1G user space cap.
I have been looking into a couple of python based options (as I'd rather use NLTK instead of Java's lingpipe if I can help it), and it seems distributed compute options look like:
Ipython
DISCO
After my hadoop experience, i am trying to make sure i try and make an informed choice -- any help on what might be more appropriate would be greatly appreciated.
Amazon's EC2 etc not really an option, as i have next to no budget.
|
Java or Python distributed compute job (on a student budget)?
| 2,844,538 | 3 | 5 | 334 | 0 |
java,python,nlp,hadoop,nltk
|
Speak with the IT dept at your school (especially if you are in college), if it is for an assignment or research I bet they would be more than happy to give you more disk space.
| 0 | 0 | 0 | 0 |
2010-05-16T14:28:00.000
| 4 | 0.148885 | false | 2,844,105 | 0 | 0 | 1 | 3 |
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space.
I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive, and i cant load it on to the dfs because of the 1G user space cap.
I have been looking into a couple of python based options (as I'd rather use NLTK instead of Java's lingpipe if I can help it), and it seems distributed compute options look like:
Ipython
DISCO
After my hadoop experience, i am trying to make sure i try and make an informed choice -- any help on what might be more appropriate would be greatly appreciated.
Amazon's EC2 etc not really an option, as i have next to no budget.
|
Java or Python distributed compute job (on a student budget)?
| 2,847,116 | 0 | 5 | 334 | 0 |
java,python,nlp,hadoop,nltk
|
If more resources in your computing department are a no go, you're going to have to consider breaking down your data set into manageable chunks before you do any work on it, ad reduce the results down into a meaningful set.
More resources from IT would be the way to go.
Good luck !
Ben
| 0 | 0 | 0 | 0 |
2010-05-16T14:28:00.000
| 4 | 0 | false | 2,844,105 | 0 | 0 | 1 | 3 |
I have a large dataset (c. 40G) that I want to use for some NLP (largely embarrassingly parallel) over a couple of computers in the lab, to which i do not have root access, and only 1G of user space.
I experimented with hadoop, but of course this was dead in the water-- the data is stored on an external usb hard drive, and i cant load it on to the dfs because of the 1G user space cap.
I have been looking into a couple of python based options (as I'd rather use NLTK instead of Java's lingpipe if I can help it), and it seems distributed compute options look like:
Ipython
DISCO
After my hadoop experience, i am trying to make sure i try and make an informed choice -- any help on what might be more appropriate would be greatly appreciated.
Amazon's EC2 etc not really an option, as i have next to no budget.
|
Where does GoogleAppEngineLauncher keep the local log files?
| 20,735,387 | 5 | 9 | 7,373 | 0 |
python,google-app-engine,logging
|
Many of these answers are now outdated. :)
In today's devappserver, use --logs_path=LOGS_FILE if you want to log to a file (in its native sqlite database format). Or as suggested in a comment, simply pipe the output if that's too complicated.
Since there's a log API, it actually now stores log entries in a file in --storage_path if not set. I have noticed a few bugs myself, though. (I'll assume they don't exist now, it's been a while since I used this.)
| 0 | 1 | 0 | 0 |
2010-05-16T17:06:00.000
| 4 | 0.244919 | false | 2,844,635 | 0 | 0 | 1 | 1 |
GoogleAppEngineLauncher can display the local log file of my app while it is running on my Mac during development. However, I can't change the font size there so I would like to use the tail command to watch the log file myself.
It's a shame but I can't find the log files. They are not under /var/log/, ~/Library/Logs or /Library/Logs. Do you know where they are?
(Maybe there are no physical files, just the stdout of the python development environment and so the log is only available in the launcher application.)
|
Stack recommendations for small/medium-sized web application in Python
| 2,847,694 | 2 | 1 | 368 | 0 |
python,wsgi
|
You can run an django application in 20 mb memory easily. probably a django application will use less memory than 20mb.
I want to advise you to check webpy and cherrypy
but I'm big fan of django. if you have 20 mb memory to run application, django will give you everythig it has.
| 0 | 0 | 0 | 0 |
2010-05-17T08:31:00.000
| 6 | 1.2 | true | 2,847,593 | 0 | 0 | 1 | 1 |
I'm looking for some recommendations for a python web application. We have some memory restrictions and we try to keep it small and lean.
We thought about using WSGI (and a python webserver) and build the rest ourself. We already have a template engine we'd like to use, but we are open for some suggestions regarding the whole request handling (the controller).
The application has to run in a single process and the requests have to be processed with multiple threads.
We've looked at django, but we are a not sure if it fits into our memory budget.
Your feedback is very welcome!
Cheers,
Reto
|
Suggestions for a pluggable task framework in Django
| 2,849,724 | 0 | 0 | 160 | 0 |
python,django,plugins
|
I would make an app with a very abstract definition of a Task model. The Task model might contain properties for:
the input arguments,
the function to run,
the time that the task was submitted,
the time that the task has been actually running, and
the result (which would be something like a singleton Task.NotFinished until finished).
You could consider using twisted to run the tasks because:
twisted has a well designed and tested implementation of asynchronous tasks; and
you could run the tasks on other processors or machines.
| 0 | 0 | 0 | 0 |
2010-05-17T12:48:00.000
| 1 | 0 | false | 2,849,118 | 0 | 0 | 1 | 1 |
I am developing a website which is aimed at being a GUI for several image processing algorithms (referred to as 'tasks').
At the moment, only one of these algorithms is finished, but there are more to come (which will have a similar, but not quite the same, workflow)
Basically, the algorithm works as follows (not that it matters a lot, but just for the sake of clarity):
1) Enter some parameters and an input image
2) run algorithm part one
--algorithm runs--
3) review an interim result
4) edit the parameters if needed, and go to 2.
5) run algorithm part two
--algorithm runs--
6) review the result
7) adjust some of the interim results if needed, and go to 5
8) all done
I expect some of the additional tasks to have a rather similar work flow, though it is perfectly possible that they won't.
So, the easy way to implement this would be to create a separate django application for each algorithm.
However, I'd like to be able to browse through a sorted list (by time of completion) of completed tasks, and for each of these task display a summary (name, description, start time, thumbnail).
Is there anyone that can provide me with some suggestions on how I can implement this? I'd like to keep it as simple as possible, so additional task can be 'plugged' in as easy as possible.
|
Producing a static HTML site from XML content
| 2,850,582 | 1 | 3 | 1,365 | 0 |
python,html,xml,ajax,xslt
|
I would go with the PHP option. The reason being is that when the XML changes your site content "should" automatically change without you having to touch your PHP code.
Creating a Python script to generate lots of static pages just seems like a bad idea to me and with javascript you will have your cross-browser headaches (unless you are using a framework maybe).
Use the server side languages for these kind of tasks, it is what they were made for.
| 0 | 0 | 1 | 0 |
2010-05-17T15:47:00.000
| 4 | 0.049958 | false | 2,850,534 | 0 | 0 | 1 | 3 |
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here:
I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Edit: I'd use jQuery for this option.
Learn some basic XSLT and produce HTML to the correct spec this way.
Produce the site with PHP (for example) and then generate a static site.
Write a script (in Python for example) to convert the XML into HTML. This is similar to the XSLT option but without having to learn XSLT.
Useful information:
The XML will likely change at some point, so I'd like to be able to easily regenerate the site.
I'll have to produce some kind of menu for jumping around the document (so I'll need to produce some kind of index of the content).
I'd like to know if anyone has any better ideas that I haven't thought of. If not, I'd like you to tell me which of my options seems the most sensible. I think I know what I'm going to do, but I'd like a second opinion. Thanks.
|
Producing a static HTML site from XML content
| 2,850,603 | 2 | 3 | 1,365 | 0 |
python,html,xml,ajax,xslt
|
I would go with the XSLT option, controlled via parameters to generate different pages from the same XML source if needed. It's really the tool made for XML transformations.
| 0 | 0 | 1 | 0 |
2010-05-17T15:47:00.000
| 4 | 0.099668 | false | 2,850,534 | 0 | 0 | 1 | 3 |
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here:
I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Edit: I'd use jQuery for this option.
Learn some basic XSLT and produce HTML to the correct spec this way.
Produce the site with PHP (for example) and then generate a static site.
Write a script (in Python for example) to convert the XML into HTML. This is similar to the XSLT option but without having to learn XSLT.
Useful information:
The XML will likely change at some point, so I'd like to be able to easily regenerate the site.
I'll have to produce some kind of menu for jumping around the document (so I'll need to produce some kind of index of the content).
I'd like to know if anyone has any better ideas that I haven't thought of. If not, I'd like you to tell me which of my options seems the most sensible. I think I know what I'm going to do, but I'd like a second opinion. Thanks.
|
Producing a static HTML site from XML content
| 2,850,635 | 0 | 3 | 1,365 | 0 |
python,html,xml,ajax,xslt
|
Go with what you are most comfortable with.
If it's straightforward you could use (for example) php to generate a page and then use a command line script (in python or php) to create cached files for you.
| 0 | 0 | 1 | 0 |
2010-05-17T15:47:00.000
| 4 | 0 | false | 2,850,534 | 0 | 0 | 1 | 3 |
I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I've considered are listed here:
I'm not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Edit: I'd use jQuery for this option.
Learn some basic XSLT and produce HTML to the correct spec this way.
Produce the site with PHP (for example) and then generate a static site.
Write a script (in Python for example) to convert the XML into HTML. This is similar to the XSLT option but without having to learn XSLT.
Useful information:
The XML will likely change at some point, so I'd like to be able to easily regenerate the site.
I'll have to produce some kind of menu for jumping around the document (so I'll need to produce some kind of index of the content).
I'd like to know if anyone has any better ideas that I haven't thought of. If not, I'd like you to tell me which of my options seems the most sensible. I think I know what I'm going to do, but I'd like a second opinion. Thanks.
|
Using virtualenv to install different versions of same package
| 2,851,741 | 2 | 1 | 381 | 0 |
python,django,virtualenv
|
If you have easy_install, or better yet pip installed, should be as easy as:
easy_install/pip install virtualenv
mkdir django1.2
virtualenv django1.2
This will put the python binary in a bin folder inside the django1.2 folder. Just use that python binary, and you've got a nice little self-contained environment. You can then install easy_install/pip into that environment, and then install django 1.2 as well, and hack away.
| 0 | 0 | 0 | 0 |
2010-05-17T18:21:00.000
| 2 | 1.2 | true | 2,851,632 | 1 | 0 | 1 | 1 |
Since I have Django 1.1x on my Debian setup - how can I use virtualenv or similar and not have it mess up my system's default django version which in turn would break all my sites?
Detailed instructions or a great tutorial link would very much be appreciated - please don't offer vague advice since I'm still a noob.
Currently I store all my django projects in ~/django-sites and I am using Apache2 + mod_wsgi to deploy.
|
Simple python mvc framework
| 2,852,087 | 3 | 2 | 4,528 | 0 |
python,frameworks
|
Checkout web2py. Seems to be about the simplest python based webserver I can think of.
Django might do, it's hefty, but it comes with it's own development server.
| 0 | 0 | 0 | 0 |
2010-05-17T19:20:00.000
| 4 | 0.148885 | false | 2,852,056 | 0 | 0 | 1 | 2 |
Is there any lightweight mvc webframework which is not necessary to install to the server?
I need something simple, that i could just copy to the shared hosting. And it must handle urls other that localhost/test.py, something like this localhost/Blog/test
|
Simple python mvc framework
| 2,853,387 | 2 | 2 | 4,528 | 0 |
python,frameworks
|
web2py includes everything (ssl-enabled web server, sqlite sql based transaction safe database, web based Integrated Development Enviroment, web based database interface) in one package. The web2py binaries for windows and mac also include Python itself. web2py does not require configuration or installation and can run off a usb drive. It was originally developed as a teaching tool for MVC.
| 0 | 0 | 0 | 0 |
2010-05-17T19:20:00.000
| 4 | 0.099668 | false | 2,852,056 | 0 | 0 | 1 | 2 |
Is there any lightweight mvc webframework which is not necessary to install to the server?
I need something simple, that i could just copy to the shared hosting. And it must handle urls other that localhost/test.py, something like this localhost/Blog/test
|
deployment public keys
| 2,857,218 | 1 | 0 | 212 | 0 |
python,fabric
|
This is what ssh-copy-id is for. It deploys your public key onto a machine for you. Key management isn't something I'd suggest putting into code/VCS. Each user needs to setup their keys so that the local ssh client knows to use them. We use Fabric as well, but it only uses the key that the ssh config is already telling it to.
| 0 | 0 | 0 | 1 |
2010-05-18T08:34:00.000
| 1 | 0.197375 | false | 2,855,650 | 0 | 0 | 1 | 1 |
How do you guys deploy your code on your servers? I am using Fabric and Python and I would like a more automated way of pulling code from the repository through the use of public keys, but without any ops or manual intervention to set up the public keys.
Are you storing them in the code as text or in a database and generate the pk file on the fly? Any other opinions on this one ?
|
Using Django with mod_wsgi
| 2,856,435 | 1 | 1 | 189 | 0 |
python,django,mod-wsgi
|
In embedded mode, the Django app is part of the httpd worker. In daemon mode, the Django app is a separate process and the httpd worker communicates with it over a socket. In either case, the WSGI interface is the same.
| 0 | 0 | 0 | 0 |
2010-05-18T10:40:00.000
| 1 | 1.2 | true | 2,856,403 | 0 | 0 | 1 | 1 |
When you use Django with mod_wsgi, what exactly happens when a user makes a request to the server from a browser? Does apache load up your Django app when it starts and have it running in a separate process? Does it create a new Python process for every HTTP request?
|
SSL and WSGI apps - Python
| 2,857,301 | 2 | 5 | 7,474 | 0 |
python,ssl,wsgi,gevent
|
I would let the http server deal with the ssl transport.
| 0 | 0 | 0 | 1 |
2010-05-18T12:40:00.000
| 3 | 0.132549 | false | 2,857,273 | 0 | 0 | 1 | 1 |
I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent.
What would a good way to serve the app through SSL in this case be?
|
Django Inlines user permissions + view only - permissions issues
| 3,090,090 | 2 | 9 | 1,938 | 0 |
python,django,permissions,inlines
|
If I want a read-only version of what's in the admin, I just write some normal Django views and keep them out of the admin.
I don't think the kind of thing you're talking about (allowing changes to an object but not its inlines) is really supported by the admin. Don't get me wrong: the admin is very flexible and useful, but it's not intended to do everything for you.
The only way I see you being able to have this much control in the admin is to not inline A.
"If you don't trust U, just deny him access to the admin area all together". Kind of a stupid doctrine.
Not really, when you consider that the admin isn't intended to have the required level of security hardening to guarantee that fine-grain level of access control. There are many, many places in the admin, due to its open and extensible nature, where bugs can lurk (usually in user-written code) that can be exploited by bad actors. This is why untrusted users should always see all admin URLs return 404.
Anyway, when access control requirements are that fine-grained, it becomes unlikely that a general (i.e. django.contrib) solution will fit.
| 0 | 0 | 0 | 0 |
2010-05-18T14:14:00.000
| 1 | 1.2 | true | 2,858,040 | 0 | 0 | 1 | 1 |
I'm not sure if this is a bug or I'm just missing something (although I have already parsed the documentation about inlines), but:
Let's say I have a model A. Model A is an inline of model B. User U has full access to model B, but only change permissions to model A (so, no add, nor delete).
However, when editing model B, user U can still see the "Add another A" link at the bottom, although U hasn't add permissions for that respective model.
What's wrong? Why does that link keep on showing? My logic says that if U does not have permissions to add A, the link shouldn't appear anymore.
Also, ideally, I would like to give U only view rights to model A (so no add, delete or change - only view), but I've read about that (strange, if you ask me) philosophy according to which "If you don't trust U, just deny him access to the admin area all together". Kind of a stupid doctrine.
Right now, I'm trying to simulate this 'view only permissions' by leaving U with just change rights and set all fields as read only. But I think this is kind of a stupid approach and may also cause problems like the permissions thing above...
How does an average Django programmer like me achieve view-only permissions, and most of all how should I get rid of the "Add another A" link at the bottom of the admin edit form?
Thanks in advance!
|
Integrating Jython Cpython
| 2,861,467 | 0 | 3 | 1,047 | 0 |
python,qt,pyqt,process,jython
|
If the criteria is not reinventing the wheel, there is the SimpleXMLRPCServer and xmlrpclib modules available in the standard library. They should work in Jython too.
| 1 | 0 | 0 | 0 |
2010-05-18T19:58:00.000
| 2 | 0 | false | 2,860,650 | 0 | 0 | 1 | 1 |
I am about to begin a project where I will likely use PyQt or Pyside.
I will need to interface with a buggy 3rd party piece of server software that provides C++ and Java APIs. The Java APIs are a lot easier to use because you get Exceptions where with the C++ libraries you get segfaults. Also, the Python bindings to the Java APIs are automatic with Jython whereas the Python bindings for the C++ APIs don't exist.
So, how would a CPython PyQt client application be able to communicate with these Java APIs? How would you go about it?
Would you have another separate Java process on the client that serializes / pickles objects and communicates with the PyQt process over a socket?
I don't want to re-invent the wheel... is there some sort of standard interface for these types of things? Some technology I should look into? RPC, Corba, etc?
Thanks,
~Eric
|
sqlalchemy natural sorting
| 2,863,830 | 1 | 1 | 1,746 | 1 |
python,sqlalchemy
|
Sorting is done by the database. If you database doesn't support natural sorting your are out of luck and have to sort your rows manually after retrieving them via sqlalchemy.
| 0 | 0 | 0 | 0 |
2010-05-19T07:59:00.000
| 1 | 0.197375 | false | 2,863,748 | 0 | 0 | 1 | 1 |
Currently, i am querying with this code: meta.Session.query(Label).order_by(Label.name).all()
and it returns me objects sorted by Label.name in this manner ['1','7','1a','5c']. Is there a way i can have the objects returned in the order with their Label.name sorted like this ['1','1a','5c','7']
Thanks!
|
Importing Sqlite data into Google App Engine
| 2,873,946 | 0 | 5 | 2,231 | 1 |
python,google-app-engine,sqlite
|
I have not had any trouble importing pysqlite2, reading data, then transforming it and writing it to AppEngine using the remote_api.
What error are you seeing?
| 0 | 1 | 0 | 0 |
2010-05-20T00:47:00.000
| 4 | 0 | false | 2,870,379 | 0 | 0 | 1 | 1 |
I have a relatively extensive sqlite database that I'd like to import into my Google App Engine python app.
I've created my models using the appengine API which are close, but not quite identical to the existing schema. I've written an import script to load the data from sqlite and create/save new appengine objects, but the appengine environment blocks me from accessing the sqlite library. This script is only to be run on my local app engine instance, and from there I hope to push the data to google.
Am I approaching this problem the wrong way, or is there a way to import the sqlite library while running in the local instance's environment?
|
How should I go about learning Python?
| 2,888,075 | 1 | 11 | 2,771 | 0 |
python,django
|
If it is your basics in OOPS that you wish to strengthen, Java is a good option(provided you know c++ or any other non-web-based language which supports OOPS). However, if you are looking towards web-development, Python should be your best option.
Yes, Python is a good option
Yes, Django is a very good web application framework(and they have awesome documentation and tutorials put up at their site)
To learn Python I definitely recommend reading "The Python Cookbook" cover-to-cover. Its fun, and covers some very important concepts. However, there really is no substitute for the standard python documentation. Its well written, but it might take a while through a major portion of it. Using it as just reference material is also a fine idea.
Well I have seen domains which allow Django to be hosted; also you should try out the GAE(google app engine) once you are comfortable with django. Its a great place to host your apps.
| 0 | 0 | 0 | 0 |
2010-05-20T17:36:00.000
| 10 | 0.019997 | false | 2,876,337 | 1 | 0 | 1 | 1 |
I am currently learning PHP and want to learn about OOP.
I know Python is a well-organized and is all OOP, so would learning Python be a wise choose to learn OOP?
The thing is I am more towards web development then just general programming, and I know Python is just a general purpose language, but there is Django.
So how should I go about learning Python if I am lending towards web development?
Is there any good books/websites that help me learn Python for web development?
Is there any free webhosting companies that allow Python? I never used Python before, only PHP, and not sure how it works? Is there like a "xampp" for python?
|
Can Django be used for web services?
| 2,877,686 | 3 | 2 | 2,678 | 0 |
python,django,web-services,pylons
|
Yes, we use it directly. We have view functions that respond to some URI's with serialized JSON or XML objects instead of pretty HTML pages.
| 0 | 0 | 0 | 0 |
2010-05-20T19:27:00.000
| 3 | 0.197375 | false | 2,877,101 | 0 | 0 | 1 | 2 |
My friend said, "Pylons is so much better for web services."
My other friend said, "You can modify Django in a way to do exactly whatever you like."
In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?
|
Can Django be used for web services?
| 30,111,944 | 2 | 2 | 2,678 | 0 |
python,django,web-services,pylons
|
Absolutely.
Django is in fact made to be used on server side. But first you need to understand that it is a framework.
A framework is a set of tools which get the common activities done in web development (e.g Login or Sign up module).
| 0 | 0 | 0 | 0 |
2010-05-20T19:27:00.000
| 3 | 0.132549 | false | 2,877,101 | 0 | 0 | 1 | 2 |
My friend said, "Pylons is so much better for web services."
My other friend said, "You can modify Django in a way to do exactly whatever you like."
In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?
|
Referring to objects inside a list without using references or indices
| 2,877,637 | 4 | 2 | 190 | 0 |
python
|
Instead of using a list, why not use a dictionary and use small integers as the keys? Adding and removing items from the dictionary will not change the indices into the dictionary. You will want to keep one value in the dictionary that lets you know what the next assigned index will be.
| 0 | 0 | 0 | 0 |
2010-05-20T20:38:00.000
| 2 | 1.2 | true | 2,877,617 | 1 | 0 | 1 | 2 |
I'm using python for my shopping cart class which has a list of items. When a customer wants to edit an item, I need to pass the JavaScript front-end some way to refer to the item so that it can call AJAX methods to manipulate it.
Basically, I need a simple way to point to a particular item that isn't its index, and isn't a reference to the object itself.
I can't use an index, because another item in the list might be added or removed while the identifier is "held" by the front end. If I were to pass the index forward, if an item got deleted from the list then that index wouldn't point to the right object.
One solution seems to be to use UUIDs, but that seems particularly heavyweight for a very small list. What's the simplest/best way to do this?
|
Referring to objects inside a list without using references or indices
| 2,877,644 | 2 | 2 | 190 | 0 |
python
|
A UUID seems perfect for this. Why don't you want to do that?
Do the items have any sort of product_id? Can the shopping cart have more than one of the same product_id, or does it store a quantity? What I'm getting at is: If product_id's in the cart are unique, you can just use that.
| 0 | 0 | 0 | 0 |
2010-05-20T20:38:00.000
| 2 | 0.197375 | false | 2,877,617 | 1 | 0 | 1 | 2 |
I'm using python for my shopping cart class which has a list of items. When a customer wants to edit an item, I need to pass the JavaScript front-end some way to refer to the item so that it can call AJAX methods to manipulate it.
Basically, I need a simple way to point to a particular item that isn't its index, and isn't a reference to the object itself.
I can't use an index, because another item in the list might be added or removed while the identifier is "held" by the front end. If I were to pass the index forward, if an item got deleted from the list then that index wouldn't point to the right object.
One solution seems to be to use UUIDs, but that seems particularly heavyweight for a very small list. What's the simplest/best way to do this?
|
Python Django vs ASP.NET MVC
| 2,879,295 | 3 | 7 | 9,471 | 0 |
asp.net,python,asp.net-mvc,django
|
ASP.NET MVC is pretty cool if you already know C# and/or ASP... but if you're starting from scratch, Django is (IMO) a better bet. You probably have more hosting options for Django, for one thing.
| 0 | 0 | 0 | 0 |
2010-05-21T02:36:00.000
| 2 | 0.291313 | false | 2,879,251 | 0 | 0 | 1 | 1 |
I am fairly new at web development scene, and I was wondering if you can help me break up the pros and cons of using python django vs asp.net mvc besides the maturity level of its framework.
I have intermediate experience with Java. As of right now, I am leaning towards Python, but I just wanted to make sure, I am making the right choice. I find myself limited with books available on asp.net web developments. I am aware that there is the storefront example on the official asp.net site. However, that tutorial was a little hard for me to follow. I've done a research around and was hoping python could be my next available choice. There are more tutorials available online for Python anyways.
What do you think?
|
bundles in java?
| 2,881,839 | 1 | 3 | 110 | 0 |
java,php,python,django,symfony1
|
I suppose the closest thing in Javaland is the venerable Web Application Archive (war file).
| 0 | 0 | 0 | 0 |
2010-05-21T12:02:00.000
| 3 | 0.066568 | false | 2,881,825 | 0 | 0 | 1 | 1 |
in symfony 2.0 and django there are bundles that contain everything for a feature (html, css, js, img, php/python).
so if you want to delete one feature, you basically just delete that bundle and unregister it from "main".
are there java frameworks for this too? or is it different in java cause java is a compiling language.
thanks
|
Identifying if a data is RSS or HTML on python
| 2,883,114 | 0 | 1 | 81 | 0 |
python,html,rss
|
Filetypes should generally be determined out-of-band. eg. if you are fetching the file from a web server, the place to look would be the Content-Type header of the HTTP response. If you're fetching a local file, the filesystem would have a way of determining filetype—on Windows that'd be looking at the file extension.
If none of that is available, you'd have to resort to content sniffing. This is never wholly reliable, and RSS is particularly annoying because there are multiple incompatible versions of it, but about the best you could do would probably be:
Attempt to parse the content with an XML parser. If it fails, the content isn't well-formed XML so can't be RSS.
Look at the document.documentElement.namespaceURI. If it's http://www.w3.org/1999/xhtml, you've got XHTML. If it's http://www.w3.org/1999/02/22-rdf-syntax-ns#, you've got RSS (of one flavour).
If the document.documentElement.tagName is rss, you've got RSS (of a slightly different flavour).
If the file couldn't be parsed as XML, it could well be HTML (or some tag-soup approximation of it). It's conceivable it might also be broken RSS. In that case most feed tools would reject it. If you need to still detect this case you'd be reduced to looking for strings like <html or <rss or <rdf:RSS near the start of the file. This would be even more unreliable.
| 0 | 0 | 1 | 0 |
2010-05-21T13:44:00.000
| 2 | 1.2 | true | 2,882,549 | 0 | 0 | 1 | 2 |
Is there a function or method I could call in Python
That would tell me if the data is RSS or HTML?
|
Identifying if a data is RSS or HTML on python
| 2,882,574 | 2 | 1 | 81 | 0 |
python,html,rss
|
You could always analyze it yourself to search for an xml tag (for RSS) or html tag (for HTML).
| 0 | 0 | 1 | 0 |
2010-05-21T13:44:00.000
| 2 | 0.197375 | false | 2,882,549 | 0 | 0 | 1 | 2 |
Is there a function or method I could call in Python
That would tell me if the data is RSS or HTML?
|
Google App Engine, Task Queues
| 2,889,352 | 3 | 3 | 1,032 | 0 |
python,google-app-engine,httpwebrequest,scheduled-tasks
|
A task is removed from the queue when it executes if and only if it returns an HTTP 200 response. For any other response, it will be retried until it successfully executes.
As David's answer indicates, they can also be manually removed.
| 0 | 1 | 0 | 0 |
2010-05-21T18:29:00.000
| 3 | 0.197375 | false | 2,884,579 | 0 | 0 | 1 | 1 |
How can I remove a task from a task queue? Is Google App Engine Task Queue removes the task from the queue after it is executed?
|
Python 2.6 + PIL + Google App Engine issue
| 2,885,231 | -1 | 3 | 1,343 | 0 |
python,image,google-app-engine
|
How did you install PIL? If I remember correctly, I had to install it via MacPorts to get the App Engine SDK to recognize that it was installed.
You should probably install Python 2.5 and use that, while you're at it, since that is the Python version that App Engine uses and developing against 2.6 locally could potentially lead to surprising issues when you deploy your app.
| 0 | 1 | 0 | 0 |
2010-05-21T19:38:00.000
| 5 | -0.039979 | false | 2,885,057 | 1 | 0 | 1 | 4 |
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors.
However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue.
-Matthew
|
Python 2.6 + PIL + Google App Engine issue
| 2,889,386 | 0 | 3 | 1,343 | 0 |
python,image,google-app-engine
|
You cannot use PIL with Appengine; it uses C extensions and won't run in the sandbox environment. You do need to have PIL installed on your local machine to use the images API in dev_appserver, because the SDK version of the images API itself uses PIL, but this doesn't mean you can use all of PIL through the images API; the images API is fairly limited.
Additionally, it's a good idea to use Python 2.5 for development, as the production environment uses version 2.5.2 and not all Python 2.6 syntax will work in production (notably "except FooError as bar"), and the purpose of the development server is to test that your code will work right in production.
| 0 | 1 | 0 | 0 |
2010-05-21T19:38:00.000
| 5 | 0 | false | 2,885,057 | 1 | 0 | 1 | 4 |
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors.
However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue.
-Matthew
|
Python 2.6 + PIL + Google App Engine issue
| 4,180,349 | 1 | 3 | 1,343 | 0 |
python,image,google-app-engine
|
I had this same problem and found in GoogleAppEngineLauncher | Preferences that I needed to set the Python Path to /usr/local/bin/python2.5
After I did that it started working.
| 0 | 1 | 0 | 0 |
2010-05-21T19:38:00.000
| 5 | 0.039979 | false | 2,885,057 | 1 | 0 | 1 | 4 |
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors.
However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue.
-Matthew
|
Python 2.6 + PIL + Google App Engine issue
| 28,392,607 | 0 | 3 | 1,343 | 0 |
python,image,google-app-engine
|
What David Scott said is actually correct.
I had the errors blow running and couldn't for the heck of me couldn't resolve the issue no matter what patches I tried. What worked for me apparently, was simply changing the Python directory found on C:\python27_x64 and target the pythonw.exe file using the Google App Engine.
FYI, I run with Windows 8.1
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\appcfg.py", line 127, in
run_file(file, globals())
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\appcfg.py", line 123, in run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 5399, in
main(sys.argv)
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 5390, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 2980, in Run
self.action(self)
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 5046, in call
return method()
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 3793, in Update
self._UpdateWithParsedAppYaml(appyaml, self.basepath)
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appcfg.py", line 3814, in _UpdateWithParsedAppYaml
updatecheck.CheckForUpdates()
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\sdk_update_checker.py", line 243, in CheckForUpdates
runtime=runtime))
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\appengine_rpc.py", line 424, in Send
f = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 431, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 449, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 409, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1240, in https_open
context=self._context)
TypeError: do_open() got an unexpected keyword argument 'context'
2015-02-08 17:42:53 (Process exited with code 1)
You can close this window now.
| 0 | 1 | 0 | 0 |
2010-05-21T19:38:00.000
| 5 | 0 | false | 2,885,057 | 1 | 0 | 1 | 4 |
I am using OS X 1.6 snow leopard and I successfully got PIL installed. I am able to open terminal and type import Image without any errors.
However, When using app engine I get Image error still saying that PIL is not installed. I am wondering if any of you have an thoughts as to how I can resolve this issue.
-Matthew
|
Which logging library to use for cross-language (Java, C++, Python) system
| 2,926,570 | 1 | 11 | 2,806 | 0 |
java,c++,python,logging
|
I'd use Apache log4cxx or Apache log4j.
It's Efficient. It has Logger hierarchies to modularize your logs. It's proven tecnology for a while now.
Currently, appenders exist for the console , files , GUI components, remote socket servers, NT Event Loggers , and remote UNIX Syslog daemons. It is also possible to log asynchronously.
How can I support distributed logging?
With remote socket servers appenders for example.
| 0 | 1 | 0 | 1 |
2010-05-21T21:49:00.000
| 3 | 0.066568 | false | 2,885,822 | 0 | 0 | 1 | 1 |
I have a system where a central Java controller launches analysis processes, which may be written in C++, Java, or Python (mostly they are C++). All these processes currently run on the same server. What are you suggestions to
Create a central log to which all processes can write to
What if in the future I push some processes to another server. How can I support distributed logging?
Thanks!
|
What exactly is a web application framework?
| 2,886,479 | 0 | 3 | 474 | 0 |
python,django,cgi,web-frameworks
|
A web application framework is independent of the actual HTTP server in use. The server passes an application written using it the requests, and it cranks some gears and spits out a response, which is sent back to the HTTP server.
Django has 3 popular connectors to the HTTP server: WSGI, FastCGI, and mod_python. These are all explained... somewhere here, so I'll not repeat information that can easily be discovered.
| 0 | 0 | 0 | 0 |
2010-05-22T00:47:00.000
| 4 | 0 | false | 2,886,466 | 0 | 0 | 1 | 3 |
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi?
Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges.
thanks
|
What exactly is a web application framework?
| 2,888,049 | 0 | 3 | 474 | 0 |
python,django,cgi,web-frameworks
|
Basically the functions of any framework are:-
make sure that you do not have to do the repetitive tasks.
make it easy for you to re-use and modularize
they provide a layer of abstraction(which in most cases, makes you more productive)
So, Django is a web application framework; naturally it satisfies all three conditions above.
If you are interested in cgi programming using Python you should`nt be looking at Django.
On the other hand, if you are looking for options for web-development, then django certainly is a good option while manual cgi programming is not.
| 0 | 0 | 0 | 0 |
2010-05-22T00:47:00.000
| 4 | 0 | false | 2,886,466 | 0 | 0 | 1 | 3 |
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi?
Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges.
thanks
|
What exactly is a web application framework?
| 2,886,475 | 0 | 3 | 474 | 0 |
python,django,cgi,web-frameworks
|
A web application framework like Django replaces CGI by spawning its own processes and handling requests from a web server. They also provide tools for simplifying html by creating templates, partial templates, helpers etc.
If you don't have full control over your server, your host will need to install it for you.
| 0 | 0 | 0 | 0 |
2010-05-22T00:47:00.000
| 4 | 0 | false | 2,886,466 | 0 | 0 | 1 | 3 |
I'm getting into python for cgi and came across Django. I'm not quite sure I understand it very much. Is it something I have to install inside apache or is it just something I can use with my cgi?
Wanted to know because I'd love to learn it but my server I'm using doesn't give me a lot of privileges.
thanks
|
Django Barcode for store sales
| 2,887,309 | 9 | 5 | 2,820 | 0 |
django,vb6,python
|
If your definition of barcode functionality is the ability to read and write barcodes, you should keep in mind two things.
Barcodes are actually read by barcode readers, and from the computers' point of view they are just input devices, just like keyboards. When the reader reads a barcode, it just "types" it in, character by character. Usually it's configurable what the reader sends after the code, tab or enter are quite common options. Enter is the easiest to deal with.
There's nothing special in writing barcodes, it's just text with a special font, with *-characters before and after the code.
Handling barcodes doesn't really have much to do with Django. Some tricks are required to get it done within browsers, but these would apply if you were doing it in RoR, .net or whatever:
Handling barcodes from a web app is quite straightforward. A text input is needed and a bit of javascript to make sure the input has focus, and to trigger action when a barcode has been read.
Printing barcodes is not very hard either, just use css3 embedded fonts. If that's too cutting edge, you can always create images of the barcodes server-side, and it'll work with any browser.
| 0 | 0 | 0 | 0 |
2010-05-22T05:20:00.000
| 1 | 1.2 | true | 2,887,045 | 0 | 0 | 1 | 1 |
I am in process of converting Visual Basic app into Python Django. Currently, it has barcode functionality to process sales at a store. Can this be achieved with python django.
|
Huffman coding two characters as one
| 2,888,480 | 6 | 3 | 1,395 | 0 |
java,python,huffman-code
|
Huffman code doesn't care about characters, it cares about symbols. Generally, it is used to encode the alphabet / other single characters, but can very easily be generalized to encode strings of characters. Basically, you would just take an existing implementation and allow symbols to be strings rather than characters. A leaf node would then correspond to a list of strings.
| 0 | 0 | 0 | 1 |
2010-05-22T14:36:00.000
| 3 | 1 | false | 2,888,468 | 0 | 0 | 1 | 2 |
I need huffman code(best in python or in java), which could encode text not by one character (a = 10, b = 11), but by two (ab = 11, ag = 10). Is it possible and if yes, where could i find it, maybe it's somewhere in the internet and i just can'd find it?
|
Huffman coding two characters as one
| 2,888,494 | 0 | 3 | 1,395 | 0 |
java,python,huffman-code
|
There is probably some code somewhere. But this sounds like a parsing and tokenising question. One of the first questions I would be answering is how many unique pairs are you dealing with. Huffman encoding works best with small numbers of tokens. For example, the 101 characters on your keyboard. But if your two characters can be anything, you are now expanding the maximum number of characters massively.
| 0 | 0 | 0 | 1 |
2010-05-22T14:36:00.000
| 3 | 0 | false | 2,888,468 | 0 | 0 | 1 | 2 |
I need huffman code(best in python or in java), which could encode text not by one character (a = 10, b = 11), but by two (ab = 11, ag = 10). Is it possible and if yes, where could i find it, maybe it's somewhere in the internet and i just can'd find it?
|
Why program with php frameworks if it can be done better with ruby on rails, python or java?
| 2,891,024 | 3 | 1 | 240 | 0 |
java,php,python,ruby-on-rails,django
|
If you only know PHP and you don't feel like learning Ruby/Python/Java. Seriously, if it can be done better with another tool, it should be done with another tool. Of course, this assumes the other tools are actually better. That part is arguable. Some people are so stuck up on their "my way is the best way" that they leave out the "because it's the only way I know" part.
| 0 | 0 | 0 | 1 |
2010-05-23T07:56:00.000
| 2 | 1.2 | true | 2,891,017 | 0 | 0 | 1 | 1 |
We have discussion in my job place about question (We use 1 of the php frameworks):
Why program with php frameworks big web application if it can be done better with ruby on rails, python or java?
Please say our opinion
thanks
|
manage.py runserver throws an ImportError with my appname, MacPorts issue on OSX?
| 2,901,051 | 0 | 1 | 2,460 | 0 |
python,django,macos
|
Okay, so this is very bizarre and I don't know what happened... but here's what fixed:
I open terminal and bash isn't recognizing any commands (python, vi, etc)
I restart machine, still not recognizing any commands
I look at my $PATH and /usr/bin is missing
I add /usr/bin to $PATH
I open vi and modify my profile to add /usr/bin
vi works, python works
python manage.py runserver works
How did /usr/bin get removed from my bash profile?
| 0 | 0 | 0 | 0 |
2010-05-24T01:41:00.000
| 2 | 0 | false | 2,894,344 | 0 | 0 | 1 | 1 |
I've been developing a Django app for weeks locally on OSX 10.6.3. Recently, I rebooted my machine and went to start my development environment up.
Here's the error:
cm:myApp cm$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 11, in execute_manager(settings)
File "/Library/Python/2.6/site-packages/django/core/management/init.py", line 360, in execute_manager
setup_environ(settings_mod)
File "/Library/Python/2.6/site-packages/django/core/management/init.py", line 343, in setup_environ
project_module = import_module(project_name)
File "/Library/Python/2.6/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
ImportError: No module named myapp
I'm pretty new to Django / Python.
Digging around, it's possible that this might be due to MacPorts. Initially, I had a rough time getting Django up and running and I no longer remember if I'm using the Django from a MacPorts install or from easy_install. How do I tell? (I'd prefer not to reinstall everything).
Also, why is the camel casing in my app name gone in the ImportError message? When I search for "myapp" in my django project, I don't find it without camelcase anywhere.
And what causes MacPorts to work for a while but then break?
As a few other details, from settings.py:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'south',
'registration',
'pypaypal',
'notifier',
'myApp.batches',
)
|
send activate-email with django-registration
| 17,230,981 | 3 | 8 | 11,049 | 0 |
python,django,django-registration
|
EMAIL_PORT = 465 was working some year ago. Now you need to use port 587 with gmail.
Reason: Django does not support SMTP with SSL from the beginning. Only STARTTLS command is supported AFTER plain-text connection is set up. Gmail, however, no longer supports this option on port 465.
| 0 | 0 | 0 | 0 |
2010-05-24T04:53:00.000
| 4 | 0.148885 | false | 2,894,802 | 0 | 0 | 1 | 2 |
I am curious if there's a way to send activated email with username, password by using django-registration. First I thought about modifying registration form but I need some example.
|
send activate-email with django-registration
| 31,984,785 | 2 | 8 | 11,049 | 0 |
python,django,django-registration
|
Hope this will help someone. After troubleshooting for half an hour, I realised that I had to explicitly state this as well while using django-registration -
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
| 0 | 0 | 0 | 0 |
2010-05-24T04:53:00.000
| 4 | 0.099668 | false | 2,894,802 | 0 | 0 | 1 | 2 |
I am curious if there's a way to send activated email with username, password by using django-registration. First I thought about modifying registration form but I need some example.
|
How to restrict the size of file being uploaded apache + django
| 2,894,962 | 0 | 1 | 4,866 | 0 |
python,django,apache
|
apache has a server setting for max file size..(also dont forget max post size). I do not believe apache can show an error page on its own, you can probably use python for that.
unfortunetly I know nothing obout python (yet) so I can't really help you beyond that.
I know php can do that easily so I'm sure there is a method for python.
| 0 | 0 | 0 | 0 |
2010-05-24T05:26:00.000
| 4 | 0 | false | 2,894,914 | 0 | 0 | 1 | 1 |
How to restrict the size of file being uploaded.
I am using django 1.1 with apache.
Can I use apache for this and show some html error page if say size is bigger then 100MB.
Thanks.
|
Google App Engine appcfg.py data_upload Authentication fail
| 2,940,702 | 2 | 3 | 1,823 | 0 |
python,google-app-engine
|
If your administrator is an Apps for Domains account (eg, @yourdomain.com), and your app uses Google Accounts authentication, you won't be able to authenticate as an admin on your app. You need to add a Google Accounts (eg, @google.com) account as an administrator, and use that to upload.
| 0 | 1 | 0 | 0 |
2010-05-24T07:22:00.000
| 2 | 0.197375 | false | 2,895,397 | 0 | 0 | 1 | 1 |
I am using appcfg.py to upload data to datastore from a csv file.
But every time I try, I am getting error:
[info ] Authentication failed
even if i am using Admin id and password.
In my app.yaml file I am having:
handlers:
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
- url: .*
script: MainHandler.py
Can anybody please help me?
Thanks in advance.
|
Overriding Django Admin's main page? - Django
| 3,166,408 | 4 | 3 | 8,486 | 0 |
python,django,admin,overriding
|
You can use template hierarchy like:
index.html
...
{% block content %}
...
{% block mycontent %}My custom text{% endblock %}
...
{% endblock %}
app_index.html
...
{% block mycontent %}{% endblock %}
..
| 0 | 0 | 0 | 0 |
2010-05-24T11:11:00.000
| 3 | 1.2 | true | 2,896,490 | 0 | 0 | 1 | 1 |
I'm trying to add features to Django 1.2 admin's main page.
I've been playing with index.html, but features added to this page affect all app pages.
Any ideas on what template I'm supposed to use?
Thanks loads!!
|
Better error reporting mako
| 2,946,762 | 0 | 2 | 198 | 0 |
python,mako
|
I don't think you're likely to find such a thing. Like all the other fast python template engines, Mako achieves its speed by compiling your template into python code and then executing it. An exception will divert execution out of your template's code, so by the time one is raised, that template will have no way of displaying it (or doing anything else for that matter).
As an alternative, I suggest putting your template rendering code inside a try block, and rendering any caught exceptions with a separate template used specifically for that purpose.
| 0 | 0 | 0 | 1 |
2010-05-25T15:12:00.000
| 2 | 1.2 | true | 2,905,948 | 0 | 0 | 1 | 2 |
Is there a way to add tempate string which contains error to mako`s error trace?
|
Better error reporting mako
| 9,271,873 | 0 | 2 | 198 | 0 |
python,mako
|
I was looking for another error I have and found this. I though it would be nice if you still ever need this, you can achieve it by setting mako.strict_undefined = True. I am using mako-0.6.2 so it may not been possible in the version back in 2010.
| 0 | 0 | 0 | 1 |
2010-05-25T15:12:00.000
| 2 | 0 | false | 2,905,948 | 0 | 0 | 1 | 2 |
Is there a way to add tempate string which contains error to mako`s error trace?
|
way to fix number of concurrent sessions allowed at app level. django
| 2,907,043 | 0 | 2 | 201 | 0 |
python,django,session
|
You're not asking about sessions, you're asking about requests. What you want is known as throttling. However, it would be quite difficult to do it inside the app, because Apache manages multiple processes and threads, so you'd need some external process to keep track of these in order to enable the throttling.
Basically, this sort of thing is best done within Apache itself, by something like mod_throttle.
| 0 | 0 | 0 | 0 |
2010-05-25T17:12:00.000
| 3 | 0 | false | 2,906,790 | 0 | 0 | 1 | 1 |
How can I fix number of concurrent sessions allowed at app level?
Basically I want a limit to how many concurrent requests to this url to keep the server from getting congested.
I guess some middleware hack?
Thanks.
|
Good real-world uses of metaclasses (e.g. in Python)
| 2,907,750 | 0 | 13 | 2,053 | 0 |
python,metaprogramming
|
SQLalchemy also uses them for declarative database models.
Sorry my answer isn't very different from your example, but if you're looking for example code, I found declarative to be pretty readable.
| 0 | 0 | 0 | 0 |
2010-05-25T18:43:00.000
| 5 | 0 | false | 2,907,498 | 0 | 0 | 1 | 1 |
I'm learning about metaclasses in Python. I think it is a very powerful technique, and I'm looking for good uses for them. I'd like some feedback of good useful real-world examples of using metaclasses. I'm not looking for example code on how to write a metaclass (there are plenty examples of useless metaclasses out there), but real examples where you have applied the technique and it was really the appropriate solution. The rule is: no theoretical possibilities, but metaclasses at work in a real application.
I'll start with the one example I know:
Django models, for declarative programming, where the base class Model uses a metaclass to fill the model objects of useful ORM functionality from the attribute definitions.
Looking forward to your contributions.
|
Non-global middleware in Django
| 33,104,799 | 2 | 48 | 20,267 | 0 |
python,django,middleware,django-middleware
|
You can use process_view method, that is called before calling the view func. In process_view you can check — if this view requires this middleware interception.
| 0 | 0 | 0 | 0 |
2010-05-26T21:30:00.000
| 9 | 0.044415 | false | 2,916,966 | 0 | 0 | 1 | 2 |
In Django there is a settings file that defines the middleware to be run on each request. This middleware setting is global. Is there a way to specify a set of middleware on a per-view basis? I want to have specific urls use a set of middleware different from the global set.
|
Non-global middleware in Django
| 18,391,612 | 1 | 48 | 20,267 | 0 |
python,django,middleware,django-middleware
|
The best thing I've been able to find is using if request.path_info.startswith('...') to skip over the middleware by just returning the request. Now, you could create middleware just for the sake of skipping and then inherit that. Maybe you could do something even simpler and save that list in your settings.py and then skip all those. If I'm wrong in any way, let me know.
| 0 | 0 | 0 | 0 |
2010-05-26T21:30:00.000
| 9 | 0.022219 | false | 2,916,966 | 0 | 0 | 1 | 2 |
In Django there is a settings file that defines the middleware to be run on each request. This middleware setting is global. Is there a way to specify a set of middleware on a per-view basis? I want to have specific urls use a set of middleware different from the global set.
|
Django URL resolving infrastructure stops working
| 2,955,645 | 2 | 2 | 367 | 0 |
python,django,fastcgi,django-urls
|
Django has a odd behaviour when matching urls in a environment that isn't under debug mode.
For example, with DEBUG=False, Django will ignore urls such as:
url(r'^', include('someapp.urls')),
specifically in the case above, you could let the string empty:
url(r'', include('someapp.urls')),
In other words, check your regexes.
Can you put your urls.py here to be analyzed?
| 0 | 0 | 0 | 0 |
2010-05-27T00:03:00.000
| 2 | 0.197375 | false | 2,917,687 | 0 | 0 | 1 | 2 |
We recently launched a new Django-powered website, and we are experiencing the oddest bug:
The site is running under Apache with mod_fastcgi. Everything works fine for a while, and then the URL tag and reverse() functionality stops working. Instead of returning the expected URL, they return "".
We haven't noticed anything in Apache's log file; there are no errors being generated by Django. And (the kicker) the problem only occurs in production mode; we can't reproduce it when DEBUG=True.
Any thoughts on where we should be looking for the problem?
Update: It turned out to be a problem with settings.LANGUAGES, although we haven't determined exactly why that broke things.
|
Django URL resolving infrastructure stops working
| 2,957,239 | 7 | 2 | 367 | 0 |
python,django,fastcgi,django-urls
|
This has happened to me before. Normally it's due to a 'broken' urls.py file. There are two things that make this kind of bug really hard to fix:
It could be the urls.py file in any of the apps that breaks the reverse() function, so knowing that reverse() breaks for app X doesn't mean the error is in that particular application's urls.py.
Django won't even notify you of errors in the urls.py file, unless you somehow manage to crash the site by doing something really, really nasty in the urls.py file.
Debugging: The way I go around fixing this is by manually disabling all applications (just comment out their line in INSTALLED_APPS) and checking reverse() works. If it still works, then I enable the next app, until it breaks. I know, very rudimentary stuff, but it works :)
| 0 | 0 | 0 | 0 |
2010-05-27T00:03:00.000
| 2 | 1.2 | true | 2,917,687 | 0 | 0 | 1 | 2 |
We recently launched a new Django-powered website, and we are experiencing the oddest bug:
The site is running under Apache with mod_fastcgi. Everything works fine for a while, and then the URL tag and reverse() functionality stops working. Instead of returning the expected URL, they return "".
We haven't noticed anything in Apache's log file; there are no errors being generated by Django. And (the kicker) the problem only occurs in production mode; we can't reproduce it when DEBUG=True.
Any thoughts on where we should be looking for the problem?
Update: It turned out to be a problem with settings.LANGUAGES, although we haven't determined exactly why that broke things.
|
Get Path of Uploaded File using Python
| 2,918,021 | 5 | 0 | 1,903 | 0 |
python,upload
|
No, that information isn't sent by the user, so it's not available on your end
| 0 | 0 | 0 | 1 |
2010-05-27T01:53:00.000
| 2 | 0.462117 | false | 2,918,010 | 0 | 0 | 1 | 1 |
Is it possible to get the full path of the file on the user's computer being uploaded to my site?
Using os.path.abspath(fileitem.filename) simply gets me the address of where my script is executing from on my shared hosting server.
FYI: fileitem = form['file'] and form = cgi.FieldStorage()
|
Images not loading in QWebview in PyQt4 in py2exe
| 2,925,711 | 2 | 1 | 1,402 | 0 |
python,pyqt4,py2exe,qwebview
|
Only png support is native, jpg (and others) is supplied via plugins.
Don't recall the exact paths (and I don't know your platform) but search for the PyQt plugins folder and:
Copy the plugins folder to: $yourprogram/PyQt4/plugins (along with qt.conf)
Edit qt.conf, and change prefix to $yourprogram/PyQt4
You might also need to convince py2exe to also include this folder (verbatim).
| 1 | 0 | 0 | 0 |
2010-05-27T20:46:00.000
| 1 | 0.379949 | false | 2,924,781 | 0 | 0 | 1 | 1 |
I have an application that displays some HTML in a QWebview, which references images on the local file system. This works fine directly running the python. When compiling via py2exe, the images no longer load. Google doesn't seem to know the answer, any ideas?
|
Get "2:35pm" instead of "02:35PM" from Python date/time?
| 2,925,269 | 1 | 29 | 13,086 | 0 |
python,datetime,time,formatting
|
I know it's pretty cheap, but you could just discard the first character if it's a zero :)
| 0 | 0 | 0 | 0 |
2010-05-27T21:48:00.000
| 8 | 0.024995 | false | 2,925,230 | 1 | 0 | 1 | 1 |
I'm still a bit slow with Python, so I haven't got this figured out beyond what's obviously in the docs, etc.
I've worked with Django a bit, where they've added some datetime formatting options via template tags, but in regular python code how can I get the 12-hour hour without a leading zero?
Is there a straightforward way to do this? I'm looking at the 2.5 and 2.6 docs for "strftime()" and there doesn't seem to be a formatting option there for this case.
Should I be using something else?
Feel free to include any other time-formatting tips that aren't obvious from the docs. =)
|
Python access webcam and audio input
| 2,926,268 | 0 | 2 | 2,165 | 0 |
python,streaming,webcam
|
Server-side web scripts have no access to the client other than through requests. You need to use JavaScript, Java, or Flash to access devices that the browser (and consequently user) allows them to.
| 0 | 0 | 0 | 1 |
2010-05-28T01:56:00.000
| 3 | 0 | false | 2,926,220 | 0 | 0 | 1 | 2 |
Can a python script on my server access the webcam and audio input of a user as easily and as well as a Flash plugin can?
|
Python access webcam and audio input
| 2,926,270 | 2 | 2 | 2,165 | 0 |
python,streaming,webcam
|
No: the "plugin" you mention runs in the user's browser, your server-side script (Python or otherwise) runs on the server, a completely different proposition. This relates to your other recent question about a server-side script accessing information on your desktop: your client machine tends to be very protected against possibly malicious server-side apps (never enough, but everybody keeps trying to make it more and more protected these days).
| 0 | 0 | 0 | 1 |
2010-05-28T01:56:00.000
| 3 | 0.132549 | false | 2,926,220 | 0 | 0 | 1 | 2 |
Can a python script on my server access the webcam and audio input of a user as easily and as well as a Flash plugin can?
|
Send files between python+django and C#
| 2,965,960 | 0 | 1 | 347 | 0 |
c#,python,sockets
|
The easier way on my use case was send files using HTTP because with python i have additionaly running django.
| 0 | 0 | 1 | 0 |
2010-05-28T15:17:00.000
| 2 | 1.2 | true | 2,930,211 | 0 | 0 | 1 | 1 |
i would like to know, what is the best way to send files between python and C# and vice versa.
I have my own protocol which work on socket level, and i can send string and numbers in both ways. Loops works too. With this i can send pretty much anything, like package of users id, if it is simple data. But soon i will start sending whole files, maybe xml or executables.
Simple server with files is no an option because i want sending files from client too.
I was thinking about serialization but i don't know it is the best solution, but if it is i will love some tips from stackoverflow community.
EDIT:
I added django to question and chose http.
|
Methods of sending web-generated config files to servers and restarting services
| 3,130,135 | 0 | 0 | 226 | 0 |
python,linux,administration,func
|
It really depends what you're intending to do, as the question is a little vague. The other answers cover the tools available; choosing one over the other comes down to purpose.
Are you intending to manage servers, and services on those servers? If so, try Puppet, CFEngine, or some other tool for managing server configurations.
Or, more specifically, are you looking for a deployment/buildout tool that talks to servers? So that you can type in something along the lines of "mytool deploy myproject", and have your project propagate to all the servers? In which case, fabric would be the tool to use.
Generally a good configuration will consist of both anyway... but for what it's worth, from the sound of it (managing DHCP/network/etc.), Puppet's the way to go.
| 0 | 0 | 1 | 0 |
2010-05-28T19:46:00.000
| 4 | 0 | false | 2,932,007 | 0 | 0 | 1 | 1 |
We're writing a web-based tool to configure our services provided by multiple servers. This includes interfaces configuration, dhcp configs etc. etc.
Having configs in database and views that generate proper output, how to send it/make it available for servers?
I'm thinking about sending it through scp and invoking reload command to services through ssh. I'm also thinking about using Func to do all the job, as this is Python tool and will seemingly integrate with python-based (django) config tool.
Any other proposals?
|
SQL Alchemy MVC and cross controller joins
| 2,934,084 | 2 | 1 | 430 | 1 |
python,model-view-controller,sqlalchemy,dns,controllers
|
Controllers are meant to encapsulate features for your convienience. Not to bind your hands. If you want to join, simply join. Use the controller that you think is logically fittest to make the query.
| 0 | 0 | 0 | 0 |
2010-05-29T04:25:00.000
| 1 | 1.2 | true | 2,933,796 | 0 | 0 | 1 | 1 |
When using SQL Alchemy for abstracting your data access layer and using controllers as the way to access objects from that abstraction layer, how should joins be handled?
So for example, say you have an Orders controller class that manages Order objects such that it provides getOrder, saveOrder, etc methods and likewise a similar controller for User objects.
First of all do you even need these controllers? Should you instead just treat SQL Alchemy as "the" thing for handling data access. Why bother with object oriented controller stuff there when you instead have a clean declarative way to obtain and persist objects without having to write SQL directly either.
Well one reason could be that perhaps you may want to replace SQL Alchemy with direct SQL or Storm or whatever else. So having controller classes there to act as an intermediate layer helps limit what would need to change then.
Anyway - back to the main question - so assuming you have these two controllers, now lets say you want the list of orders for a certain set of users meeting some criteria. How do you go about doing this? Generally you don't want the controllers crossing domains - the Orders controllers knows only about Orders and the User controller just about Users - they don't mess with each other. You also don't want to go fetch all the Users that match and then feed a big list of user ids to the Orders controller to go find the matching Orders.
What's needed is a join. Here's where I'm stuck - that seems to mean either the controllers must cross domains or perhaps they should be done away with altogether and you simply do the join via SQL Alchemy directly and get the resulting User and / or Order objects as needed. Thoughts?
|
Task Queue stopped working
| 2,935,659 | 1 | 1 | 391 | 0 |
python,google-app-engine,task-queue
|
The development server won't run tasks automatically, you have to set them off yourself.
It's a design feature, so you can see what happens when you run them, instead of them running at any point.
Essentially, there's nothing wrong with your application, it's a feature of development server.
| 0 | 1 | 0 | 0 |
2010-05-29T15:35:00.000
| 2 | 1.2 | true | 2,935,631 | 0 | 0 | 1 | 1 |
I was playing with Goole App Engine Task Queue API to learn how to use it. But I couldn't make it trigger locally. My application is working like a charm when I upload to Google servers. But it doesn't trigger locally. All I see from the admin is the list of the tasks. But when their ETA comes, they just pass it. It's like they runs but they fails and waiting for the retries. But I can't see these events on command line.
When I try to click "Run" on admin panel, it runs successfuly and I can see these requests from the command line. I'm using App Engine SDK 1.3.4 on Linux with google-app-engine-django. I'm trying to find the problem from 3 hours now and I couldn't find it. It's also very hard to debug GAE applications. Because debug messages do not appear on console screen.
Thanks.
|
python web script send job to printer
| 2,936,475 | 0 | 0 | 1,545 | 0 |
python,web-applications,printing
|
If your Python webapp is running inside a browser on the client machine, I don't see any other way than manually for the user.
Some workarounds you might want to investigate:
if you web app is installed on the client machine, you will be able to connect directly to the printer, as you have access to the underlying OS system.
you could potentially create a plugin that can be installed on the browser that does this for him, but I have no clue as how this works technically.
what is it that you want to print ? You could generate a pdf that contains everything that the user needs to print, in one go ?
| 0 | 0 | 1 | 0 |
2010-05-29T19:48:00.000
| 2 | 0 | false | 2,936,384 | 0 | 0 | 1 | 1 |
Is it possible for my python web app to provide an option the for user to automatically send jobs to the locally connected printer? Or will the user always have to use the browser to manually print out everything.
|
How to Not Force Login After Users Close Their Browser on gae
| 2,941,171 | 2 | 0 | 174 | 0 |
python,google-app-engine,session,login
|
Under Application Settings in the App Engine dashboard, you can choose either 1 day, 1 week, or 2 week cookie expiration, assuming you're using the Users API.
I don't believe the cookie should ever be set to expire when the browser is closed, unless the user's browser setting is causing this behavior. I can certainly stay logged in to my applications when restarting my browser.
| 0 | 0 | 0 | 0 |
2010-05-31T01:51:00.000
| 2 | 1.2 | true | 2,941,021 | 0 | 0 | 1 | 1 |
...Like Django's session or cookies
Does anyone have a simple way of allowing this?
|
Can the Django urls.py system be turned into Pylon's Routes?
| 2,945,937 | 0 | 2 | 202 | 0 |
python,django,routes,pylons
|
Could you be more specific?
If you want to adapt a django urlconf to routes at runtime it would be really tricky if not impossible and would require having a django settings.py present and an env variable pointing to it.
Otherwise translating a django urlconf to routes manually is doable. Routes is as flexible as django urlconfs when it comes to defining urlpatterns.
| 0 | 0 | 0 | 0 |
2010-05-31T19:32:00.000
| 1 | 1.2 | true | 2,945,615 | 0 | 0 | 1 | 1 |
Can the Django urls.py system be turned into Pylon's Routes?
|
How to backup an AppEngine site?
| 15,256,477 | 2 | 14 | 2,873 | 0 |
python,google-app-engine,backup
|
There is now a backup option available in the dashboard. See "datastore admin".
| 0 | 1 | 0 | 0 |
2010-05-31T22:06:00.000
| 4 | 0.099668 | false | 2,946,183 | 0 | 0 | 1 | 1 |
So, you build a great shiny cloudy 2.0 website on top of AppEngine, with thousands upon thousands of images saved into the datastore and gigs of data at the blobstore. How do you backup them?
|
Aptana Studio is opening but not ever closing a python.exe process
| 2,952,983 | 2 | 2 | 509 | 0 |
python,django,aptana
|
You should try adding --noreload to the runserver argument
| 0 | 1 | 0 | 1 |
2010-06-01T20:08:00.000
| 1 | 1.2 | true | 2,952,957 | 0 | 0 | 1 | 1 |
I am developing a small testing website using Django 1.2 in Aptana Studio build 2.0.4.1268158907. I have a Django project that I test by running the command "runserver 8001" on my project. This command runs the project on a small server that comes with Django.
However the problem arises that every time I run this command Aptana opens two instances of the process "python.exe". Upon terminating the command only one of these instances is ended. The other process continues to run and use memory. My server is not online, and the process doesn't seem to do anything that I can find. This happens every time i run the runserver command on my project and therefore more and more python.exe instances will open up through my development period.
Any help discovering either the purpose of this extra python.exe or a way to prevent it from opening would be much appreciated.
|
Django or Drupal, which one should I use that suits best my needs?
| 2,956,035 | 6 | 5 | 1,475 | 0 |
php,python,django,drupal
|
I've built several sites on Drupal and Django, my conclusion is: if you need to create something similar to the standard drupal (or Ubercart) feature-set, you don't have much time for development, and you don't expect hight load pressure on a site - you should pick Drupal.
But if you do need to create something more or less custom (no drupal modules already available) you should go with Django - it is quicker and more pleasurable to implement custom complex features using Django. For example if my goal is to implement a second stackoverflow, I'll prefer Django because it will be extremely complicated to implement this badge-based rating system with Drupal.
P.S.
Studying Python (and Django) is an investment in your future, I think. You'll never be able to implement something similar to DropBox using drupal and php, although it could be implemented with java - but java is not so good from development speed perspective.
| 0 | 0 | 0 | 0 |
2010-06-01T23:25:00.000
| 7 | 1.2 | true | 2,954,036 | 0 | 0 | 1 | 5 |
I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
|
Django or Drupal, which one should I use that suits best my needs?
| 2,954,057 | 2 | 5 | 1,475 | 0 |
php,python,django,drupal
|
Jump into what you like or what attracts you most after getting a little overview of the capabilities and constraints. I never worked with drupal, but I can recommend django.
| 0 | 0 | 0 | 0 |
2010-06-01T23:25:00.000
| 7 | 0.057081 | false | 2,954,036 | 0 | 0 | 1 | 5 |
I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
|
Django or Drupal, which one should I use that suits best my needs?
| 2,954,198 | 2 | 5 | 1,475 | 0 |
php,python,django,drupal
|
Consider your deployment. Pretty much every host will support Drupal. If you go with Django, you will need to select a host that supports fast_cgi or wsgi
| 0 | 0 | 0 | 0 |
2010-06-01T23:25:00.000
| 7 | 0.057081 | false | 2,954,036 | 0 | 0 | 1 | 5 |
I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
|
Django or Drupal, which one should I use that suits best my needs?
| 2,955,877 | 3 | 5 | 1,475 | 0 |
php,python,django,drupal
|
Drupal and Django doesn't make for a good comparison, as they are quite different.
If all you need is a simple website with a CMS and Paypal, I would go for Drupal. Drupal's strength compared Django is it's many modules (modular system), which most of the time can get you where you want. Drupal is also extremely flexible, and you can change almost anything from within your own code, and there is a huge demand for Drupal developers. You can also let site builders create content, display content and much from from within the AI.
Django on the other hand, is more simple and structured. It's based a lot more on code, making it fast and easy to develop something, but hard for non coders to change certain things. For sites that require a lot of custom coding, I usually prefer working with Django. Python is also a more structured programming language than PHP (IMO), and it's easier to make more maintainable code.
| 0 | 0 | 0 | 0 |
2010-06-01T23:25:00.000
| 7 | 0.085505 | false | 2,954,036 | 0 | 0 | 1 | 5 |
I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
|
Django or Drupal, which one should I use that suits best my needs?
| 2,956,336 | 0 | 5 | 1,475 | 0 |
php,python,django,drupal
|
I've been developing with Django for more than 2 years and have built a couple of Drupal sites in the meantime (per client's specific request to use Drupal). My conclusions are the following:
Even for a smaller site I would have done it quicker building it from scratch with django (or maybe even PHP) for a simple reason, writing code for me is faster than hunting through drupal's unorganized mess of menus and options, or hunting on the web for a module that implements hack X to enable feature Y.
Migrating a site from development to production with Drupal is a big PITA. You can forget about using a VCS tool. All your work is in in the MySQL dump (including configurations, programming logic, views etc.), a few hacked up modules and the uploaded files.
| 0 | 0 | 0 | 0 |
2010-06-01T23:25:00.000
| 7 | 0 | false | 2,954,036 | 0 | 0 | 1 | 5 |
I want to learn and use Drupal or Django for the following:
dynamic web sites, medium database, multi-level users, paypal integration, content managment, speed (developing), security
I like MVC, ORM and object-oriented prg.
Which is better to jump into ? Which one is more mature, powerful, understandable, object-oriented and easier to use by the time ?
What about Python Spring ...
Also, which of these 3 are better documented, are better for a cv and have more extensions?
Known languages: php, java, mysql
Thank you !
|
Are many Dojo Toolkit users also using Python?
| 2,959,051 | 1 | 0 | 516 | 0 |
python,dojo
|
My Python team has been using Dojo on the client-side for a few years now, and we settled on CherryPy as our server-side about a year ago, and are pretty pleased with it. It's fairly minimal as web servers go, and enables us to customize the server behavior as needed. Initially we looked at Django and Turbogears as well, but we needed to do some things vis-a-vis user authentication, DB tuning, and templating that didn't really fit well in the "full stack" frameworks, so we've rolled our own stack instead.
As for why Dojo and Python go well together, I can only speak for myself, but they seem to have a similar "feel" to me, so I can move from writing code on the server-side and client-side without having to make too much of a cognitive shift.
| 0 | 0 | 0 | 0 |
2010-06-02T10:45:00.000
| 1 | 1.2 | true | 2,956,904 | 1 | 0 | 1 | 1 |
I've coming to be more interested in Dojo Toolkit which I find great, but are many Dojo users also using Python also? And why is it like that?
I heard of Cherry Py (and why not Django?).
|
Best practice: How to persist simple data without a database in django?
| 2,959,612 | 5 | 0 | 1,910 | 0 |
python,django,persistence
|
Why not still keep it in a database? Your remote REST store is all well and funky, but if you've got local data, there's nothing (unless there's spec saying so) to stop you storing some stuff in a local db. Doesn't have to be anything v glamorous - could be sqlite, or you could have some fun with redis, etc.
| 0 | 0 | 0 | 0 |
2010-06-02T16:13:00.000
| 3 | 0.321513 | false | 2,959,503 | 0 | 0 | 1 | 1 |
I'm building a website that doesn't require a database because a REST API "is the database". (Except you don't want to be putting site-specific things in there, since the API is used by mostly mobile clients)
However there's a few things that normally would be put in a database, for example the "jobs" page. You have master list view, and the detail views for each job, and it should be easy to add new job entries. (not necessarily via a CMS, but that would be awesome)
e.g. example.com/careers/ and example.com/careers/77/
I could just hardcode this stuff in templates, but that's no DRY- you have to update the master template and the detail template every time.
What do you guys think? Maybe a YAML file? Or any better ideas?
Thx
|
Example when request.POST contain query string in django
| 2,961,413 | 39 | 14 | 21,210 | 0 |
python,django,post
|
If your request is post:
request.method == 'POST'
but the requested url contains a query string. e.g:
/your-url?param1=value-one
you can still take POST parameters through:
request.POST.get("my-field", None)
and query string parameters through:
request.GET.get("param1")
althrough, you pick up all parameters at once (POST and GET), through REQUEST:
request.REQUEST['param1'] # comes from query string
request.REQUEST['my-field'] # comes from request BODY (POST)
| 0 | 0 | 0 | 0 |
2010-06-02T20:22:00.000
| 1 | 1.2 | true | 2,961,317 | 0 | 0 | 1 | 1 |
Please post example code when request.POST contain query string in django, because i think my django version is bugged.
EDIT:
You simple can't, query string is always in GET, and this was my problem.
|
How to transition from PHP to Python Django?
| 2,961,525 | 1 | 4 | 3,852 | 0 |
php,python,django
|
No. You can only do a LOT better.
Awesome, popular. Supported by best hosters like Mediatemple.
No. You can just change 'mysql' to 'postgresql' or 'sqlite' in your settings.py.
NO! Python would never give you the right to mix up everything in one file and make the shittest shit in the world. Templates, static server.
Django is a Model-Template-View framework, great for any applications, from small to huge. PHP works fine only with small apps. Yeah, PHP == Personal Home Page, lol.
P.S. Also you can minify your CSS and JS. And compile to one single file (one js, one css). All with django-assets. And yeah, there's a lot more reusable Django apps (for registration, twi/facebook/openid auth, oembed, other stuff). Just search Bitbucket and Github for "django". No need to reinvent a bicycle, like you do with PHP.
| 0 | 0 | 0 | 0 |
2010-06-02T20:36:00.000
| 4 | 0.049958 | false | 2,961,402 | 0 | 0 | 1 | 2 |
Here's my background:
Decent experience with PHP/MySql.
Beginner's experience with OOP
Why I want to learn Python Django?
I gave in, based on many searches on SO and reading over some of the answers, Python is a great, clean, and structured language to learn. And with the framework Django, it's easier to write codes that are shorter than with PHP
Questions
Can i do everything in Django as in PHP?
Is Django a "big" hit in web development as PHP? I know Python is a
great general-purpose language but I'm
focused on web development and would
like to know how Django ranks in terms
of web development.
With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql?
In PHP, you can easily switch between HTML, CSS, PHP all in one script. Does Python offer this type of ease between other languages? Or how do I incorporate HTML, CSS, javascript along with Python?
|
How to transition from PHP to Python Django?
| 2,961,490 | 6 | 4 | 3,852 | 0 |
php,python,django
|
Can i do everything in Django as in PHP?
Always
Is Django a "big" hit in web development as PHP?
Only time will tell.
With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql?
Django supports several RDBMS interfaces. MySQL is popular, so is SQLite and Postgres.
In PHP, you can easily switch between HTML, CSS, PHP all in one script.
That doesn't really apply at all to Django.
Or how do I incorporate HTML, CSS, javascript along with Python?
Actually do the Django tutorial. You'll see how the presentation (via HTML created by templates) and the processing (via Python view functions) fit together. It's not like PHP.
| 0 | 0 | 0 | 0 |
2010-06-02T20:36:00.000
| 4 | 1.2 | true | 2,961,402 | 0 | 0 | 1 | 2 |
Here's my background:
Decent experience with PHP/MySql.
Beginner's experience with OOP
Why I want to learn Python Django?
I gave in, based on many searches on SO and reading over some of the answers, Python is a great, clean, and structured language to learn. And with the framework Django, it's easier to write codes that are shorter than with PHP
Questions
Can i do everything in Django as in PHP?
Is Django a "big" hit in web development as PHP? I know Python is a
great general-purpose language but I'm
focused on web development and would
like to know how Django ranks in terms
of web development.
With PHP, PHP and Mysql are VERY closely related, is there a close relation between Django and Mysql?
In PHP, you can easily switch between HTML, CSS, PHP all in one script. Does Python offer this type of ease between other languages? Or how do I incorporate HTML, CSS, javascript along with Python?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.