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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Django apps equivalent to Drupal's CCK and Views modules?
| 3,238,877 | 4 | 5 | 1,026 | 0 |
python,django,drupal,drupal-views,django-apps
|
Django is a framework, this had been said, but if you look for functionality close to CCK, PINAX makes for python/Django, the equivalent of modules in Drupal, sort of ready to go modules, login/pass check, listing, input output, or CRUDs ect. But in no ways radio buttons and check boxes action programming. You will have to put your building blocks together and indulge some python programming. I found myself spending more time loading extra modules and themes tweaking in Drupal, than putting together a full blown site in Django, maybe because, I own many libraries wrote several times and improved over time, for cases encountered over and over. I focus only on new or cutting edge things. Both approaches are ok as long as you know what you want to go. The hard fact is that for a CMS that want to attract non programmers peoples if you want to build great sites, you have to be good in php/mysql and a good grip on css, and it kind of defeats the purpose. In France we say, "the best tool is the one you use every day". If you are frustrated with Drupal, learn Django, and in the same time needed to master Drupal, you will have a skill to write your own Drupal and others CMS, maybe. Good luck in your endeavor.
| 0 | 0 | 0 | 0 |
2010-07-05T07:31:00.000
| 4 | 0.197375 | false | 3,177,772 | 0 | 0 | 1 | 3 |
Are there any Django apps equivalent to Drupal's Views and CCK modules?
I find Django much more flexible and logically organized than Drupal. But I think Drupal's Views and CCK modules are killer apps. They let the webmaster very rapidly to build new data models and queries through GUI without touching the code. These modules are very useful for rapid application development. Do you know any similar apps in Django?
|
Django apps equivalent to Drupal's CCK and Views modules?
| 26,184,850 | 1 | 5 | 1,026 | 0 |
python,django,drupal,drupal-views,django-apps
|
The lack of flexibility that you refer to is the price you pay for CCK and Views. I've used both Drupal and Django to complete major projects. You can use Drupal as a framework too, so in my opinion the two are absolutely comparable.
Django has a way better database abstraction than Drupal, follows more modern programming paradigms like OOP, MVC etc, is more flexible, and Python is just straight up superior to PHP.
...but I still usually use Drupal if either will do. It just gets the job done with less time spent, and works and performs well. Django has nothing like Views, and Drupal's form api is just light years ahead of Django's. Creating multi step ajax forms can be done without ever touching the markup or writing a single line of javascript in Drupal, and presenting dynamic lists to the user can be achieved without even leaving your browser.
Drupal has a much greater deployment rate than Django, not just because of PHP's popularity, but because it actually does some things really well.
My time is precious, and the end user doesn't give a damn as long as my system works.
| 0 | 0 | 0 | 0 |
2010-07-05T07:31:00.000
| 4 | 0.049958 | false | 3,177,772 | 0 | 0 | 1 | 3 |
Are there any Django apps equivalent to Drupal's Views and CCK modules?
I find Django much more flexible and logically organized than Drupal. But I think Drupal's Views and CCK modules are killer apps. They let the webmaster very rapidly to build new data models and queries through GUI without touching the code. These modules are very useful for rapid application development. Do you know any similar apps in Django?
|
Django Python Delete Project App Library
| 3,178,580 | 1 | 0 | 1,209 | 0 |
python,django
|
If you want to delete some python library go to /site-packages or /dist-packages, find this module(single file) or package(directory) or egg file (look at the extension) and delete this.
If you want to delete an app and you have it inside your project, simply delete app directory, remove it from settings and remove all references to objects from this app.
| 0 | 0 | 0 | 0 |
2010-07-05T09:05:00.000
| 1 | 1.2 | true | 3,178,259 | 0 | 0 | 1 | 1 |
If I want to delete a Django App or Project.
Is there a way to cleanly delete it?
Or a library in Python? How can I delete and re install libraries.
So I am SURE that nothing is left of that library.
|
how to parse a string to spider from another script
| 3,186,698 | 2 | 0 | 179 | 0 |
python,windows,web-crawler,scrapy
|
You can override the start_requests() method in your spider to get the starting requests (which, by default, are generated using the urls in the start_urls attribute).
| 0 | 0 | 1 | 0 |
2010-07-05T13:49:00.000
| 1 | 0.379949 | false | 3,179,979 | 0 | 0 | 1 | 1 |
I am new to python and scrapy .
I am running the scrapy-ctl.py from another python script using
subprocess module.But I want to parse the 'start url' to the spider from
this script itself.Is it possible to parse start_urls(which are
determined in the script from which scrapy-ctl is run) to the spider?
I will be greatful for any suggestions or ideas regarding this....:)
Thanking in advance....
|
Where do things go when I ‘print’ them from my Django app?
| 3,223,385 | 0 | 11 | 22,170 | 0 |
python,django
|
A warning: if you try to deploy code with print statements under WSGI, expect things to break. Use the logging module instead.
| 0 | 0 | 0 | 0 |
2010-07-05T21:42:00.000
| 5 | 0 | false | 3,182,298 | 0 | 0 | 1 | 1 |
I have a Django app on a Linux server. In one of the views, some form of print command is executed, and some string gets printed. How can I find out what the printed string was? Is there some log in which these things are kept?
|
Where to store field data and how to provide access to it?
| 3,183,465 | 1 | 1 | 91 | 0 |
python,design-patterns
|
It really depends on how you interact with the structures in question. Do you manipulate Form and Field objects prior to assigning them values? Do you need to frequently iterate over all the given Fields? Do you need Form once it's been submitted? Etc.
I'd suggest writing some/all of the code that uses Form and figure out how you want to interact with Form data, and what your ideal interface would look like.
| 0 | 0 | 0 | 0 |
2010-07-06T04:03:00.000
| 2 | 1.2 | true | 3,183,431 | 1 | 0 | 1 | 1 |
Forms have Fields, Fields have a value. However, they only get a value after the form has been submitted.
How should I store this value? Should I give every field a value attribute, field.value,
leave it as None prior to posting, and fill it in afterwords?
Omit it completely, and dynamically add it?
Store it on the form instead, like form.data['field'].
Create a a wrapper class FieldWithData to avoid any inconsistent states (if you have an object of this type, you know it has data) and allows me to set the data in the initializer rather than accessing attributes directly (although I guess this isn't so different from using a setter)
How should I provide access to the field data through the Form object? Options:
form.fields['name'].value (how it's presently being stored internally)
form.data['field'] (create a proxy "data" class that retrieves the real data off the field, or re-arrange the internals to actually store the data like this)
form.field.value - looks fairly nice, but then I'd have two references to the same field, one as form.field and one as form.fields['field'] which I need internally so that I can iterate over them
Too many design decisions. Driving me nuts. This is what sucks about solo'ing a project.
|
Get the key of logged-in user with no DB access in Django on Google App Engine?
| 3,192,350 | 1 | 1 | 64 | 0 |
python,django,google-app-engine
|
You probably are still going to hit the DB once to get the session record, which is where the user_id field is stored. Then you may need to side-step the lazy evaluation done in the django.contrib.auth.middleware code. It's not difficult, but you need to read the code and find exactly the info you want and then get at it without triggering any of the magic.
Oh, and if you want to mumble your way through the Session objects directly you will have to call session.get_decoded() to get a dict. The field you want (if it exists) is _auth_user_id.
| 0 | 1 | 0 | 0 |
2010-07-06T16:38:00.000
| 1 | 1.2 | true | 3,188,274 | 0 | 0 | 1 | 1 |
I'm using Django on GAE. When I say user = request.user, I believe it hits the datastore to fetch the User entity.
I would like to just get the key for the currently logged in user, because that will allow me to get the user-related data I need from the memcache.
|
Recommendation for python form validation library
| 3,219,559 | 0 | 38 | 21,514 | 0 |
python,validation,formencode,wtforms,toscawidgets
|
it depends on what underlying framework you use.
for django , built in form framework is best,
while kay uses extended version of zine's form system
and tipfy uses WTForms.
django's built in system is best so far .
what framework do you use under the hood ?
| 0 | 0 | 0 | 0 |
2010-07-07T07:36:00.000
| 5 | 0 | false | 3,192,747 | 0 | 0 | 1 | 1 |
I would like a form validation library that
1.separate html generation from form validation;
2.validation errors can be easily serialized, eg. dumped as a json object
What form validation library would you choose in a python web project?
|
uwsgi + django via Nginx - uwsgi settings/spawn?
| 28,769,075 | 0 | 6 | 3,116 | 0 |
python,django,nginx,wsgi,uwsgi
|
I will go with supervisord for managing the starting, stoping process.
| 0 | 1 | 0 | 0 |
2010-07-07T09:08:00.000
| 3 | 0 | false | 3,193,346 | 0 | 0 | 1 | 1 |
I am leaning towards uwsgi+nginx for my Django app, can anyone share the best method for starting up my uwsgi processes? Does anyone have experience tuning uwsgi?
|
Python framework for SOAP web services
| 3,195,467 | 0 | 0 | 1,428 | 0 |
python,soap
|
If library is not under active development, then there are two options: it was abandoned, it has no errors anymore.
Why are you looking something else? Did you test these two?
| 0 | 0 | 1 | 0 |
2010-07-07T13:55:00.000
| 3 | 0 | false | 3,195,437 | 0 | 0 | 1 | 1 |
I need an advice. What python framework I can use to develop a SOAP web service? I know about SOAPpy and ZSI but that libraries aren't under active development. Is there something better?
Thanks.
|
Python or Java? Whats better for mobile development, and GUI applications
| 3,198,745 | 2 | 0 | 5,062 | 0 |
java,python,user-interface,mobile
|
Java is certainly available on more platforms. I would pick a target platform (or set of targets) and see what language(s) would require the least number of redundant implementations.
Also, when you get to a certain level of complexity, the language often doesn't factor into speed. For initial prototypes, sure some languages are lightning fast to develop in, but by the time you've taken care of all the exception cases and tripled the entire schedule due to QA, you'll find that the prototype development speed wasn't all that big a deal.
Of course, depending on the complexity of your app, this may prove to be untrue--a small simple app can be delivered in near "prototype time".
| 0 | 0 | 0 | 1 |
2010-07-07T20:45:00.000
| 3 | 1.2 | true | 3,198,646 | 0 | 0 | 1 | 2 |
I know Python apps are faster to write, but it seems Java is the 800 lb gorilla for mobile and GUI development.
Are there any mobile platforms that run Python, or should I go the Java route?
|
Python or Java? Whats better for mobile development, and GUI applications
| 3,199,234 | 0 | 0 | 5,062 | 0 |
java,python,user-interface,mobile
|
The first question is whether you really need to develop an app, which requires per-platform work, vs a webapp.
If you really need an app, then you might likely need a separate language for each platform! For Android you'd want to use Java, and for iPhone/iPad you'd want to use Objective-C. A good argument for really trying to go the webapp route.
| 0 | 0 | 0 | 1 |
2010-07-07T20:45:00.000
| 3 | 0 | false | 3,198,646 | 0 | 0 | 1 | 2 |
I know Python apps are faster to write, but it seems Java is the 800 lb gorilla for mobile and GUI development.
Are there any mobile platforms that run Python, or should I go the Java route?
|
malformed start tag error - Python, BeautifulSoup, and Sipie - Ubuntu 10.04
| 3,198,945 | -2 | 9 | 7,977 | 0 |
python,beautifulsoup
|
Look at column 3 of line 100 in the "data" that is mentioned in File "/usr/bin/Sipie/Sipie/Factory.py", line 298
| 0 | 1 | 0 | 0 |
2010-07-07T21:13:00.000
| 5 | -0.07983 | false | 3,198,874 | 0 | 0 | 1 | 1 |
I just installed python, mplayer, beautifulsoup and sipie to run Sirius on my Ubuntu 10.04 machine. I followed some docs that seem straightforward, but am encountering some issues. I'm not that familiar with Python, so this may be out of my league.
I was able to get everything installed, but then running sipie gives this:
/usr/bin/Sipie/Sipie/Config.py:12: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5
Traceback (most recent call last):
File "/usr/bin/Sipie/sipie.py", line 22, in <module>
Sipie.cliPlayer()
File "/usr/bin/Sipie/Sipie/cliPlayer.py", line 74, in cliPlayer
completer = Completer(sipie.getStreams())
File "/usr/bin/Sipie/Sipie/Factory.py", line 374, in getStreams
streams = self.tryGetStreams()
File "/usr/bin/Sipie/Sipie/Factory.py", line 298, in tryGetStreams
soup = BeautifulSoup(data)
File "/usr/local/lib/python2.6/dist-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py", line 1499, in __init__
BeautifulStoneSoup.__init__(self, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py", line 1230, in __init__
self._feed(isHTML=isHTML)
File "/usr/local/lib/python2.6/dist-packages/BeautifulSoup-3.1.0.1-py2.6.egg/BeautifulSoup.py", line 1263, in _feed
self.builder.feed(markup)
File "/usr/lib/python2.6/HTMLParser.py", line 108, in feed
self.goahead(0)
File "/usr/lib/python2.6/HTMLParser.py", line 148, in goahead
k = self.parse_starttag(i)
File "/usr/lib/python2.6/HTMLParser.py", line 226, in parse_starttag
endpos = self.check_for_whole_start_tag(i)
File "/usr/lib/python2.6/HTMLParser.py", line 301, in check_for_whole_start_tag
self.error("malformed start tag")
File "/usr/lib/python2.6/HTMLParser.py", line 115, in error
raise HTMLParseError(message, self.getpos())
HTMLParser.HTMLParseError: malformed start tag, at line 100, column 3
I looked through these files and the line numbers, but since I am unfamiliar with Python, it doesn't make much sense. Any advice on what to do next?
|
pydev and twisted framework
| 3,199,728 | 12 | 5 | 1,684 | 0 |
python,eclipse,twisted,pydev
|
go to preferences->Pydev->Interpreter - Python and hit the apply button. That will rescan your modules directory and add any missing modules.
That should fix any normal import errors. Some modules do some runtime magic that PyDev cant follow.
| 0 | 1 | 0 | 0 |
2010-07-07T23:40:00.000
| 1 | 1.2 | true | 3,199,702 | 0 | 0 | 1 | 1 |
It seems like my Eclipse PyDev does not recognize that Twisted is installed on my system. I can't make auto suggest working. Does anyone know how to solve it?
|
Threaded SOAP requests in Python (Django) application?
| 3,200,013 | 1 | 1 | 619 | 0 |
python,django,soap,multithreading,asynchronous
|
That sounds great! You almost always want to do long running stuff in a background thread, and many soap requests spend a lot of time waiting on network IO...
The only question is how do you get the data back to the user. Is this a GUI app, or a web app, or what?
| 0 | 0 | 0 | 0 |
2010-07-08T00:59:00.000
| 2 | 1.2 | true | 3,200,004 | 0 | 0 | 1 | 2 |
I'm working with an application that needs to be make some time consuming SOAP requests (using suds, as it were). There are several instances where a user will change the state of an object and in doing so trigger one or more SOAP requests that fetch some data. This could be done in the background, and right now the user has to wait while these finish.
Is this a reasonable use case for Python threads? Or is that just asking for trouble? Better suggestions?
|
Threaded SOAP requests in Python (Django) application?
| 3,200,022 | 0 | 1 | 619 | 0 |
python,django,soap,multithreading,asynchronous
|
I use the producer consumer model with a RPCXML server for just this sort of thing. I start a pool of 3 threads, when someone requests something done (add file, etc) I add the work to the queue and return a key. an ajax request can check on the status of the key to set a progress bar, etc.
| 0 | 0 | 0 | 0 |
2010-07-08T00:59:00.000
| 2 | 0 | false | 3,200,004 | 0 | 0 | 1 | 2 |
I'm working with an application that needs to be make some time consuming SOAP requests (using suds, as it were). There are several instances where a user will change the state of an object and in doing so trigger one or more SOAP requests that fetch some data. This could be done in the background, and right now the user has to wait while these finish.
Is this a reasonable use case for Python threads? Or is that just asking for trouble? Better suggestions?
|
HTTP based authentication/encryption protocol in a custom system
| 3,205,573 | 1 | 1 | 1,123 | 0 |
python,security,authentication,encryption,cryptography
|
I don't think RegistrationKey adds any real security.
It needs more nonces (against replay attacks).
It needs more padding (or else the messages are small and thus easy to decrypt).
An algorithm can be proven to be secure, you may want to do this.
Most flaws in crypto are in the implementation, not in the algorithm (timing attacks, for example).
| 0 | 0 | 0 | 0 |
2010-07-08T15:38:00.000
| 3 | 0.066568 | false | 3,205,349 | 0 | 0 | 1 | 1 |
We have a custom built program that needs authenticated/encrypted communication between a client and a server[both in Python].
We are doing an overhaul from custom written Diffie-Hellman+AES to RSA+AES in a non-orthodox way. So I would be very interested in comments about my idea.
Prequisites: Klient has a 128bit RegistrationKey which needs to remain a secret during the authentication - this key is also the only shared secret between the server and client.
Client contacts the server over an insecure channel and asks the servers RSA PubKey
Client then queries the server:
[pseudocode follows]
RegistrationKey = "1dbe665ac7a944beb67f106f779e890b"
clientname = "foobar"
randomkey = random(bits=128)
rsa_cp = RSA(key=pubkey, data=randomkey+clientname)
aes_cp = AES(key=RegistrationKey, data=RegistrationKey+rsa_cp)
send(aes_cp)
3. Server then responds:
[pseudocode follows]
# Server decrypts the data and sees if it has a valid RegistrationKey, if it does...
clientuuid = random(bits=128)
sharedkey = random(bits=128)
rsa_cp = RSA(key=privkey, data=clientuuid+sharedkey)
aes_cp = AES(key=randomkey[got from client], data= rsa_cp)
send(aes_cp)
Now both sides know the "clientuuid", "sharedkey" which the client can use later to authenticate itself. The method above should be secure even when the attacker learns the regkey later since he would have to crack the RSA key AND man-in-the-middle attacks(on RSA) should stop the auth. from completing correctly.
The only possible attack method I see would be the case where the attacker knows the regkey AND can alter the traffic during the authentication. Am i correct?
I really want to hear your ides on what to add/remove from this method and If you know a much better way to do this kind of exchange.
PS! We are currently using Diffie-Hellman(my own lib, so it probably has flaws) and we have tried TLSv1.2 with PreSharedKeys(didn't work for some reason) and we are CONSTRICTED to http protocols since we need to do this in django. And because we are doing this in http we try to keep the request/answer count as low as possible(no sessions would be the best) - 1 would be the best :)
If you have any questions about the specifics, please ask.
So, you crypto/security geeks, please give me a helping hand :)
|
Reference ID in GAE
| 3,207,714 | 3 | 2 | 105 | 0 |
python,google-app-engine,google-cloud-datastore
|
I can reference it through record.key().id(). I just found this RIGHT AFTER I posted this question (as luck would have it). Sorry for wasting anybody's time.
| 0 | 1 | 0 | 0 |
2010-07-08T20:24:00.000
| 2 | 1.2 | true | 3,207,671 | 0 | 0 | 1 | 2 |
I have a feeling the answer is simple and documented, but I'm absolutely missing it:
Is there a way, using Python and webapp through Google App Engine, to pass the id field of a record to the template? I'm fairly new to the app engine, and yes, I have searched all around the Google Documentation to find this.
|
Reference ID in GAE
| 3,209,539 | 1 | 2 | 105 | 0 |
python,google-app-engine,google-cloud-datastore
|
Assuming you're using the built-in Django 0.96 templates, you can access the ID (assuming the entity has one; it might have a key name instead if you saved it with one) with {{entity.key.id}}.
| 0 | 1 | 0 | 0 |
2010-07-08T20:24:00.000
| 2 | 0.099668 | false | 3,207,671 | 0 | 0 | 1 | 2 |
I have a feeling the answer is simple and documented, but I'm absolutely missing it:
Is there a way, using Python and webapp through Google App Engine, to pass the id field of a record to the template? I'm fairly new to the app engine, and yes, I have searched all around the Google Documentation to find this.
|
Google application engine Datastore - any alternatives to aggregate functions and group by?
| 3,211,471 | 1 | 0 | 322 | 1 |
python,google-app-engine
|
The best way is to populate the summaries (aggregates) at the time of write. This way your reads will be faster, since they just read - at the cost of writes which will have to update the summaries if its likely to be effected by the write.
Hopefully you will be reading more often than writing/updating summaries.
| 0 | 1 | 0 | 0 |
2010-07-09T07:21:00.000
| 1 | 1.2 | true | 3,210,577 | 0 | 0 | 1 | 1 |
As is mentioned in the doc for google app engine, it does not support group by and other aggregation functions. Is there any alternatives to implement the same functionality?
I am working on a project where I need it on urgent basis, being a large database its not efficient to iterate the result set and then perform the logic.
Please suggest.
Thanks in advance.
|
Many-to-many relationships in Google AppEngine - efficient?
| 3,213,988 | 0 | 1 | 280 | 1 |
python,google-app-engine,performance,many-to-many
|
I don't think there's a hard and fast answer to questions like this. "Is this optimization worth it" always depends on many variables such as, is the lack of optimization actually a problem to start with? How much of a problem is it? What's the cost in terms of extra time and effort and risk of bugs of a more complex optimized implementation, relative to the benefits? What might be the extra costs of implementing the optimization later, such as data migration to a new schema?
| 0 | 1 | 0 | 0 |
2010-07-09T08:21:00.000
| 1 | 1.2 | true | 3,210,994 | 0 | 0 | 1 | 1 |
I'm using Google Appengine to store a list of favorites, linking a Facebook UserID to one or more IDs from Bing. I need function calls returning the number of users who have favorited an item, and the number of times an item has been favorited (and by whom).
My question is, should I resolve this relationship into two tables for efficiency? If I have a table with columns for Facebook ID and Bing ID, I can easily use select queries for both of the functions above, however this will require that each row is searched in each query. The alternative is having two tables, one for each Facebook user's favorites and the other for each Bing item's favorited users, and using transactions to keep them in sync. The two tables option has the advantage of being able to use JSON or CSV in the database so that only one row needs to be fetched, and little manipulation needs to be done for an API.
Which option is better, in terms of efficiency and minimising cost?
Thanks,
Matt
|
How should I share and store data in a small multithreaded python application?
| 3,211,387 | 0 | 1 | 178 | 0 |
python,multithreading,concurrency,datastore
|
What you're seeking isn't too Python specific, because AFAIU you want to communicate between two different processes, which are only incidentally written in Python. If this indeed is your problem, you should look for a general solution, not a Python-specific one.
I think that a simple No-SQL key-value datastore such as Redis, for example, could be a very nice solution for your situation. Contrary to "complicated" using a tool designed specifically for such a purpose will actually make your code simpler.
If you insist on a Python-only solution, then consider using the Python bindings for SQLite which come pre-installed with Python. An SQLite DB can be concurrently used by two processes in a safe manner, as long as your semantics of data access are well defined (i.e. problems you have to solve anyway, the tool nonwithstanding).
| 0 | 1 | 0 | 0 |
2010-07-09T09:27:00.000
| 1 | 1.2 | true | 3,211,379 | 1 | 0 | 1 | 1 |
I'm writing a small multithreaded client-side python application that contains a small webserver (only serves page to the localhost) and a daemon. The webserver loads and puts data into a persistent "datastore", and the daemon processes this data, modifies it and adds some more. It should also takes care of the synchronization with the disk.
I'd like to avoid complicated external things like SQL or other databases as much as possible.
What are good and simple ways to design the datastore? Bonus points if your solution uses only standard python.
|
RestrictedPython on Google AppEngine (GAE)
| 5,072,453 | 1 | 2 | 336 | 0 |
python,google-app-engine
|
Note that even if you could get access to the ast modules on GAE, RestrictedPython might still not be the right solution for your use-case. It's only aimed at securing input from less trusted users, where you don't trust their ability to code. You still need to trust and know them.
There's various ways in which a malicious user can cause large resource usage or infinite recursions - so don't use it to protect against anonymous users.
| 0 | 1 | 0 | 0 |
2010-07-09T10:25:00.000
| 1 | 0.197375 | false | 3,211,723 | 0 | 0 | 1 | 1 |
I'm looking for a way to execute user submitted python code in GAE in a secure fashion (much stricter then the GAE sandbox).
RestrictedPython would certainly fit the shoe, being used in Zope for the exakt same purpose.
But RestrictedPython relies on modifying the AST (abstract syntax tree) which means loading modules from the compiler (I get as far as loading the parser module before the SDK complains).
Has anyone else done any work with this for Google App Engine?
|
Django: ImportError: No module named ?z?
| 3,213,320 | 1 | 0 | 1,341 | 0 |
python,django,importerror,uwsgi
|
Seems like you have missed a comma in the settings.INSTALLED_APPS, after the app name. Go, check!
| 0 | 0 | 0 | 0 |
2010-07-09T12:08:00.000
| 1 | 0.197375 | false | 3,212,396 | 0 | 0 | 1 | 1 |
Hi I am trying to deploy a django app with uwsgi. I keep getting Import Errors that look like this:
ImportError: No module named ?z?
-or-
ImportError: No module named ?j?
-or-
ImportError: No module named `?6
So basically the output of the module seems like gibberish and I am unable to figure out the problem. Does anybody have an idea what the problem could be?
|
Interact with Flash using Python Mechanize
| 3,849,851 | 0 | 2 | 1,702 | 0 |
python,flash,forms,mechanize,code-injection
|
Nice question but seems unfortunately mechanize can't be used for flash objects
| 0 | 0 | 0 | 1 |
2010-07-09T17:26:00.000
| 2 | 0 | false | 3,215,062 | 0 | 0 | 1 | 1 |
I am trying to create an automated program in Python that deals with Flash. Right now I am using Python Mechanize, which is great for filling forms, but when it comes to flash I don't know what to do. Does anyone know how I can interact with flash forms (set and get variables, click buttons, etc.) via Python mechanize or some other python library?
|
Using other languages with ruby
| 3,218,192 | 2 | 2 | 1,299 | 0 |
python,ruby-on-rails,ruby
|
Depending on your exact needs, you can either call out to an external process (using popen, system, etc) or you can setup another mini-web-server or something along those lines and have the rails server communicate with it over HTTP with a REST-style API (or whatever best suits your needs).
In your example, you have a ruby frontend website and then a number-crunching python backend service that builds up recommendation data for the ruby site. A fairly nice solution is to have the ruby site send a HTTP request to the python service when it needs data updating (with a payload of information to identify what it needs doing to what or some such) and then the python backend service can crunch away and update the table which presumably your ruby frontend will automatically pick up the changes of during the next request and display.
| 0 | 0 | 0 | 0 |
2010-07-09T18:21:00.000
| 4 | 0.099668 | false | 3,215,455 | 0 | 0 | 1 | 3 |
Is it possible to use multiple languages along side with ruby. For example, I have my application code in Ruby on Rails. I would like to calculate the recommendations and I would like to use python for that. So essentially, python code would get the data and calculate all the stuff and probably get the data from DB, calculate and update the tables.Is it possible and what do you guys think about its adv/disadv
Thanks
|
Using other languages with ruby
| 3,218,487 | 0 | 2 | 1,299 | 0 |
python,ruby-on-rails,ruby
|
An easy, quick 'n' dirty solution in case you have python scripts and you want to execute them from inside rails, is this:
%x[shell commands or python path/of/pythonscript.py #{ruby variables to pass on the script}]
or
``shell commands or python path/of/pythonscript.py #{ruby variables to pass on the script}\ (with ` symbol in the beginning and the end).
Put the above inside a controller and it will execute.
For some reason, inside ruby on rails, system and exec commands didn't work for me (exec crashed my application and system doesn't do anything).
| 0 | 0 | 0 | 0 |
2010-07-09T18:21:00.000
| 4 | 0 | false | 3,215,455 | 0 | 0 | 1 | 3 |
Is it possible to use multiple languages along side with ruby. For example, I have my application code in Ruby on Rails. I would like to calculate the recommendations and I would like to use python for that. So essentially, python code would get the data and calculate all the stuff and probably get the data from DB, calculate and update the tables.Is it possible and what do you guys think about its adv/disadv
Thanks
|
Using other languages with ruby
| 3,215,496 | 4 | 2 | 1,299 | 0 |
python,ruby-on-rails,ruby
|
If you are offloading work to an exterior process, you may want to make this a webservice (ajax, perhaps) of some sort so that you have some sort of consistent interface.
Otherwise, you could always execute the python script in a subshell through ruby, using stdin/stdout/argv, but this can get ugly quick.
| 0 | 0 | 0 | 0 |
2010-07-09T18:21:00.000
| 4 | 0.197375 | false | 3,215,455 | 0 | 0 | 1 | 3 |
Is it possible to use multiple languages along side with ruby. For example, I have my application code in Ruby on Rails. I would like to calculate the recommendations and I would like to use python for that. So essentially, python code would get the data and calculate all the stuff and probably get the data from DB, calculate and update the tables.Is it possible and what do you guys think about its adv/disadv
Thanks
|
How do I install an old version of Django on virtualenv?
| 66,091,958 | 2 | 96 | 80,239 | 0 |
python,django,setuptools,virtualenv
|
pip install "django>=2.2,<3"
To install djnago 2.2
| 0 | 0 | 0 | 0 |
2010-07-10T17:55:00.000
| 5 | 0.07983 | false | 3,220,280 | 1 | 0 | 1 | 1 |
I want to install some specific version of a package (in this case Django) inside the virtual environment. I can't figure it out.
I'm on Windows XP, and I created the virtual environment successfully, and I'm able to run it, but how am I supposed to install the Django version I want into it? I mean, I know to use the newly-created easy_install script, but how do I make it install Django 1.0.7? If I do easy_install django, it will install the latest version. I tried putting the version number 1.0.7 into this command in various ways, but nothing worked.
How do I do this?
|
General guidelines for developing a web application
| 3,222,720 | 3 | 3 | 404 | 0 |
python,database,dom
|
Is there anything missing to my general approach for developing a web app? (Server-side scripting interacts with database to produce dynamic HTML which is then manipulated client-side via. the DOM/client-side scripting).
No - that's the usual setup. Actually, client-side scripting is quite often missing, and web-page is completely refreshed on any interaction. Your description is perfectly fine.
I chose PHP because it is commonly associated with web development. What are the alternatives? As a beginner I would like to know the "best" server-side language to learn (and I am up for a challenge), or at least be aware of the alternatives.
This is a debatable topic, subject to different tastes, thus usually more suited to community wiki; besides, there's bunch of such questions already.
Very quickly, PHP is most common because it is the easiest to configure, but it has bunch of cruft. Perl is old-school, and rather unreadable. Python and Ruby are currently the hottest, owing to amazing dynamic frameworks (CherryPy and Django vs. Sinatra and Rails), but the rivalry is strong, and everyone has picked a side. I'll tell you Ruby is nicer to work with, but someone else will say the same for Python. However, configuring them is a bit more difficult (i.e. not usually standard option on majority of hosting providers).
As far as client-side goes it seems that JavaScript is IT. Is it?
That's it, if you're talking about HTML. The alternatives died off.
I've heard alot about AJAX but know little to nothing at all about it. Is it an alternative to generating HTML server-side via. a database? What is it/advantages/disadvantages.
AJAX is a fancy name for making a HTTP request from JavaScript without reloading the page. The requested content can be executable JS, or parsable XML, or ready-to-insert HTML... and it is the only method to get some data client-side without refreshing the whole page.
I've read that frames are being deprecated. Should I move away from frames and more towards DOM manipulation?
An emphatic yes. However, iframes have their (limited) uses. You most likely do not need them.
If this application is to be available over the internet I will need to setup a login system of some sort. What are common ways of setting up authentication using hosted or private services?
Username + encrypted password in database, when user enters username + password, encrypt password and check both against the database. If successful, record username in session.
Another way is OpenID, but it requires a third-party OpenID provider.
(Getting a little off topic) Any free hosting suggestions? I'm a student, and hosting the server myself would be unreliable for my friend.
Not too knowledgeable. I know about comyr (general purpose) and heroku (Ruby), both free for non-commercial use, AFAICR, but a bit of research can get you more.
I would really love to implement as much of this project via. Python as possible. What can Python do in terms of programming for the browser and what would it require?
It can do everything in terms of server-side programming, just like any other Turing-complete language. It can do it pretty easily, being a dynamic language with lots of nice libraries targeted for web development. It will not do anything at all for the browser, though. Check out CherryPy for lightweight, and Django for heavyweight web app framework.
But I thought you chose PHP?...
| 0 | 0 | 0 | 0 |
2010-07-11T10:15:00.000
| 3 | 1.2 | true | 3,222,654 | 0 | 0 | 1 | 2 |
As a programmer used to developing native applications, I'm expanding my horizons and developing my first web app. I'm intermediate to expert with Linux and C, intermediate with Python and HTML and beginner to intermediate with MySQL and Java.
I'm developing a web app that is more or less a resource allocator for a friend of mine. To put it simply, I want this program to help him manage jobs, assigning technicians and equipment. The main screen will be an embedded Google Calendar frame that can be updated dynamically via. their API.
Now, certain jobs require technicians to hold certain certificates, and equipment must be calibrated on a specific schedule. I would also like to track extra data, such as phone numbers, e-mail addresses, job information, etc. To top it all off, I want it to look nice!
I've spent quite some time familiarizing myself with PHP, JavaScript and the DOM and I've developed some functionality and a neat UI.
So far I've been coding server-side w/ PHP to deliver dynamic HTML via. MySQL and then JavaScript to manipulate the DOM. I have tables for technicians, certificates, jobs, phone numbers, etc.
My questions are:
Is there anything missing to my general approach for developing a web app? (Server-side scripting interacts with database to produce dynamic HTML which is then manipulated client-side via. the DOM/client-side scripting).
I chose PHP because it is commonly associated with web development. What are the alternatives? As a beginner I would like to know the "best" server-side language to learn (and I am up for a challenge), or at least be aware of the alternatives.
As far as client-side goes it seems that JavaScript is IT. Is it?
I've heard alot about AJAX but know little to nothing at all about it. Is it an alternative to generating HTML server-side via. a database? What is it/advantages/disadvantages.
I've read that frames are being deprecated. Should I move away from frames and more towards DOM manipulation?
If this application is to be available over the internet I will need to setup a login system of some sort. What are common ways of setting up authentication using hosted or private services?
(Getting a little off topic) Any free hosting suggestions? I'm a student, and hosting the server myself would be unreliable for my friend.
I would really love to implement as much of this project via. Python as possible. What can Python do in terms of programming for the browser and what would it require?
|
General guidelines for developing a web application
| 3,222,758 | 1 | 3 | 404 | 0 |
python,database,dom
|
I'd like to suggest ditching PHP as soon as possible. Searching 'php wtf' here should be illuminating. While it is possible to write secure, safe, reliable applications in PHP, I think it is despite the best efforts of the PHP team to make The Most Exciting And Surprisin Language EVAR. With lots of funny side-effects. And pretend-security-options. If most of what PHP looks like is appealing to you, I think I'd suggest using Perl instead. It should be much less surprising.
So, with my rant against PHP out of the way, you have a LOT of much better options. Python has Django, Zope, and Twisted Matrix. They each solve different problems, allowing you to write applications at different levels: Django imposes some Model-View-Controller structure on your code, Zope is a much larger CMS framework, and Twisted Matrix provides a lot of super-keen programming primitives if you want to write things pretty close to the wire. (You're something like five lines of code away from a very-simple-yet-neat web server with Twisted that runs your application code..)
If you really want to learn another language in the process, Ruby on Rails is getting a lot of the hype, and for mostly good reasons. I've really enjoyed coding Ruby on Rails, the imposed structure is fantastic for anything beyond trivial applications, and it mostly gets out of your way with reasonable assumptions.
Perl is 'the old standby'. I'd take it over PHP any day, but I can't stand Perl's OO or modules system. So it's hard for me to really endorse it.
I'd like to suggest against Flash and Silverlight on the client-side: First, Flash is a giant resource hog and security disaster, and Silverlight, while probably better than Flash on both fronts, is even less portable than Flash. (I strongly recommend trying your site on a handful of mobile browsers; it doesn't have to look pretty, but everything ought to work. :)
| 0 | 0 | 0 | 0 |
2010-07-11T10:15:00.000
| 3 | 0.066568 | false | 3,222,654 | 0 | 0 | 1 | 2 |
As a programmer used to developing native applications, I'm expanding my horizons and developing my first web app. I'm intermediate to expert with Linux and C, intermediate with Python and HTML and beginner to intermediate with MySQL and Java.
I'm developing a web app that is more or less a resource allocator for a friend of mine. To put it simply, I want this program to help him manage jobs, assigning technicians and equipment. The main screen will be an embedded Google Calendar frame that can be updated dynamically via. their API.
Now, certain jobs require technicians to hold certain certificates, and equipment must be calibrated on a specific schedule. I would also like to track extra data, such as phone numbers, e-mail addresses, job information, etc. To top it all off, I want it to look nice!
I've spent quite some time familiarizing myself with PHP, JavaScript and the DOM and I've developed some functionality and a neat UI.
So far I've been coding server-side w/ PHP to deliver dynamic HTML via. MySQL and then JavaScript to manipulate the DOM. I have tables for technicians, certificates, jobs, phone numbers, etc.
My questions are:
Is there anything missing to my general approach for developing a web app? (Server-side scripting interacts with database to produce dynamic HTML which is then manipulated client-side via. the DOM/client-side scripting).
I chose PHP because it is commonly associated with web development. What are the alternatives? As a beginner I would like to know the "best" server-side language to learn (and I am up for a challenge), or at least be aware of the alternatives.
As far as client-side goes it seems that JavaScript is IT. Is it?
I've heard alot about AJAX but know little to nothing at all about it. Is it an alternative to generating HTML server-side via. a database? What is it/advantages/disadvantages.
I've read that frames are being deprecated. Should I move away from frames and more towards DOM manipulation?
If this application is to be available over the internet I will need to setup a login system of some sort. What are common ways of setting up authentication using hosted or private services?
(Getting a little off topic) Any free hosting suggestions? I'm a student, and hosting the server myself would be unreliable for my friend.
I would really love to implement as much of this project via. Python as possible. What can Python do in terms of programming for the browser and what would it require?
|
Which web technology to learn for an experienced C++ developer?
| 3,223,599 | 0 | 5 | 1,073 | 0 |
php,python,jsp
|
I expect this question to be closed as being subjective. But, I'll put in my 2 cents.
JSP would likely dovetail well with J2EE. (I've heard that it can be a bit rigid, but I have no experience to provide any insight on the matter.)
PHP is a good candidate, because it's popular. You can find a lot of info on the web.
Python isn't as popular for webdev, so finding examples won't be as easy.
I also second Dave Markle's opinion. If you want to learn webdev, HTML, CSS and JavaScript will be crucial as well. You may never want to be a front-end developer, but you can't get away from dealing with those technologies at some point.
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 0 | false | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
Which web technology to learn for an experienced C++ developer?
| 3,225,166 | 1 | 5 | 1,073 | 0 |
php,python,jsp
|
Hit's per day isn't a really useful metric for estimating performance. You really need to be concerned with the peak load and the acceptable response time.
80-100k hits per day is an average of about 1 hit per second. The hits are not going to be evenly spread out, so for normal traffic you might expect a peak load of 10 hits per second.
If you are going to promote the site with newsletters or commercials, expect to peack at 100's of hits per second.
If you selling $1 air tickets, expect to peak at 1000's of hits per second.
Now the language you choose for the site isn't nearly as important as your choice of database (not necessarily relational) and the way you store the data in the database.
Scaling up frontends is relatively easy, so having really fast efficient HTML generation shouldn't be a primary concern. Pick a platform that is going to be efficient for development time.
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 0.028564 | false | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
Which web technology to learn for an experienced C++ developer?
| 3,223,588 | 1 | 5 | 1,073 | 0 |
php,python,jsp
|
Considering you're used to c++, should look at aspx and c# - probably closer to your current experience.
That said, PHP is a doddle, so it shouldn't present any challenges. Bear in mind that if you want to get the most from the language, you absolutely have to learn a little bit about configuring apache, and frameworks (cake, codeigniter, zend etc).
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 0.028564 | false | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
Which web technology to learn for an experienced C++ developer?
| 3,223,581 | 13 | 5 | 1,073 | 0 |
php,python,jsp
|
Before learning either of these, spend some real time and learn HTML and CSS in depth. Also learn Javascript and JQuery (or your favorite client side library). The O'Reilly books on the topic are pretty much all good IMO.
I say that because I think that you'll find that for most modern web sites, a lot of richness is moving to the client side, and away from the server side. Under this model, your code in PHP or JSP is probably going to look pretty similar (ie, fetch data from the database and serve it to your view or into JSON for the client to consume).
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 1.2 | true | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
Which web technology to learn for an experienced C++ developer?
| 3,223,646 | 0 | 5 | 1,073 | 0 |
php,python,jsp
|
There are many options.
Since you already know (and is learning about) Java, one option is to use GWT for both server and client. This can help you in that you do not need to learn another language (JS/HTML/Python/PHP etc). If your portal is going to be big, using Java can help you organise the application better - usually JS/HTML based applications are not very suitable for proper organisation, even if you use good JS Libraries like jQuery or YUI. Having a good organisation can help a lot - during updation and modification later.
If your planned venture is a single/two person venture or if it is time bound - where time to market is everything - then I would not suggest the earlier approach - especially if your server side part is expected to be big.
Java is a slow language to write code in. A project which you will take say 6 months to write in Python will take you close to 1 year + in Java. In such a scneario, I would prefer Python - it is a proper language - unlike PHP, and you create code with good organisation there too - albeit a little less organised than using Java.
Please note that if your client side code is much more complex than your server side code, then going with GWT will do you no harm. But if your server side code is very complex compared to the client side, then I would suggest Python.
Another point is to use existing Web Frameworks to ease your work. For Python, Django is an excellent choice. This itself will decrease your work time by 50% or more, while making your code much more secure and scalable.
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 0 | false | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
Which web technology to learn for an experienced C++ developer?
| 3,224,044 | 0 | 5 | 1,073 | 0 |
php,python,jsp
|
It really isn't that similar to C++, but I would recommend PHP. You really can't expect a server-side scripting language to be similar to a compiled language like C++. Personally, I find PHP to be an ugly, messy looking language, but once you get into it, it's very rewarding. Other languages have too many drawbacks. ASP.Net is too Microsoft-centric, Python and Ruby on Rails are too obscure, and are also non-curly bracket languages, meaning it will require a lot of adjustment to change to them. Hope this helps.
| 0 | 0 | 0 | 1 |
2010-07-11T15:28:00.000
| 7 | 0 | false | 3,223,557 | 0 | 0 | 1 | 6 |
Friends,
I've got some exp in c++ and now kind of starting my way to J2EE (to survive:))). Meanwhile, I've got a plan to venture in to a web portal my own. But with very little experience in web technology, I'd need to start from scratch. I'm little confused on which way to go and I'm here.
PHP, Python or JSP, considering the fact that, anyway I've got to learn J2EE at my work.
Would that be worth to learn PHP or Python to develop a portal which I expect to get 80-100K
hits per day "IF" everything goes well OR jsp would be sufficient?
Many thanks
|
GAE: Best way to determine how many of a Kind is stored?
| 3,225,411 | 1 | 5 | 121 | 0 |
python,google-app-engine
|
Keep a counter object for your application stored in the database, and update it whenever you create and delete objects.
| 0 | 0 | 0 | 0 |
2010-07-12T01:45:00.000
| 4 | 0.049958 | false | 3,225,397 | 0 | 0 | 1 | 2 |
What is the best way to determine how many models of a certain kind are in my app's datastore? The documentation says that MyKind.all().count() is only marginally better than retrieving all of the data, and has a limit of 1000. This is not helpful, because I am expecting to have 6000+ instances of MyKind stored.
Is there a better way to do this? What if I just get the keys, and count those?
I'm using Python.
|
GAE: Best way to determine how many of a Kind is stored?
| 3,225,480 | 3 | 5 | 121 | 0 |
python,google-app-engine
|
If you do keys-only it should be pretty fast, since this only has to read the index and doesn't actually fetch any entities. Use a cursor and loop until count() returns less than 1000.
| 0 | 0 | 0 | 0 |
2010-07-12T01:45:00.000
| 4 | 0.148885 | false | 3,225,397 | 0 | 0 | 1 | 2 |
What is the best way to determine how many models of a certain kind are in my app's datastore? The documentation says that MyKind.all().count() is only marginally better than retrieving all of the data, and has a limit of 1000. This is not helpful, because I am expecting to have 6000+ instances of MyKind stored.
Is there a better way to do this? What if I just get the keys, and count those?
I'm using Python.
|
Should I place custom registration code in Views, Models or Managers?
| 3,229,364 | 0 | 0 | 152 | 0 |
python,django,django-authentication,django-contrib
|
My recommendation is to not re-solve a problem that django-registration solves quite nicely. It has a pluggable backend system that lets you customize it as much or as little as needed.
| 0 | 0 | 0 | 0 |
2010-07-12T07:22:00.000
| 2 | 0 | false | 3,226,529 | 0 | 0 | 1 | 1 |
I'm rolling my own custom registration module in Django based on django.contrib.auth. My registration module will have some extra functionality and help me reduce my dependency on other django modules that I'm currently using like django-registration and django-emailchange. I've run into a what-the-best-way-to-do-it problem here.
Note: All the user accounts are based on django.contrib.auth.models.User model.
When the user clicks the "sign-up" link, the request gets passed to my view named register. I have a custom form which has four fields — username, email, password1 and password2. The form is based on django.forms.Form. The form provides basic validation e.g. passoword1 and password2 are the email; the email/username do not exist.
When the data gets POSTed back to my register view, I call the is_valid() method of the form, after which, I create a new user by calling a Manager method called create_user() in django.contrib.auth.models.UserManager. I need to add more custom functionality at this point like sending activation emails, etc. As a best-practice method, where should this logic be? Should this be in a method of the User Model? Should it be where it is currently - the Manager of the Model? Or should this be placed into a custom save() method of my sign-up Form?
Thanks.
|
Django CMS logo change
| 57,008,799 | 0 | 4 | 3,098 | 0 |
python,django,django-cms
|
It's located inside the djangocms_admin_style module, the path is djangocms_admin_style/static/djanogcms_admin_style/img/django-cms-logo.png. It's better to clone it, customize it and then simply add it to your project under the
INSTALLED_APPS=[].
| 0 | 0 | 0 | 0 |
2010-07-12T11:48:00.000
| 4 | 0 | false | 3,228,212 | 0 | 0 | 1 | 3 |
Is there a way to change the Django CMS logo, for my own company logo?
|
Django CMS logo change
| 3,230,427 | 2 | 4 | 3,098 | 0 |
python,django,django-cms
|
Replace /media/cms/images/cms_toolbar.png
Or edit the #cms_toolbar definition in the media/cms/css/toolbar.css stylesheet.
| 0 | 0 | 0 | 0 |
2010-07-12T11:48:00.000
| 4 | 1.2 | true | 3,228,212 | 0 | 0 | 1 | 3 |
Is there a way to change the Django CMS logo, for my own company logo?
|
Django CMS logo change
| 3,228,229 | 1 | 4 | 3,098 | 0 |
python,django,django-cms
|
Which logo do you mean?
I think logo is just an image inside the template, right?
Check out the template in cms/templates/cms/new.html
| 0 | 0 | 0 | 0 |
2010-07-12T11:48:00.000
| 4 | 0.049958 | false | 3,228,212 | 0 | 0 | 1 | 3 |
Is there a way to change the Django CMS logo, for my own company logo?
|
App Engine Unique Non Numeric Code
| 3,232,948 | 2 | 2 | 215 | 0 |
python,google-app-engine
|
This would be difficult to use as-is on app engine because many copies of your application could be running at once. Each copy would need access to the "last identifier" and be able to update it atomically. This would likely require too much overhead, unless you only need to generate new IDs in this fashion rather infrequently.
Why not use GAE's built-in numeric IDs? They are guaranteed to be unique and are also easy to communicate. They are also generally sequential and increasing, though this is not guaranteed.
| 0 | 1 | 0 | 0 |
2010-07-12T22:38:00.000
| 2 | 0.197375 | false | 3,232,833 | 0 | 0 | 1 | 1 |
Using an alphabet like "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ" I'd like to generate 2 to 4 letter codes to identify unique datastore entries. I have a python function capable of doing this when passed an list indicating the letter positions of the last code [7,17,11] -> "7GA". the next code can be made by incrementing that right most element by one and carrying one up when the alphabet length is exceeded.
This method has the advantage of keeping codes short, sequential, consistent, easy to communicate, and looking how I want them to.
I'm wondering though if this would work on app engine since the function must hold onto or be passed the last identifier to enforce uniqueness which may not play well with the non-continuous nature of Google's infrastructure. Alternate ways to make this happen or reasoned arguments against it are welcome.
|
Guide to install xampp with zope-plone on the same linux machine?
| 3,247,954 | 0 | 0 | 486 | 1 |
python,apache,xampp,plone,zope
|
sorry for wrong site but I just figured out that it was not a problem at all. I installed XAMPP (a snap) and downloaded and ran the plone install script. Both sites XAMPP on port 80 and zope/plone on 8080 are working without problems. Just to let everyone know. I don't know why I got nervous about this :)
| 0 | 0 | 0 | 0 |
2010-07-13T00:09:00.000
| 2 | 1.2 | true | 3,233,246 | 0 | 0 | 1 | 1 |
Is there a good step by step online guide to install xampp (apache server,mysql server) together with zope-plone on the same linux machine and make it play nicely or do I have to go through their confusing documentations?
Or how can I install this configuration in the best way? I can install and use both seperately but in tandem is an issue for me. Any help is appreciated.
|
Can we learn Django for a python beginner?
| 3,235,021 | 1 | 2 | 5,268 | 0 |
python,django
|
Starting from Django it's good way to learn Python in fact. Django allows you to do nice things in a short time, which might be good motivation to dive into that language.
| 0 | 0 | 0 | 0 |
2010-07-13T05:24:00.000
| 5 | 0.039979 | false | 3,234,402 | 0 | 0 | 1 | 2 |
Now, I'm learning python but I'm PHP web developer. I don't interest about terminal and windows programming. I only want to do web development. So, Can I learn Django ?
|
Can we learn Django for a python beginner?
| 3,234,410 | 9 | 2 | 5,268 | 0 |
python,django
|
Yes, you can. I started learning Django with very little Python knowledge too. As long as you have another language behind your belt, preferably a web based one (as you do), I don't think you're biting off too much at once.
Python's a pretty easy language to pick up too. Just have to get used to the significant white space and lack of semi-colons :P
| 0 | 0 | 0 | 0 |
2010-07-13T05:24:00.000
| 5 | 1.2 | true | 3,234,402 | 0 | 0 | 1 | 2 |
Now, I'm learning python but I'm PHP web developer. I don't interest about terminal and windows programming. I only want to do web development. So, Can I learn Django ?
|
Authentication in Google App Engine: app.yaml vs. python code
| 3,241,208 | 2 | 4 | 1,616 | 0 |
python,google-app-engine,authentication
|
If you have handlers which are only accessible to admins, then app.yaml certainly seems like the easiest way to secure the pages those handlers expose.
However, if you have some handlers which serve both admin and non-admin views (e.g., your main.py), then you'll have to use something more fine-grained than app.yaml (e.g., google.appengine.api.users.is_current_user_admin()).
I'd expect performance to be roughly equivalent once your application is running (a negligible fraction of the time it takes to load your page).
| 0 | 1 | 0 | 0 |
2010-07-13T20:01:00.000
| 2 | 0.197375 | false | 3,240,990 | 0 | 0 | 1 | 1 |
I am writing a small app that uses the GAE. I have parts of my app that are for administrative use only. I have two options using login: admin option in the app.yaml or google.appengine.api.users.is_current_user_admin() in python code. The basic authentication is sufficient for my case.
Which solution is better?
The advantage of using app.yaml is that the python code is a bit cleaner. Plus it may be the case that app.yaml may be more efficient, since it can be handled in the server. (In worst case it is equal in terms of performance.) The only drawback is that I do not display a custom page, but I don't care to much for that.
I am unsure if my assertions are correct.
|
Django unable to find MySQLdb python module
| 23,076,238 | 1 | 19 | 38,547 | 1 |
python,django,mysql
|
Try this if you are using
linux:- sudo apt-get install python-mysqldb
windows:- pip install python-mysqldb or
easy_install python-mysqldb
Hope this should work
| 0 | 0 | 0 | 0 |
2010-07-14T02:49:00.000
| 10 | 0.019997 | false | 3,243,073 | 0 | 0 | 1 | 1 |
Installed Django from source (python setup.py install and such), installed MySQLdb from source (python setup.py build, python setup.py install). Using Python 2.4 which came installed on the OS (CentOS 5.5). Getting the following error message after launching the server:
Error loading MySQLdb module: No module named MySQLdb
The pythonpath the debug info provides includes
'/usr/lib/python2.4/site-packages'
and yet, if I ls that directory, I can plainly see
MySQL_python-1.2.3-py2.4-linux-i686.egg
Using the python interactive shell, I can type import MySQLdb and it produces no errors. This leads me to believe it's a Django pathing issue, but I haven't the slightest clue where to start looking as I'm new to both Django and python.
EDIT: And to be a bit more specific, everything is currently running as root. I haven't setup any users yet on the machine, so none exist other than root.
EDITx2: And to be even more specific, web server is Cherokee, and deploying using uWSGI. All installed from source.
|
No more BeautifulSoup
| 3,244,345 | 0 | 3 | 653 | 0 |
python,parsing
|
Well, if you're not duty-bound to python, you could always use a TagSoup parser. It's a Java library, but it gives very good results. You could also just use Tidy to clean your input before trying to parse it.
| 0 | 0 | 1 | 0 |
2010-07-14T08:05:00.000
| 4 | 0 | false | 3,244,335 | 0 | 0 | 1 | 1 |
I have been using BeautifulSoup but as I understand it that library is no longer being maintained. So what should I use ? I have heard about Xpath but what else is there ?
|
Django - How to share configuration constants within an app?
| 3,244,614 | 6 | 5 | 1,651 | 0 |
python,django,coding-style,constants
|
There's already a project-wide settings.py file. This is the perfect place to put your own custom setttings.
| 0 | 0 | 0 | 0 |
2010-07-14T08:45:00.000
| 4 | 1 | false | 3,244,570 | 0 | 0 | 1 | 2 |
It is sometimes beneficial to share certain constants between various code files in a django application.
Examples:
- Name or location of dump file used in various modules\commands etc
- Debug mode on\off for the entire app
- Site specific configuration
What would be the elegant\pythonic way of doing this?
|
Django - How to share configuration constants within an app?
| 3,245,074 | 0 | 5 | 1,651 | 0 |
python,django,coding-style,constants
|
Django apps are meant to be (more or less) pluggable. Therefore, you are not supposed to hack into the code of an app in order to parametrize what you want (it would be quite a mess if you had to do this ! Imagine you want to upgrade an app you downloaded on internet... you would have to re-hack into the code of the new version ?!?).
For this reason you shouldn't add app-level settings at the app level, but rather put them together somewhere in your project-wide settings.py.
| 0 | 0 | 0 | 0 |
2010-07-14T08:45:00.000
| 4 | 0 | false | 3,244,570 | 0 | 0 | 1 | 2 |
It is sometimes beneficial to share certain constants between various code files in a django application.
Examples:
- Name or location of dump file used in various modules\commands etc
- Debug mode on\off for the entire app
- Site specific configuration
What would be the elegant\pythonic way of doing this?
|
java-applet gui testing with python
| 3,246,550 | 0 | 0 | 312 | 0 |
python
|
I don't understand exactly what you mean or why you want to test Java in Python but Jython may be helpful.
| 0 | 0 | 0 | 1 |
2010-07-14T13:22:00.000
| 1 | 0 | false | 3,246,506 | 0 | 0 | 1 | 1 |
is there any frame-work or tool to test java-applets in python
|
Approach to upgrade application configuration
| 3,247,629 | 1 | 0 | 102 | 0 |
python,xml,configuration,xsd,upgrade
|
For all configuration settings that remain the same between configurations, have your installation script copy those over from the old config file if it exists. For the rest, just have some defaults that the user can change if necessary, as usual for a config file. Unless I've misunderstood the question, it sounds like you're making a bigger deal out of this than it needs to be.
By the way, you'd really only need one "updater" script, because you could parametrize the XML tagging such that it go through your new config file/config layout file, and then just check the tags in the old file against that and copy the data from the ones that are present in the new file. I haven't worked with XSD files before, so I don't know the specifics of working with them, but I don't think it should be that difficult.
| 0 | 0 | 1 | 0 |
2010-07-14T15:06:00.000
| 1 | 1.2 | true | 3,247,516 | 0 | 0 | 1 | 1 |
My application has a xml based configuration. It has also a xsd file. Before my application starts, xmllint will check the configuration against the xsd file.
With the growth of my application, the configuration structure has changed a bit. Now I have to face this problem: When I provide a new version of my application to customer, I have to upgrade the existing configuration.
How to make this done easy and clever?
My idea is to build a configuration object using python, and then read configuration v1 from file and save it as v2. But if later the structure is changed again, I have to build another configuration object model.
|
How to preload model for ReferenceProperty?
| 3,281,505 | 1 | 1 | 213 | 0 |
python,google-app-engine
|
This isn't possible in the standard db framework, as there's not enough information present to find your models. The only information the framework has to work with is the kind name, which doesn't include the fully qualified package - so it has no way to figure out what package your model definition might be in.
If you're writing an admin interface, though, you probably want to use the low-level google.appengine.api.datastore interface, instead, which operates on dicts instead of model classes, and doesn't require a model definition.
| 0 | 0 | 0 | 0 |
2010-07-14T15:48:00.000
| 1 | 0.197375 | false | 3,247,971 | 0 | 0 | 1 | 1 |
I have a models in different files (blog/models.py, forum/models.py, article/models.py). In each of this files I have defined model classes with application prefix (BlobPost, BlogTag, ForumPost, ForumThread, Article, ArticleCategory).
Also I have appliation - comment, for adding comment attached to any model object. For example, I want to comment BlogPost, or add comment referenced to ForumPost. For this I use property with type ReferenceProperty() - without specify type of references. Any model can attached to comment.
What a problem? If I have show all comments in administration section, I see a problem with autoloading models for ReferenceProperty. I don't know, what type of model used for current comment. I need to autoload package with model, if this need.
Yes, exists simple solution - include all models from all applications. But, this is not good solution. I need load only need models. How to do this autoloading?
My idea is based on detect kind of property, and by first part of this name detect application name for load all models in this application. For example, I have comment with Reference to BlogPost model. I get name of application - Blog and load all models from blog.models import *
For implement my idea I need to understand - how to intercept creating property instances. In my case, if I loop over comments, I see that App Engine automatically (thanks, but not in my case) create instances for properties.
How to inject my logic for loading my models before creating property instance?
Thank you!
|
ORM in Django vs. PHP Doctrine
| 8,543,708 | 1 | 3 | 5,103 | 1 |
php,python,django,orm,doctrine
|
Ive used Doctrine over a 2 year project that ended 1.5 years ago, since then i've been doing mostly Django.
I prefer Djangos ORM over Doctrine any day, more features, more consistency, faster and shinier.
| 0 | 0 | 0 | 0 |
2010-07-14T20:01:00.000
| 4 | 0.049958 | false | 3,249,977 | 0 | 0 | 1 | 3 |
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
|
ORM in Django vs. PHP Doctrine
| 12,267,439 | 5 | 3 | 5,103 | 1 |
php,python,django,orm,doctrine
|
I am a rare person who had to switch from Django 1.4 to Symfony 2.1 so I had to use Doctrine 2 instead of current Django ORM.
Maybe Doctrine can do many things but let me tell you that it is a nightmare for me to use it coming from Django.
I'm bored with the verbosity of php/Symfony/Doctrine ...
Also I never needed something that Django's ORM didn't manage already (maybe projects not big enough to reach the limits).
Simply compare the description of data between both orms (including setters & getters)...
| 0 | 0 | 0 | 0 |
2010-07-14T20:01:00.000
| 4 | 0.244919 | false | 3,249,977 | 0 | 0 | 1 | 3 |
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
|
ORM in Django vs. PHP Doctrine
| 3,250,203 | -1 | 3 | 5,103 | 1 |
php,python,django,orm,doctrine
|
Django isn't just an orm. It is a web framework like symfony. The form framework in symfony is modeled on django for example. It's orm part is more like doctrine 2 I think, but I haven't played with either much.
| 0 | 0 | 0 | 0 |
2010-07-14T20:01:00.000
| 4 | -0.049958 | false | 3,249,977 | 0 | 0 | 1 | 3 |
I am a PHP guy. In PHP I mainly use Doctrine ORM to deal with database issues. I am considering move to Python + Django recently. I know Python but don't have experience with Django. Can anyone who has good knowledge of both Doctrine and ORM in Django give me a comparison of features of these two ORM implementations?
|
How do I redirect different domain names requests to the same ip in django
| 3,256,766 | 2 | 0 | 133 | 0 |
python,django
|
You would do this by setting up different WSGI for each domain using a setting SITE_ID corresponding to the site id from the django.contrib.site app.
| 0 | 0 | 0 | 0 |
2010-07-15T14:48:00.000
| 1 | 1.2 | true | 3,256,731 | 0 | 0 | 1 | 1 |
I have one ip for two domain name, e.g. "www.example.com" and "example.info", and I want each of them to be handled as a different domain (e.g. www.example.com/photos and example.info/photos will be ahndled each by its corresponding function). Is there an elegant way to do this in django?
|
Are there reasons to use get/put methods instead of item access?
| 3,261,668 | 0 | 2 | 108 | 0 |
python,interface,mapping
|
From a strictly philosophical point of view, I don't think that there is a line you can cross with this. If some tool provides the needed functionality, but its API is different, adapt away. The only time you shouldn't do this is if the adapted to API simply is not expressive enough to manipulate the adapted component in a way that is needed.
I wouldn't hesitate to adapt a database into a dict, because that's a great way to manipulate collections, and it's already compatible with a heck of a lot of other code. If I find that my particular application must make calls to the database connections begin(), commit(), and rollback() methods to work right, then a dict won't do, since dict's don't have transaction semantics.
| 0 | 0 | 0 | 0 |
2010-07-16T00:13:00.000
| 2 | 1.2 | true | 3,261,030 | 0 | 0 | 1 | 1 |
I find that I have recently been implementing Mapping interfaces on classes which on the surface fit the model (they are essentially just key-value stores with no more meta-data), but underneath they are sometimes quite complex.
Here are a couple examples of increasing severity:
An object which wraps another mapping converting all objects to strings when set.
An object which uses a local database as a back-end to store the key-value pairs.
An object which makes HTTP requests to remote servers to get/set data.
Lets suppose all of these examples seamlessly implement the Mapping interface, and the only indication that there is something fishy going on is that item access potentially could take a few seconds, and an item may not be retrievable in the same form as stored (if at all). I'm perfectly content with something like the first example, pretty okay with the second, but I'm getting kinda uncomfortable with the last.
The question is, is there a line at which the API for these models should not use item access, even though the underlying structure may feel like it fits on the surface?
|
Check Pending AJAX requests or HTTP GET/POST request
| 3,262,533 | 0 | 17 | 25,834 | 0 |
javascript,python,html
|
You would need to keep track of each XMLHttpRequest and monitor whether it completes or the asynchronous callback is executed.
| 0 | 0 | 1 | 0 |
2010-07-16T06:38:00.000
| 8 | 0 | false | 3,262,473 | 0 | 0 | 1 | 2 |
How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking.
what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but there is a possibility that there are still pending request hanging around somewhere.
thank you in advance.
|
Check Pending AJAX requests or HTTP GET/POST request
| 3,263,704 | 4 | 17 | 25,834 | 0 |
javascript,python,html
|
I see you mention you are using Prototype.js. You can track active requests with Prototype by checking the Ajax.activeRequestCount value. You could check this using setTimeout or setInterval to make sure that any requests triggered on page load have completed (if that's what you're looking to do)
| 0 | 0 | 1 | 0 |
2010-07-16T06:38:00.000
| 8 | 0.099668 | false | 3,262,473 | 0 | 0 | 1 | 2 |
How do i check if the page has pending AJAX or HTTP GET/POST requests? I use javascript and/or python for this checking.
what i wanted to do is execute a script if a page has finished all requests. onload doesn't work for me, if you used firebugs net panel, you would know. onload fires when the page is loaded but there is a possibility that there are still pending request hanging around somewhere.
thank you in advance.
|
GAE is any good ? if yes then JAVA or Python?
| 3,266,220 | 3 | 2 | 652 | 0 |
java,python,google-app-engine
|
Most people here are missing the fact that the question is really about App Engine, not java or python in general.
The Java and Python SDKs and App Engine runtimes have pretty much the same abilities at this point. One caveat with the current java runtime is that if you use a lot of external libraries, your loading hits (the first time someone hits your website, and app engine has to spin up your app) can be a bit slow.
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 1.2 | true | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
GAE is any good ? if yes then JAVA or Python?
| 3,265,021 | 2 | 2 | 652 | 0 |
java,python,google-app-engine
|
You'll be able to accomplish the exact same results using either Python or Java. Java is much more verbose than Python, which can make it have a bit of a steeper learning curve. The fact that you have some experience in Django (which GAE's webapp is largely based on and which you can even use directly if you want) will make it easier for you to get the website up and running in the immediate term.
So again, it does depend on what you want to accomplish. If your goal is to learn Java, then doing a project in Java is the best way to learn it. If your main goal is to get the site up and running, Python will be a better choice as it will let you focus less on struggling with learning new Java syntax and more on simply getting the website off the ground.
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 0.066568 | false | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
GAE is any good ? if yes then JAVA or Python?
| 3,264,425 | 1 | 2 | 652 | 0 |
java,python,google-app-engine
|
You need an IRL mentor.
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 0.033321 | false | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
GAE is any good ? if yes then JAVA or Python?
| 3,263,926 | 1 | 2 | 652 | 0 |
java,python,google-app-engine
|
I would personally go with a Java based solution. If this is just a little website for yourself, then it would be a good idea to learn a new technology, in this case Java. Little projects like this are ideal for learning new technologies and seeing if they are suitable for you as a developer and other projects you may decide to do in the future
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 0.033321 | false | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
GAE is any good ? if yes then JAVA or Python?
| 3,263,908 | 2 | 2 | 652 | 0 |
java,python,google-app-engine
|
If you want to learn Java, then use Java!
If you feel that Java is too verbose compared to Python, you could try Scala, which runs on the JVM like Java. Scala is more concise and well designed.
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 0.066568 | false | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
GAE is any good ? if yes then JAVA or Python?
| 3,264,075 | 3 | 2 | 652 | 0 |
java,python,google-app-engine
|
Java and Python are both excellent languages. It is a matter of taste and believe which you choose.
If you prefer a lightweight solution, use Python.
If you have enterprise needs, whatever that means, use Java.
If you ask for my personal believe, my subjective stand-of-point is:
Use Python wherever possible and stick to other languages if there is a need to.
So this is my opinion, but as S.Lott commented on your question:
Opinions are going to be useless.
| 0 | 1 | 0 | 0 |
2010-07-16T10:21:00.000
| 6 | 0.099668 | false | 3,263,847 | 0 | 0 | 1 | 6 |
Basically I am coding websites in PHP from last year.
But now I want to use something else and GAE looks a good option.
So I want to know if GAE is good for making a little website to share favorite youtube videos ?
I have done single website in Python+Django few months back, it looks good to me.
But JAVA is the language that I want to learn too (never coded in JAVA since School days ).
Phew, it is hard to choose, so I need opinions !!
Specifically : Want to know if any glitch/problem in using either python or Java under GAE. Or if GAE is preferred or not. Not gonna make website for learning only, it will be for a client.
|
How can I set up dynamic imports when hosting IronPython?
| 3,269,071 | 3 | 3 | 180 | 0 |
.net,ironpython,dynamic-language-runtime
|
You need to subclass the PlatformAdaptationLayer class and implement the "file system" calls. IronPython will then go to the PAL to do I/O for the files. This also involves implementing a ScriptHost which returns the type for the PAL. A good example of this is the Silverlight host which redirects file I/O to a XAP file.
If you browse the IronPython source on IronPython.CodePlex.com you'll find the Silverlight host in IronPython_Main\Hosts\Silverlight\Microsoft.Scripting.Silverlight.
| 0 | 0 | 0 | 0 |
2010-07-16T10:45:00.000
| 1 | 1.2 | true | 3,264,029 | 1 | 0 | 1 | 1 |
I'm writing a C# client application which is intended to have strong support for customisation via scripting, and I have chosen IronPython as my target scripting language. I would like to keep the user's code in the application's database with the rest of its state, but I need the user to be able to split their scripts into files and modules.
How can I configure the IronPython engine so that it will use strings (with corresponding virtual paths) as the source for imports, rather than specifying a directory in the user's filesystem? Is this possible?
|
Python over JavaScript? (Facts, please)
| 3,266,895 | 3 | 25 | 65,637 | 0 |
javascript,python
|
Python’s a good second language to learn after JavaScript, as they have a reasonable number of similarities, e.g.
they’re both memory-managed
they have similar data structures — JavaScript’s objects and arrays are much like Python’s dictionaries and arrays
they’re both used quite a lot for web-related work — JavaScript in the browser and in server-side contexts like node.js, Python in web frameworks like Django.
However, Python’s object-oriented... stuff is quite different to JavaScript’s protoype-based object-oriented stuff.
If the only programming you do is manipulating web pages within the web browser, then Python won’t be of any direct use to you (only JavaScript runs in browsers at the moment). But learning another programming language generally gives you new ways to think about the languages you already know. Learning Python could help you write better JavaScript.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0.049958 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,975 | -2 | 25 | 65,637 | 0 |
javascript,python
|
If you need to ask, then I would say no since you don't have a need in mind for its usage.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | -0.033321 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,781 | 0 | 25 | 65,637 | 0 |
javascript,python
|
Along with Python generally being server-side and JavaScript client-side, Python was designed to not only be easy to learn, but also easy to read, and to encourage a more productive environment.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,281 | 2 | 25 | 65,637 | 0 |
javascript,python
|
JavaScript is usually used as a client-side scripting language - that is, it gets downloaded and executed by your browser. Python, however, is usually not coupled to the web. it can be used as a server-side scripting language, and for scripts and applications of any kind. But it is not a client-side language, and is therefore not directly comparable to Javascript, which has an entirely different audience.
Looking at the language level, Javascript is terrible and dysfunctional (hard to debug, clumsy object-orientation) while Python is beautiful and expressive. This is, of course, subjective :-)
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0.033321 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,294 | 0 | 25 | 65,637 | 0 |
javascript,python
|
It depends.
Do you want to program in a language that specifically targets web browsers? Stick with Javascript
Do you want to write... well anything besides for web browsers? Learn Python.
Python is an excellent beginner language that's not just a beginner language. Google uses it, NASA uses it, and many, many other organizations use Python.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,271 | 1 | 25 | 65,637 | 0 |
javascript,python
|
IMO Python may be easier to learn (having taught both to intro classes).
Also, one major annoyance of JavaScript is that in runs in your browser. This inherently makes it much harder to debug problems.
In terms of a production-level language, Python is more of a general purpose programming language, while JavaScript is targeted at building dynamic web applications.
If you want to get into programming, you should definitely learn a more general purpose language such as Java or Python.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0.016665 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,248 | 15 | 25 | 65,637 | 0 |
javascript,python
|
The two are generally used quite differently. Javascript is primarily used as a client side scripting language vs python which is a server based language. So in a website you could use both. But not sure if this is what you were wondering.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 1 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,266 | 0 | 25 | 65,637 | 0 |
javascript,python
|
JavaScript and Python are both great languages that are geared toward different problems.
JavaScript knowledge is invaluable when dealing with the web, writing web pages, and poking around in html DOM.
Python is a scripting language that is great for a host of things on any machine.
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Python over JavaScript? (Facts, please)
| 3,266,275 | 1 | 25 | 65,637 | 0 |
javascript,python
|
For what purpose? Javascript is king in some circles (web development, for instance).
Javascript and Python are not mutually exclusive. Why not learn both?
| 0 | 0 | 0 | 1 |
2010-07-16T15:06:00.000
| 12 | 0.016665 | false | 3,266,223 | 1 | 0 | 1 | 9 |
I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
|
Recommendation for click/event tracking mechanisms (python, django, celery, mongo etc)
| 3,267,422 | 1 | 7 | 3,366 | 0 |
python,django,events,mongodb,tracking
|
If by click, you mean a click on a link that loads a new page (or performs an AJAX request), then what you aim to do is fairly straightforward. Web servers tend to keep plain-text logs about requests - with information about the user, time/date, referrer, the page requested, etc. You could examine these logs and mine the statistics you need.
On the other hand, if you have a web application where clicks don't necessarily generate server requests, then collecting click information with javascript is your best bet.
| 0 | 0 | 0 | 0 |
2010-07-16T16:40:00.000
| 3 | 0.066568 | false | 3,267,081 | 0 | 0 | 1 | 2 |
I'm looking into way to track events in a django application (events would generally be clicks tied to a specific unique user id).
These events would essentially contain an event type like "click" and then each click event would be assigned to a unique id (many events can go to one id) and each event would have a data set including items like referrer etc...
I have tried mixpanel, but for now the data api they are offering seems too limiting as I can't seem to find a way to get all of my data out by a unique id (apart from the event itself).
I'm looking into using django-eventracker, but curious about any others thought on the best way to do this. Mongo or CouchDb seem like a great choice here, but the celery/rabbitmq looks really attractive with mongo. Pumping these events into the existing applications db seems limiting at this point.
Anyways, this is just a thread to see what others thoughts are on this and how they have implemented something like this...
shoot
|
Recommendation for click/event tracking mechanisms (python, django, celery, mongo etc)
| 3,267,157 | 3 | 7 | 3,366 | 0 |
python,django,events,mongodb,tracking
|
I am not familiar with the pre-packaged solutions you mention. Were I to design this from scratch, I'd have a simple JS collecting info on clicks and posting it back to the server via Ajax (using whatever JS framework you're already using), and on the server side I'd simply append that info to a log file for later "offline" processing -- so that would be independent of django or other server-side framework, essentially.
Appending to a log file is a very light-weight action, while DBs for web use are generally way optimized for read-intensive (not write-intensive) operation, so I agree with you that force fitting that info (as it trickes in) into the existing app's DB is unlikely to offer good performance.
| 0 | 0 | 0 | 0 |
2010-07-16T16:40:00.000
| 3 | 0.197375 | false | 3,267,081 | 0 | 0 | 1 | 2 |
I'm looking into way to track events in a django application (events would generally be clicks tied to a specific unique user id).
These events would essentially contain an event type like "click" and then each click event would be assigned to a unique id (many events can go to one id) and each event would have a data set including items like referrer etc...
I have tried mixpanel, but for now the data api they are offering seems too limiting as I can't seem to find a way to get all of my data out by a unique id (apart from the event itself).
I'm looking into using django-eventracker, but curious about any others thought on the best way to do this. Mongo or CouchDb seem like a great choice here, but the celery/rabbitmq looks really attractive with mongo. Pumping these events into the existing applications db seems limiting at this point.
Anyways, this is just a thread to see what others thoughts are on this and how they have implemented something like this...
shoot
|
Google App Engine: Redirect to RequestHandler
| 3,267,906 | 3 | 3 | 1,160 | 0 |
python,google-app-engine
|
One alternative would be to have a map of symbolic names to URLs, that way you could redirect to the mapped URL - you could then update your URLs with impunity.
Or if you'd rather just execute the code from another handler, I don't know why you couldn't just make a method call - worst case, you could extract a common method from the two handlers and call that.
| 0 | 1 | 0 | 0 |
2010-07-16T18:31:00.000
| 3 | 1.2 | true | 3,267,830 | 0 | 0 | 1 | 1 |
I just started with Google App Engine using python and I was following a tutorial and writing my own little app to get familiar the webapp framework. Now I just noticed the tutorial does the following self.redirect('/'). So that got me wondering: is there a way to redirect to a handler instead of a hardcoded path? Thought that might be better so that you can change your urls without breaking your app.
|
Populating a SQLite3 database from a .txt file with Python
| 3,275,298 | 2 | 13 | 7,034 | 1 |
python,django,sqlite
|
You asked what the create(**dict(zip(fields, row))) line did.
I don't know how to reply directly to your comment, so I'll try to answer it here.
zip takes multiple lists as args and returns a list of their correspond elements as tuples.
zip(list1, list2) => [(list1[0], list2[0]), (list1[1], list2[1]), .... ]
dict takes a list of 2-element tuples and returns a dictionary mapping each tuple's first element (key) to its second element (value).
create is a function that takes keyword arguments. You can use **some_dictionary to pass that dictionary into a function as keyword arguments.
create(**{'name':'john', 'age':5}) => create(name='john', age=5)
| 0 | 0 | 0 | 0 |
2010-07-17T09:38:00.000
| 6 | 0.066568 | false | 3,270,952 | 0 | 0 | 1 | 1 |
I am trying to setup a website in django which allows the user to send queries to a database containing information about their representatives in the European Parliament. I have the data in a comma seperated .txt file with the following format:
Parliament, Name, Country, Party_Group, National_Party, Position
7, Marta Andreasen, United Kingdom, Europe of freedom and democracy Group, United Kingdom Independence Party, Member
etc....
I want to populate a SQLite3 database with this data, but so far all the tutorials I have found only show how to do this by hand. Since I have 736 observations in the file I dont really want to do this.
I suspect this is a simple matter, but I would be very grateful if someone could show me how to do this.
Thomas
|
Possible to pass more than 1 argument to a context processor in Django?
| 3,278,231 | 2 | 0 | 1,249 | 0 |
python,django
|
Store whatever variables you would want in the session. Then you can access it through the request.
| 0 | 0 | 0 | 0 |
2010-07-18T21:22:00.000
| 2 | 0.197375 | false | 3,277,307 | 0 | 0 | 1 | 1 |
Is it possible to pass more than 1 argument to a context processor in Django? In other words, in addition to the HttpRequest object, I would like to pass 1 or more additional argument?
|
Programming books in ePub format
| 3,278,535 | 0 | 10 | 10,584 | 0 |
php,jquery,python,epub
|
Does it have to be ePub format?
Here in Australia the iBookstore is basically completely bare, except for books out of copyright (The illiad, Bible etc) My understanding is that they are still negotiating with the publishers.
The guy at the Apple store said to me, oh thats no problem, download the free Kindle app and just buy your books from Amazon, they have a much better range anyway.
Would that work for you?
| 0 | 0 | 0 | 0 |
2010-07-19T04:35:00.000
| 5 | 0 | false | 3,278,477 | 1 | 0 | 1 | 1 |
I purchased an iPad hoping to read books on it that've been aging on my desk for months, but it turned out that there're NO programming books available on iBookstore.
Are there any (Python, PHP, jQuery) books available in ePub format? Conversion from pdf to epub is not an option because the formatting is lost in the process.
Thanks
|
python handle endless XML
| 3,284,880 | 0 | 5 | 1,933 | 0 |
python,xml
|
If the document is endless why not add end tag (of main element) manually before opening it in parser? I don't know Python but why not add </endtag> to string?
| 0 | 0 | 1 | 0 |
2010-07-19T19:24:00.000
| 7 | 0 | false | 3,284,289 | 0 | 0 | 1 | 1 |
I am working on a application, and my job just is to develop a sample Python interface for the application. The application can provide XML-based document, I can get the document via HTTP Get method, but the problem is the XML-based document is endless which means there will be no end element. I know that the document should be handled by SAX, but how to deal with the endless problem? Any idea, sample code?
|
How to insert dynamic string in wxpython html window? (wx.html.htmlwindow)
| 3,294,064 | 0 | 2 | 614 | 0 |
python,wxpython,tags
|
There are a couple of approaches that come to my mind. If it's like a form letter where only specific parts will be replaced, then you can just should that to the user and have some text controls for them to fill in. Something like this:
Dear #NAME,
Thank you for contacting #COMPANY, blah blah blah
And then have a text control for each of the replaceable parts. The other method would be to use the RichTextCtrl's Save As HTML functionality. See the wxPython Demo application for an example.
| 1 | 0 | 0 | 0 |
2010-07-20T06:13:00.000
| 2 | 0 | false | 3,287,455 | 0 | 0 | 1 | 1 |
I am making a html window in wxpython and want to print it. Before that I need to enter user input (such as his name or such things ) in the html page. How to do that nicely?
Thanks in advance,
|
Improving performance of cgi
| 3,289,546 | 0 | 1 | 179 | 1 |
python,cgi
|
Django and Pylons are both frameworks that solve this problem quite nicely, namely by abstracting the DB-frontend integration. They are worth considering.
| 0 | 0 | 0 | 1 |
2010-07-20T11:15:00.000
| 2 | 0 | false | 3,289,330 | 0 | 0 | 1 | 1 |
I have 5 python cgi pages. I can navigate from one page to another. All pages get their data from the same database table just that they use different queries.
The problem is that the application as a whole is slow. Though they connect to the same database, each page creates a new handle every time I visit it and handles are not shared by the pages.
I want to improve performance.
Can I do that by setting up sessions for the user?
Suggestions/Advices are welcome.
Thanks
|
Web-ifing a python command line script?
| 3,289,731 | 0 | 8 | 3,095 | 0 |
python
|
Your task sounds interesting. :-) A scenario that just came into mind: You continuosly scrape the resources with your home-brew scripts, and push the results into your persistent database and a caching system -- like Redis -- simultanously. Your caching system/layer serves as primary data source when serving client requests. Redis f.e. is a high-performant key-value-store that is capable to handle 100k connections per second. Though only the n latest (say f.e. 50k entries) matter the caching system will only hold these entries and let you solely focus on developing the server-side API (handling connections, processing requests, reading from Redis) and the frontend. The communication between frontend and backend-API could be driven by WebSocket connections. A pretty new part of the HTML5 spec. Though, however, already supported by many browser versions released these days. Alternatively you could fallback on some asynchronous Flash Socket-stuff. Websockets basically allow for persistent connections between a client and a server; you can register event listener that are called for every incoming data/-packet -- no endless polling or other stuff.
| 0 | 0 | 1 | 0 |
2010-07-20T11:50:00.000
| 3 | 0 | false | 3,289,584 | 0 | 0 | 1 | 1 |
This is my first questions here, so I hope it will be done correctly ;)
I've been assigned the task to give a web interface to some "home made" python script.
This script is used to check some web sites/applications availability, via curl commands. A very important aspect of this script is that it gives its results in real-time, writing line by line to the standard output.
By giving a web interface to this script, the main goal is that the script can be easily used from anywhere, for example via a smartphone. So the web interface must be quite basic, and work "plugin-free".
My problem is that most solutions I thought or found on the web (ajax, django, even a simple post) seem to be needing a full generation of the page before sending it to the browser, losing this important "real-time" aspect.
Any idea on how to do this properly ?
Thanks in advance.
|
Sending email from my domain vs from the admin google account?
| 3,292,433 | 2 | 2 | 497 | 0 |
python,google-app-engine,email
|
When sending email, you can designate the sender as either the currently logged in user or any registered administrator. It does not have to be the administrator who created the app.
Also note that you can add any email address as an administrator on your app (from the permissions tab in the admin console). It does not need to be a Gmail or Google Apps account; any email account that you can access to click on the confirmation link will work.
| 0 | 1 | 0 | 0 |
2010-07-20T16:36:00.000
| 2 | 0.197375 | false | 3,292,238 | 0 | 0 | 1 | 1 |
I have a domain xyz.com and right now it is pointing to my app in appspot. I want to send email alerts to users for various events. However, appengine restricts email sender to admin email address which was used to create the google app engine account.
Can I send emails on behalf of [email protected] using app engine? If not, is there a simple workaround to do this?
|
Browser-based MMO best-practice
| 3,294,995 | 5 | 3 | 770 | 0 |
python,django,cron
|
Running a scheduled task to perform updates in your game, at any interval, will give you a spike of heavy database use. If your game logic relies on all of those database values to be up to date at the same time (which is very likely, if you're running an interval based update), you'll have to have scheduled downtime for as long as that cronjob is running. When that time becomes longer, as your player base grows, this becomes extremely annoying.
If you're trying to reduce database overhead, you should store values with their last update time and growth rates, and only update those rows when the quantity or rate of growth changes.
For example, a stash of gold, that grows at 5 gold per minute, only updates when a player withdraws gold from it. When you need to know the current amount, it is calculated based on the last update time, the current time, the amount stored at the last update, and the rate of growth.
Data that changes over time, without requiring interaction, does not belong in the database. It belongs in the logic end of your game. When a player performs an activity you need to remember, or a calculation becomes too cumbersome to generate again, that's when you store it.
| 0 | 0 | 1 | 0 |
2010-07-20T21:50:00.000
| 2 | 1.2 | true | 3,294,682 | 0 | 0 | 1 | 1 |
I am developing an online browser game, based on google maps, with Django backend, and I am getting close to the point where I need to make a decision on how to implement the (backend) timed events - i.e. NPC possession quantity raising (e.g. city population should grow based on some variables - city size, application speed).
The possible solutions I found are:
Putting the queued actions in a table and processing them along with every request.
Problems: huge overhead, harder to implement
Using cron or something similar
Problem: this is an external tool, and I want as little external tools as possible.
Any other solutions?
|
Where should utility functions live in Django?
| 24,850,556 | 5 | 59 | 31,416 | 0 |
python,django,structure
|
Here is another way to do it:
If the utility functions can be a stand-alone module
and you are using a virtualenv environment for your django app
then you can bundle the functionality as a package and install it in your virtualenv.
This makes it easy to import where ever you need it in your django app.
| 0 | 0 | 0 | 0 |
2010-07-20T23:45:00.000
| 3 | 0.321513 | false | 3,295,268 | 0 | 0 | 1 | 1 |
Where should utility functions live in Django? Functions like custom encrypting/decrypting a number, sending tweets, sending email, verifying object ownership, custom input validation, etc. Repetitive and custom stuff that I use in a number of places in my app. I'm definitely breaking DRY right now.
I saw some demos where functions were defined in models.py, although that didn't seem conceptually right to me. Should they go in a "utilities" app that gets imported into my project? If so, where do they go in the utilities app? The models.py file there?
Thanks for helping this n00b out.
UPDATE: Let me be even more specific. Say I need a function "light_encrypt(number)" which takes the param "number", multiplies it by 7, adds 10 and returns the result, and another function "light_decrypt(encr_number) which takes the param "encr_number", subtracts 10, divides by 7 and returns the results. Where in my Django tree would I put this? This is not middleware, right? As Felix suggests, do I create a python package and import it into the view where I need these functions?
|
Rich text to be stored using django
| 3,296,578 | 0 | 0 | 724 | 0 |
python,django,django-models,django-views
|
Text or data has no color or creed.
If you have data as text, just store it in text field, if it is binary store it as a blob. It doesn't matter what that data represents, it can be richtext, pdf, a flash file etc database doesn't care.
| 0 | 0 | 0 | 0 |
2010-07-21T04:13:00.000
| 1 | 1.2 | true | 3,296,268 | 0 | 0 | 1 | 1 |
If csv file has rich text in it. Using csv.reader() can the same format stored in the Mysql database using django and retrieved back to html pages?
Thanks..
|
I need help with messaging and queuing middleware systems for extjs
| 3,309,648 | 0 | 1 | 362 | 0 |
php,javascript,python,ajax,extjs
|
I would change it this way:
make PHP block and wait until Python daemon finishes processing the transaction
increase the timeout in the Ext.data.Connection() so it would wait until PHP responds
remove the Ext.MessageBox and handle possible errors in the callback handler in Ext.data.Connection()
I.e. instead of waiting for the transaction to complete in JavaScript (which requires several calls to the webserver) you are now waiting in PHP.
This is assuming you are using Ext.data.Connection() to call the PHP handler - if any other Ext object is used the principle is the same but the timeout setting / completion handling would differ.
| 0 | 0 | 1 | 0 |
2010-07-21T07:34:00.000
| 1 | 1.2 | true | 3,297,110 | 0 | 0 | 1 | 1 |
I developed a system that consists of software and hardware interaction. Basically its a transaction system where the transaction details are encrypted on a PCI device then returned back to my web based system where it is stored in a DB then displayed using javascript/extjs in the browser. How I do this now is the following:
Transaction encoding process
1.The user selects a transaction from a grid and presses "encode" button,extjs/js then sends the string to PHP where it is formatted and inserted into requests[incoming_request]. At this stage I start a extjs taskmanager to do interval checks on the requests[response] column for a result, and I display a "please wait..." message.
2.I have created a python daemon service that monitors the requests table for any transactions to encode.The python daemon then picks up any requests[incoming_request] then encodes the request and stores the result in requests[response] table.
3.The extjs taskmanager then picks up the requests[response] for the transaction and displays it to the user and then removes the "please wait..." message and terminates the taskmanager.
Now my question is: Is there a better way of doing this encryption process by using 3rd party Messaging and Queuing middleware systems? If so please help.
Thank You!
|
Pydev, eclipse and pythonpath problem
| 8,374,480 | 1 | 2 | 9,880 | 0 |
python,eclipse,pydev
|
It seems like some sort of cache issue in PyDev... in which case you could try to remove the interpreter, add it again and restart Eclipse.
| 0 | 0 | 0 | 1 |
2010-07-21T15:21:00.000
| 3 | 0.066568 | false | 3,300,903 | 0 | 0 | 1 | 3 |
I've installed pydev to my eclipse 3.5.2. Everything was working smoothly, create projects, execute, test, autocomplete.
But then I realized that importing modules from /usr/lib/pymodules/python2.6, such as django, causes error "Unresolved import: xxxx". Of course, PYTHONPATH SYSTEM includes the directories I want. What's more, inside package explorer i can c the modules under "System Libs".
I just can't import them :S. Is this a bug? Or I just missing something.
Thanks.
|
Pydev, eclipse and pythonpath problem
| 3,459,938 | 1 | 2 | 9,880 | 0 |
python,eclipse,pydev
|
If you're using virtualenv you should setup an interpreter using the python build inside.
ie., default python interpreter for th project will be /usr/bin/python
but change it to something like "{project name} python" and point it to your virtual env path. In my case it's ~/.virtualenvs/acme/bin/python
| 0 | 0 | 0 | 1 |
2010-07-21T15:21:00.000
| 3 | 1.2 | true | 3,300,903 | 0 | 0 | 1 | 3 |
I've installed pydev to my eclipse 3.5.2. Everything was working smoothly, create projects, execute, test, autocomplete.
But then I realized that importing modules from /usr/lib/pymodules/python2.6, such as django, causes error "Unresolved import: xxxx". Of course, PYTHONPATH SYSTEM includes the directories I want. What's more, inside package explorer i can c the modules under "System Libs".
I just can't import them :S. Is this a bug? Or I just missing something.
Thanks.
|
Pydev, eclipse and pythonpath problem
| 32,353,403 | 2 | 2 | 9,880 | 0 |
python,eclipse,pydev
|
In eclipse you can add django folder in you python path.
Window->Preferences-> PyDev-> Interpreters->Python Interpreter -> Lirararies -> New Folder
And browse till the parent folder of modules you are searching.
| 0 | 0 | 0 | 1 |
2010-07-21T15:21:00.000
| 3 | 0.132549 | false | 3,300,903 | 0 | 0 | 1 | 3 |
I've installed pydev to my eclipse 3.5.2. Everything was working smoothly, create projects, execute, test, autocomplete.
But then I realized that importing modules from /usr/lib/pymodules/python2.6, such as django, causes error "Unresolved import: xxxx". Of course, PYTHONPATH SYSTEM includes the directories I want. What's more, inside package explorer i can c the modules under "System Libs".
I just can't import them :S. Is this a bug? Or I just missing something.
Thanks.
|
how to get final redirected url
| 3,309,766 | 3 | 1 | 1,704 | 0 |
python,google-app-engine,feedparser
|
It is not possible to get the 'final' URL by parsing, in order to resolve it, you would need to at least perform an HTTP HEAD operation
| 0 | 1 | 1 | 0 |
2010-07-22T14:05:00.000
| 3 | 0.197375 | false | 3,309,695 | 0 | 0 | 1 | 2 |
i am using google app engine for fetching the feed url bur few of the urls are 301 redirect i want to get the final url which returns me the result
i am usign the universal feed reader for parsing the url is there any way or any function which can give me the final url.
|
how to get final redirected url
| 3,309,853 | 0 | 1 | 1,704 | 0 |
python,google-app-engine,feedparser
|
You can do this by handling redirects manually. When calling fetch, pass in follow_redirects=False. If your response object's HTTP status is a redirect code, either 301 or 302, grab the Location response header and fetch again until the HTTP status is something else. Add a sanity check (perhaps 5 redirects max) to avoid redirect loops.
| 0 | 1 | 1 | 0 |
2010-07-22T14:05:00.000
| 3 | 0 | false | 3,309,695 | 0 | 0 | 1 | 2 |
i am using google app engine for fetching the feed url bur few of the urls are 301 redirect i want to get the final url which returns me the result
i am usign the universal feed reader for parsing the url is there any way or any function which can give me the final url.
|
django URL reverse: When URL reversig a username it fails when username has a '.' literal in it
| 3,312,255 | 4 | 2 | 216 | 0 |
python,django,url,reverse
|
The problem will be in whatever regex you are using in your urls.py to match feed_user. Presumably you are using something like r'(?P<username>\w+)/$', which only matches on alphanumeric characters and doesn't match on punctuation.
Instead, use this: r'(?P<username>[\w.]+)/$'
| 0 | 0 | 0 | 0 |
2010-07-22T18:13:00.000
| 1 | 1.2 | true | 3,311,973 | 0 | 0 | 1 | 1 |
I didn't expect this to occur [since I didn't know when django changed to allow _ and . in usernames], but when I attempt
{% url feed_user entry.username %}
I will get a 500 error when the username contains a '.'
In this case rob.e as a username will fail.
Any ideas how to deal with this?
|
How complicate can a Django application go?
| 3,320,111 | 2 | 1 | 399 | 0 |
python,django
|
Mozilla is currently rewriting two of our largest sites on Django. These are both fairly complex applications that interact with numerous online and offline services. With Python's large collection of libraries, anything Django doesn't do itself we've usually been able to find, or create pretty easily. For example, we have both cron jobs and on-demand offline tasks, backed by AMQP, which is similar to JMS.
Short answer: you can get pretty darn complicated if that's what you need to do, and odds are there's already a Python project or library to do what you need.
| 0 | 0 | 0 | 0 |
2010-07-23T15:51:00.000
| 2 | 0.197375 | false | 3,319,890 | 0 | 0 | 1 | 1 |
I'm tasked to create a simple CRUD MVC application, and I thought it's a good opportunity to learn python. Because of its great documentation, I'm thinking now that I'll go with Django.
Now, this simple CRUD MVC application could become quite complicated in the future. I might have receive and issue JMS messages, display charts that are updated periodically (I'm thinking about ajax) and what not.
Given this I'm a little worried, since while I'm told it's easy to call Java code from python (I'm a Java developer), I'm also told that Django is generally best for content based web application, and can be restrictive.
Do you think it is okay to go with Django in this case?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.