Search Results

Search found 85 results on 4 pages for 'radianthex'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Timezones and the DateTimeField - Django

    - by RadiantHex
    Hi folks, I'm trying to implement a "time ago" feature, for the displaying of items on a site. As I'm caching the pages I wish to use javascript in order to render the "time ago". Javascript knows local time and problably the Timezone of the local machine so I could play with that, but that would require to hard code the server's timezone. Therefore I'm trying to figure out a simple way to pass a ISO 8601 timestamp, in GMT time. Is there any simple and straight forward way for doing this? Help would be much appreciated! =)

    Read the article

  • Is there an OR filter? - Django

    - by RadiantHex
    Hi folks, is there any way of doing the following Unicorn.objects.or_filter(magical=True).or_filter(unicorn_length=15).or_filter(skin_color='White').or_filter(skin_color='Blue') where or_filter stands for an isolated match I remember using something similar but cannot find the function anymore! Help would be great! Thanks :)

    Read the article

  • Matching 3 out 5 fields - Django

    - by RadiantHex
    Hi folks, I'm finding this a bit tricky! Maybe someone can help me on this one I have the following model: class Unicorn(models.Model): horn_length = models.IntegerField() skin_color = models.CharField() average_speed = models.IntegerField() magical = models.BooleanField() affinity = models.CharField() I would like to search for all similar unicorns having at least 3 fields in common. Is it too tricky? Or is it doable?

    Read the article

  • DNS servers and load balancing

    - by RadiantHex
    Hi there! I'm wondering if a simple DNS server could offer, even a limited amount, of load balancing capability. I have a couple of servers and I've been told that multiple IPAddresses can be associated with one domain. Help would be very much appreciated!

    Read the article

  • Opening SSL URLs with Python

    - by RadiantHex
    Hi folks, I'm using mechanize to navigate pages, it works pretty well. Unfortunately I have a random error come up, by random I mean it occasionally appears. URLError at /test/ urlopen error [Errno 1] _ssl.c:1325: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac I really need help on this one :) any ideas?

    Read the article

  • Django admin urls return INVALID REQUEST! - Django

    - by RadiantHex
    Hi folks, my admin urls are sat behind a prefix by doing the following. 1# (r'^admin/', include(admin.site.urls)), is placed within urls_core.py 2# (r'^api/', include('project.urls_core')), is palced within urls.py All admin URLs work fine except app indexes. If I go to any URL such as: /api/admin/core/ /api/admin/registration/ /api/admin/users/ /api/admin/filters/ I receive 'INVALID REQUEST' as my response. Status code is 200 (OK) though. I have never received this error message before. Does anyone have a clue? Thanks guys!

    Read the article

  • ItemSearch totally different from Amazon.com search - What am I doing wrong?

    - by RadiantHex
    I'm using ItemSearch in order to get a list of books ordered by 'salesrank' aka 'bestselling', problem is that the books that pop up for any BrowseNode are totally different from the Amazon list. Test Case Author:"J R R Tolkien", SearchIndex:"Books", Sort:"salesrank" Using the API: J.R.R. Tolkien Boxed Set (The Hobbit and The Lord of the Rings) The Hobbit: 70th Anniversary Edition The Lord of the Rings: 50th Anniversary, One Vol. Edition The Legend of Sigurd and Gudrun The Silmarillion The Lord of the Rings The Children of Hurin The Fellowship of the Ring: Being the First Part of The Lord of the Rings The Return of the King: Being the Third Part of The Lord of the Rings Using Amazon.com Adv. Search: The Lord of the Rings (Trilogy) The Hobbit J.R.R. Tolkien Boxed Set (The Hobbit and The Lord of the Rings) The Legend of Sigurd and Gudrun The Lord of the Rings: 50th Anniversary, One Vol. Edition The Silmarillion The Fellowship of the Ring The Children of Hurin Lord of the Rings, The Return of the King, The (Vol 3) Help would very much appreciated

    Read the article

  • Connection problems - Celery/Django

    - by RadiantHex
    Hi folks, long night... can't get my second Celery/RabbitMQ setup run to work. step 1 sudo rabbitmq-server runs: ok! step 2 python manage.py celeryd -l info error: [2010-12-28 03:38:24,690: ERROR/MainProcess] CarrotListener: Connection Error: Socket closed. Trying again in 28 seconds... I have definitely: added rabbitmq user and vhost updated the Django setings.py Edit: I think it might have to with installing from a .deb instead of apt-get. After uninstalling the deb and installing the apt-get version I get this: invoke-rc.d: initscript rabbitmq-server, action "start" failed. dpkg: error processing rabbitmq-server (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: rabbitmq-server E: Sub-process /usr/bin/dpkg returned an error code (1) Any ideas on how I could debug this? :|

    Read the article

  • Parsing special strings within a text (eg. "%var%") ?

    - by RadiantHex
    Hi, I am supplying a Javascript function strings with commands (SVG path commands): eg. "move 10 10 line 50 50" move and line are commands numbers are x, y coordinates I would like to add special strings to these commands, that would instruct the function to use specific variables eg. "move %mouseX%+1 %mouseY%+1" where %mouseX% and %mouseY% would be the mouse x,y coordinates How can I parse and replace these?

    Read the article

  • Defining the context of a word - Python

    - by RadiantHex
    Hi folks, I think this is an interesting question, at least for me. I have a list of words, let's say: photo, free, search, image, css3, css, tutorials, webdesign, tutorial, google, china, censorship, politics, internet and I have a list of contexts: Programming World news Technology Web Design I need to try and match words with the appropriate context/contexts if possible. Maybe discovering word relationships in some way. Any ideas? Help would be much appreciated!

    Read the article

  • Does python import all the listed libraries? - Python

    - by RadiantHex
    Hi folks, I'm just wondering, I often have really long python files and imports tend to stack quite quickly. PEP8 says that the imports should always be written at the beginning of the file. Do all the imported libraries get imported when calling a function coded in the file? Or do only the necessary libraries get called? Does it make sense to worry about this? Is there no reason to import libraries within the functions or classes that need them?

    Read the article

  • Mod_wsgi versus fapws3 - Django

    - by RadiantHex
    Hi folks, is there a difference between using FAPWS3 and MOD_WSGI when dealing with Django? FAPWS3 seems alot faster when serving requests toward Python scripts. I would like to know if I'm missing out anything. :) Any ideas?

    Read the article

  • Popularity Algorithm - SQL / Django

    - by RadiantHex
    Hi folks, I've been looking into popularity algorithms used on sites such as Reddit, Digg and even Stackoverflow. Reddit algorithm: t = (time of entry post) - (Dec 8, 2005) x = upvotes - downvotes y = {1 if x > 0, 0 if x = 0, -1 if x < 0) z = {1 if x < 0, otherwise x} log(z) + (y * t)/45000 I have always performed simple ordering within SQL, I'm wondering how I should deal with such ordering. Should it be used to define a table, or could I build an SQL with the ordering within the formula (without hindering performance)? I am also wondering, if it is possible to use multiple ordering algorithms in different occasions, without incurring into performance problems. I'm using Django and PostgreSQL. Help would be much appreciated! ^^

    Read the article

  • Keeping track of changes - Django

    - by RadiantHex
    Hi folks!! I have various models of which I would like to keep track and collect statistical data. The problem is how to store the changes throughout time. I thought of various alternative: Storing a log in a TextField, open it and update it every time the model is saved. Alternatively pickle a list and store it in a TextField. Save logs on hard drive. What are your suggestions?

    Read the article

  • CeleryCAM not working... - Django/Celery

    - by RadiantHex
    Hi folks, celery works wonderfully! :) e.g. results are returned with no problems! Unfortunately celerycam does not: This is what my panel looks like, celeryev looks the same. NB: all those tasks have been completed succesfully, they are just not showing as completed, and the names are not showing either. I'm usingthe following commands: python manage.py celeryd -l info -E python manage.py celerycam My BROKER is RabbitMQ My DATABASE is MongoDB Django, Celery and RabbitMQ are running on a clean Ubuntu 10 install. Any ideas folks? Would be amazing if someone could help me on this one :|

    Read the article

  • Recognizing language of a short text? - Python

    - by RadiantHex
    Hi folks, I'm have a list of articles, each article has its own title and description. Unfortunately, from the sources I am using, there is no way to know what language they are written. Also, text is not entirely written in 1 language; almost always English words are present. I reckon I would need dictionary databases stored on my machine, but it feels a bit unpractical. What would you suggest I do?

    Read the article

  • Can this be done with the ORM? - Django

    - by RadiantHex
    Hi folks, I have a few item listed in a database, ordered through Reddit's algorithm. This is it: def reddit_ranking(post): t = time.mktime(post.created_on.timetuple()) - 1134000000 x = post.score if x>0: y=1 elif x==0: y=-0 else: y=-1 if x<0: z=1 else: z=x return (log(z) + y * t/45000) I'm wondering if there is any clever way of using Django's ORM, in order to UPDATE the models in bulk. Without doing this: items = Item.objects.filter(created_on__gte=datetime.now()-timedelta(days=7)) for item in items: item.reddit_rank = reddit_rank(item) item.save() I know about the F() object, but I can't figure out if this function can be performed inside the ORM. Any ideas? Help would be very much appreciated!

    Read the article

  • Returning content directly from memcache - Django / HTTP Server

    - by RadiantHex
    Hi folks, I've built a web application with Django, I'm using Memcached in order to cache data. A few views cache the whole HttpResponse objects, therefore there might be a better alternative for returning the Memcached data other than going through Django. What could be faster alternatives for returning Memcached data on HTTP Requests ? I'm trying to make the operation as fast and lightweight as possible. Help would be much appreciated! :)

    Read the article

  • Anchor tags and target behaviour? - HTML

    - by RadiantHex
    Hi folks, I must say that despite this being a newb question, I don't think I have totally mastered HTML a tags. Whenever I want to open a link in a new tab I add target="_blank", works fine in chrome and firefox. Not in IE7-8. I think the behaviour might have something to do with the DOCTYPE, but I'm not entirely sure. I'm currently using HTML 4.01 Strict. Right now what I am trying to understand is: How to open links in new tabs in IE7-8 How to open links within small windows Help would be very much appreciated! :)

    Read the article

  • Website stress test in Python - Django

    - by RadiantHex
    Hi folks, I'm trying to build a small stress test script to test how quickly a set of requests gets done. Need to measure speed for 100 requests. Problem is that I wouldn't know how to implement it, as it would require parallel url requests to be called. Any ideas?

    Read the article

< Previous Page | 1 2 3 4  | Next Page >