Search Results

Search found 8 results on 1 pages for 'panchicore'.

Page 1/1 | 1 

  • wierd FileField url in admin site

    - by panchicore
    My model class TheFile(models.Model): document = models.FileField(upload_to="archivos") The wierd HTML admin link: <a hacking_google_maps_and_google_earth.pdf="" archivos="" media="" localhost:8000="" http:="" href="" target="_blank">archivos/Hacking_Google_Maps_And_Google_Earth.pdf</a> If I firebug-edit the href="" it works :S

    Read the article

  • weird FileField url in admin site

    - by panchicore
    My model class TheFile(models.Model): document = models.FileField(upload_to="archivos") The weird HTML admin link: <a hacking_google_maps_and_google_earth.pdf="" archivos="" media="" localhost:8000="" http:="" href="" target="_blank">archivos/Hacking_Google_Maps_And_Google_Earth.pdf</a> If I firebug-edit the href="" it works :S

    Read the article

  • downloading archives response corrupts files

    - by panchicore
    wrapper = FileWrapper(file("C:/pics.zip")) content_type = mimetypes.guess_type(result.files)[0] response = HttpResponse(wrapper, content_type=content_type) response['Content-Length'] = os.path.getsize("C:/pics.zip") response['Content-Disposition'] = "attachment; filename=pics.zip" return response pics.zip is a valid file with 3 pictures inside. server response the download, but when I am going to open the zip, winrar says This archive is either in unknown format or damaged! If I change the file path and the file name to a valid image C:/pic.jpg is downloaded damaged too. What Im missing in this download view?

    Read the article

  • about the post_save signal and created argument

    - by panchicore
    the docs says: post_save django.db.models.signals.post_save created A boolean; True if a -new- record was create. and I have this: from django.db.models.signals import post_save def handle_new_user(sender, instance, created, **kwargs): print "--------> save() "+str(created) post_save.connect(handle_new_user, sender=User) when I do in shell: u = User(username="cat") u.save() >>> --------> save() True u.username = "dog" u.save() >>> --------> save() True I expect a -------- save() False when I save() the second time because is an update? not?

    Read the article

  • how to delete memcached data with "filter" keys ?

    - by panchicore
    Hi, I just want to delete cached data, but I have many keys, for example: user_54_books user_54_movies user_54_comments user_54_foobar I can write $cache-delete('user_54_books'); but I have to do it with all "user_ID_objects", can I say to memcache, something like delete-('user_54_*'); ? how? thanks :)

    Read the article

1