Search Results

Search found 4109 results on 165 pages for 'django paypal'.

Page 122/165 | < Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >

  • How to "select file" with Python script? . Google App Engine . Python .

    - by draconisthe0ry
    I'm trying to create an online application for a python function i have created. in my script, i input the path of my file for the computer (input_path = '/users/user/desktop/input.txt') but i'm not sure how to go about this using Google App Engine . I have the choice between 3 templates: flask, django, and bottle . I really do believe this question is relevant for people transitioning from scripts to web-based applications. Do I need to incorporate GUI stuff from Tkinter or something? There has to be a way to simply select a file to use for the input path in an interactive way using python scripts

    Read the article

  • show output of file on client side using jquery + javascript .

    - by tazimk
    Hi, Written some code in my view function : This code reads a file from server . stores it in a list .passes to client def showfiledata(request): f = open("/home/tazim/webexample/test.txt") list = f.readlines() return_dict = {'list':list} json = simplejson.dumps(list) return HttpResponse(json,mimetype="application/json") On, client side the $.ajax callback function receives this list of lines. Now, My Question is . I have to display these lines in a textarea. But these lines should not be displayed at once . Each line should be appended in textarea with some delay. (Use of setInterval is required as per my knowledge) . Also I am using jquery in my templates. The server used is Django . Please provide some solution as in some sample code will be quite helpful .

    Read the article

  • Recommendations with hierarchical data on non-relational databases?

    - by Luki
    I'm developing an web application that uses a non-relational database as a backend (django-nonrel + AppEngine). I need to store some hierarchical data (projects/subproject_1/subproject_N/tasks), and I'm wondering which pattern should I use. For now I thought of: Adjacency List (store the item's parent id) Nested sets (store left and right values for the item) In my case, the depth of nesting for a normal user will not exceed 4-5 levels. Also, on the UI, I would like to have a pagination for the items on the first level, to avoid to load too many items at the first page load. From what I understand so far, nested sets are great when the hierarchy is used more for displaying. Adjacency lists are great when editing on the tree is done often. In my case I guess I need the displaying more than the editing (when using nested sets, even if the display would work great, the above pagination could complicate things on editing). Do you have any thoughts and advice, based on your experience with the non-relational databases?

    Read the article

  • How can I make a dashboard with all pending tasks using Celery?

    - by e-satis
    I want to have some place where I can watch all the pendings tasks. I'm not talking about the registered functions/classes as tasks, but the actual scheduled jobs for which I could display: name, task_id, eta, worker, etc. Using Celery 2.0.2 and djcelery, I found `inspect' in the documentation. I tried: from celery.task.control import inspect def get_scheduled_tasks(nodes=None): if nodes: i = inspect(nodes) else: i = inspect() scheduled_tasks = [] dump = i.scheduled() if dump: for worker, tasks in dump: for task in tasks: scheduled_task = {} scheduled_task.update(task["request"]) del task["request"] scheduled_task.update(task) scheduled_task["worker"] = worker scheduled_tasks.append(scheduled_task) return scheduled_tasks But it hangs forever on dump = i.scheduled(). Strange, because otherwise everything works. Using Ubuntu 10.04, django 1.0 and virtualenv.

    Read the article

  • How should I go about learning Python?

    - by user345690
    I am currently learning PHP and want to learn about OOP. *1.*I know Python is a well-organized and is all OOP, so would learning Python be a wise choose to learn OOP? The thing is I am more towards web development then just general programming, and I know Python is just a general purpose language, but there is Django. *2*So how should I go about learning Python if I am lending towards web development? Is there any good books/websites that help me learn Python for web development? 3. Is there any free webhosting companies that allow Python? I never used Python before, only PHP, and not sure how it works? Can I run Python on a localhost?

    Read the article

  • listing objects from ManyToManyField

    - by Noam Smadja
    i am trying to print a list of all the Conferences and for each conference, print its 3 Speakers. in my template i have: {% if conferences %} <ul> {% for conference in conferences %} <li>{{ conference.date }}</li> {% for speakers in conference.speakers %} <li>{{ conference.speakers }}</li> {% endfor %} {% endfor %} </ul> {% else %} <p>No Conferences</p> {% endif %} in my views.py file i have: from django.shortcuts import render_to_response from youthconf.conference.models import Conference def manageconf(request): conferences = Conference.objects.all().order_by('-date')[:5] return render_to_response('conference/manageconf.html', {'conferences': conferences}) there is a model named conference. which has a class named Conferences with a ManyToManyField named speakers i get the error: Caught an exception while rendering: 'ManyRelatedManager' object is not iterable with this line: {% for speakers in conference.speakers %}

    Read the article

  • integrate / build 'weather radar' widget

    - by zack
    I'm looking to integrate a 'weather radar' widget into a site I'm building. The only available resource I can find is: http://www.meteoonline.co.uk/gadgets/Europe/Netherlands/135 which basically delivers a flash mov in a iframe ! urrrgh! - and 'permission denied' of course with any javascript interaction on the iframe.. Can anyone suggest an alternative resource / or approach ? I'm happy to work with the raw data if I can get it .. any ideas welcome ! site is like [ html5 + jquery on django ]

    Read the article

  • Developing a high-performance, scalable Comet application

    - by Rob
    Well, the title says most of it. I'm looking to develop a chat application that will hopefully become something more, and currently I'm considering my options for what I should build it on top of. I've taken a look at Tornado with Redis as my primary option - Tornado, being a Comet server, is perfect for long polling to retrieve the messages on Redis, which I have the intention of using as both a persistent data store, as well as a message queue with its nifty subpub features. However, I've also heard good things about Django, RabbitMQ, MongoDB and Orbited. JavaScript isn't a big problem for me, so Orbited's JavaScript support isn't too much of a boon. Really, I'd probably be happy to develop on the route I've chosen for myself, but if there are any gaping deficiencies in my plan, I'd like some kind person to point them out before I find I've wasted months on this.

    Read the article

  • Can't store Data URI to database without stripping + characters

    - by citizencane
    I am trying to grab a reference to images with src's in URI scheme. An example would be the images on google.com/news. if I alert(escape(saveObj.image)); I get something like below: data%3Aimage/jpeg%3Bbase64%2C/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABQAFADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgIDBAUHAQAI/8QAPhAAAgECBAMFBgIGCwEAAAAAAQIDBBEABRIhEzFhBkFRcYEUIjKRobFCwRUjJFKC0QcWJSZiY3Jzg7Lw4f/EABoBAAIDAQEAAAAAAAAAAAAAAAMEAAIFBgH/xAAmEQABBAEEAQMFAAAAAAAAAAABAAIDESEEEjFBBRMisVFhcZGh/9oADAMBAAIRAxEAPwAr7L5pD2gyY5JXEtLGAFY/EU2sR1U2+nXF/pZFKuffViGPW5ximQUEz1cNdPNKms6g8TlWBufDcHyxsdLUmqoYqhiWZ1BYtsSe+/ I pass that from the js file and am using django to get that into a mysql table of type utf8_unicode_ci using modelform.save, but when i examine what's in the database, I see: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABQAFADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgIDBAUHAQAI/8QAPhAAAgECBAMFBgIGCwEAAAAAAQIDBBEABRIhEzFhBkFRcYEUIjKRobFCwRUjJFKC0QcWJSZiY3Jzg7Lw4f/EABoBAAIDAQEAAAAAAAAAAAAAAAMEAAIFBgH/xAAmEQABBAEEAQMFAAAAAAAAAAABAAIDESEEEjFBBRMisVFhcZGh/9oADAMBAAIRAxEAPwAr7L5pD2gyY5JXEtLGAFY/EU2sR1U2 nXF/pZFKuffViGPW5ximQUEz1cNdPNKms6g8TlWBufDcHyxsdLUmqoYqhiWZ1BYtsSe The key difference is that in my database all of the '+' characters from the original have been stripped and replaced with spaces. Any ideas? I'm going blind trying to figure this out! :P

    Read the article

  • How do I get User.message_set messages to show up for the built in test client?

    - by Conley Owens
    I'm aware that the old Django messages framework is deprecated, but I still would like to know the answer to this. When I go to a certain url to my broswer, a message is created, I am redirected to a different page, and I see the message correctly displayed by my template. When the test client goes to the same url, the message is created, it gets a redirect, and after following the redirect there are no messages. However, no messages appear in the response (the response gotten from following the redirect). Why not?

    Read the article

  • Unit testing task queues in AppEngine

    - by Swizec Teller
    For a very long time now I've been using task queues on AppEngine to schedule tasks, just the way I'm supposed to. But what I've always been wondering is how does one write tests for that? Until now I've simply made tests to make sure an error doesn't occur on the API that queues a task and then wrote the more proper tests for the API executing the task. However lately I've started feeling a bit unsatisfied by this and I'm searching for a way to actually test that the correct task has been added to the correct queue. Hopefully this can be done better than simply by deploying the code and hoping for the best. I'm using django-nonrel, if that has any bearing on the answer. To recap: How can a unit test be written to confirm tasks have been queued?

    Read the article

  • CSRF verification failed, but only with Facebook App

    - by dkgirl
    I am creating a Facebook App using Django. When I access my webpage directly then it works fine. I have then added this webpage as the Facebook canvas URL, so that users are directed to this page when they go to the App. Now, when I enter the App, I get the "CSRF verification failed" error. I think it's because facebook is doing a POST, but without the CSRF token. However, I cannot control how Facebook redirects to my App. Anyone know how to deal with this? This is all my View does: def frontpage(request): return render_to_response('tube/frontpage.html', {"s": 'hello'}) and frontpage.html just writes "front page!"

    Read the article

  • How do I dynamically import a module in App Engine?

    - by Scott Ferguson
    I'm trying to dynamically load a class from a specific module (called 'commands') and the code runs totally cool on my local setup running from a local Django server. This bombs out though when I deploy to Google App Engine. I've tried adding the commands module's parent module to the import as well with no avail (on either setup in that case). Here's the code: mod = __import__('commands.%s' % command, globals(), locals(), [command]) return getattr(mod, command) App Engine just throws an ImportError whenever it hits this. And the clarify, it doesn't bomb out on the commands module. If I have a command like 'commands.cat' it can't find 'cat'.

    Read the article

  • Website/App on Dotcloud is down

    - by user1576866
    The website is nhslhs.tk . The last time I edited something was four days ago. I tried to get a calendar on the Django datable, but deleted it all and never actually pushed it to the Dotcloud server. Also, few hours before that I was able to update HTML files, push them, and see the edits on the website. The link should take you to a log-in page (this is available when you google "nhslhs.tk" and click cache view) but it takes you to a search magnified advertisement-esque page. On a few sites, people claimed the error was due to a Trojan horse virus or server being down. Do you know how to fix this? Thanks!

    Read the article

  • Extracting fixture for one specific object

    - by emostar
    I want to extract the necessary code to recreate a set of Models from my production environment to my testing environment. There is something wrong in the data that causes an Exception, and I need the data in my local environment to do debugging. I looked at django-extensions and the dumpscript command is almost what I want. But I have many other objects connected to this one via foreign keys. Is there an easy way to extract the object by primary key, and all other objects that are related to it?

    Read the article

  • Giving users a "reputation system" - Should I... ?

    - by RadiantHex
    Hi folks, I'm thinking of adding a reputation system to a web application, the site is already being used so I'm trying to be careful about my choices. I'm developing in Django/Python, thought this would be important. Reputation is generated in all actions that contribute to the site, similar to Stackoverflow's system. I know there are literally millions of ways of implementing this, and this is why I feel quite lost. Two alternatives I am not sure about are: Keep track of reasons why reputation was incremented Ignore reasons in order to reduce complexity of the site and overhead Would be happy with a few pointers, and directions. Would be very much appreciated!

    Read the article

  • filter queryset based on list, including None

    - by jujule
    Hi all I dont know if its a django bug or a feature but i have a strange ORM behaviour with MySQL. class Status(models.Model): name = models.CharField(max_length = 50) class Article(models.Model) status = models.ForeignKey(status, blank = True, null=True) filters = Q(status__in =[0, 1,2] ) | Q(status=None) items = Article.objects.filter(filters) this returns Article items but some have other status than requested [0,1,2,None] looking at the sql query : SELECT [..] FROM `app_article` LEFT OUTER JOIN `app_status` ON (`app_article`.`status_id` = `app_status`.`id`) WHERE (`app_article`.`status_id` IN (1, 2) OR `app_status`.`id` IS NULL) ORDER BY [...] the OR app_status.id IS NULL part seems to be the cause. if i change it to OR app_article.status_id IS NULL it works correctly. How to deal with this ? Thanx.

    Read the article

  • Same question to multiple remote users with different login

    - by user562802
    Hello all, This is my first post to Stack Overflow so apologies if I chosen wrong words for the title. I am very new to Google App Engine and python. I am building a web application using Pyhton and Django which is question and multiple answers type. Once the users are login to website,they will be provided with random questions from datastore. What my requirement is if certain users want to form group so that they all can get the same set of random questions to answer,is this possible ? Without forming the group each user are getting different random questions on their end. Thanks, Sunil

    Read the article

  • How do I implement jQuery image cycle loops on rollover for multiple thumbnail sets on a page?

    - by Kendrick Ledet
    Here is the Javascript I currently have <script type="text/javascript"> $(function() { $('.slideshow').hover( function() { $('.slides').cycle('resume'); }, function() { $('.slides').cycle('pause'); } ); $('.slides').cycle({ fx: 'fade', speed: .3, timeout: 280, next: '#next', prev: '#prev' }).cycle("pause"); }); </script> It works; but the thing is it works for all thumbnail sets on the page, and whenever I mouseover on one set of images, every other set of images loops as well. I do see that this is because I'm targeting classes, but my jQuery experience is quite limited so I have no idea how to only target a single instance of each class without effecting the others, and I can't go in and hardcode id's because my thumbnails and amount of videos on each page are determined dynamically via this Django template. http://pastebin.com/nf42bSAx I would greatly appreciate any help, as this is essential for my project (open source media platform). Thank you.

    Read the article

  • How do I rewrite a request by hostname unless it is a specified value?

    - by Tim
    My app will have a regular domain - let's say example.com - which will have information about logging in, signing up, etc. It will also host numerous other domains dynamically. My app serves the webpage for these at http://example.com/site/foobar.com/ So, I need to redirect all requests where the hostname is not example.com to /site/[hostname]/ I'm writing this in Django and hosting with Apache. How do I set up a rewrite rule to do this? The user must not know they are on any other site but foobar.com and if the user browses to foobar.com/something - the URL must be rewritten to /site/foobar.com/something

    Read the article

  • Looking for python lib to manage remote tasks

    - by Riz
    Hi, I have server with django on it, this server runs some manage.py commands and update database. Now I need to move some of this tasks to different servers. I don't want to allow remote db access and need some tool\lib to be able to start task on remote servers by main server's command and update tasks code/add new tasks. I have ssh access to every server, all servers run under debian and all code in python. I was thiking about creating my own xmpp based solution(server sends messages to slave servers with commands to execute, like "update task", "run task"), or maybe some low-level ssh based solution where main server logs to slave servers and executes bash commands. But I would be happy to hear any advices.

    Read the article

  • Reverse Search Best Practices?

    - by edub
    I'm making an app that has a need for reverse searches. By this, I mean that users of the app will enter search parameters and save them; then, when any new objects get entered onto the system, if they match the existing search parameters that a user has saved, a notification will be sent, etc. I am having a hard time finding solutions for this type of problem. I am using Django and thinking of building the searches and pickling them using Q objects as outlined here: http://www.djangozen.com/blog/the-power-of-q The way I see it, when a new object is entered into the database, I will have to load every single saved query from the db and somehow run it against this one new object to see if it would match that search query... This doesn't seem ideal - has anyone tackled such a problem before?

    Read the article

  • Efficient job progress update in web application

    - by Endru6
    Hi, Creating a web application (Django in my case, but I think the question is more general) that is administrating a cluster of workers doing queued jobs, there is a need to track each jobs progress. When I've done it using database UPDATE (PostgreSQL in this case), it severely hits the database performance, because each UPDATE creates a new row in a table, and in my case only vacuuming DB removes obsolete rows. Having 30 jobs running and reporting progress every 1 minute DB may require vacuuming (and it means huge slow downs on a front end side for all the employees working with the system) every 10 days. Because the progress information isn't critical, ie. it doesn't have to be persistent, how would you do the progress updates from jobs without using an overhead database implies? There are 30 worker servers, each doing 1 or 2 jobs simultaneously, 1 front end server which serves a web application to users, and 1 database server.

    Read the article

  • How do I get broadcast to work with djcelery+ghettoq

    - by user560833
    I am using djcelery 2.1.4 with ghettoq 0.4.5 and django 1.2.3 and I am able to run tasks all day long, but when I try to use any broadcast functionality it fails without errors. Take the simplest case -- I run celeryd: python manage.py celeryd The daemon starts and I try to run a ping: >>> from celery.task.control import ping >>> ping() [] I can see the message that ping created appear in the database, but apparently none of the nodes are picking it up? Am I doing something wrong here? Does broadcast not work with carrot?

    Read the article

  • Access to related Objects inside a model propery

    - by aliem
    Hi, I just run into some problems with django models. Example code is better than any word: class Cart(models.Model): updated_at = models.DateTimeField(auto_now=True) created_at = models.DateTimeField(auto_now_add=True) def __unicode__(self): return u'date %s;'%(self.created_at) def __str__(self): return self.__unicode__() def _total_items(self): """ Totale n di oggetti """ a = 0 for i in self.items.all: a += i.quantity return a total_items = property(_total_items) class Item(models.Model): cart = models.ForeignKey(Cart) quantity = models.PositiveIntegerField() def __unicode__(self): return u'product %s'%(self.id) def __str__(self): return self.__unicode__() but, when i call the cart property here's what i get in the python console: >>> a.total_items Traceback (most recent call last): File "<console>", line 1, in <module> File "models.py", line 49, in _total_items for i in self.item_set.all: TypeError: 'RelatedManager' object is not callable

    Read the article

< Previous Page | 118 119 120 121 122 123 124 125 126 127 128 129  | Next Page >