Re: Deployment

2009-05-07 Thread varikin
On May 6, 11:23 am, joshuamckenty wrote: > I'm using Fabric for deployment of my django apps, and I quite like > it. It's still probably not as feature-rich as capistrano, but it's > written in python, has a *very* active community right now, and solves > the problems that

Re: please help with FileField(upload_to='foo')

2009-05-07 Thread varikin
On May 6, 9:30 am, djangomax wrote: > Thanks! So I just need to replace "forms" with "models and it'll work? Are you defining a model or are you creating a form? To really be able to answer that, the code around that one line would be helpful. The easy answer (but

Re: popping a bigger picture from thumbnail on hover..

2009-05-06 Thread varikin
I think you need to look at a Javascript library like jQuery, YUI, etc, for the popup. It isn't really a Django app, but having a Javascript popup on hover of an image. This is something that would most likely be in your template. --~--~-~--~~~---~--~~ You received

Re: Trouble with Django and jQuery

2009-02-06 Thread varikin
> > The external jQuery script doesn't go through Django, so obviously the > > template variables aren't parsed. As you have discovered, you can put > > javascript in the template so that it is parsed. So you already have > > the answer to your question: use a small script within your template,

Re: Getting uploaded file content type in model save

2009-02-05 Thread varikin
On Feb 4, 7:44 pm, Brian Morton wrote: > However, I am not sure how to get access to the > content type reported by the browser for the uploaded file in the > model save method.  Can you access the request from a model save in > the admin? You can get the content type

Re: Creating test databases. Nose framework

2009-01-28 Thread varikin
On Jan 27, 5:00 pm, Oleg Oltar wrote: > So if I have to store a User object in db (with fields (name, email, pass) > How should I define the fixture? Should I define it in setup? When I created my fixtures for my tests, I did ran[1] ./manage.py dumpdata auth >

Re: Testing uploads and content types

2009-01-23 Thread varikin
On Jan 23, 1:39 am, Julien Phalip wrote: > I have a view which processes a multi-part form and whose behaviour > varies depending on the content types of the uploaded files. I've > written some tests for that view as follows: > >         post_data = { >             'name1':

Re: Process file after upload

2009-01-08 Thread varikin
On Jan 7, 7:32 am, dmishe wrote: > Hey. > > I have FielField in my model for user to upload ZIP-archives. I want > to unpack that zip, place some files in some dirs and delete it just > after user uploaded it in admin. > > How can i do this? Model's save won't work because it

Re: Shouldn't blank=True imply null=True?

2009-01-07 Thread varikin
On Jan 7, 5:51 am, tofer...@gmail.com wrote: > On 07.01-09:47, Malcolm Tredinnick wrote: > [ ... ] > > > This thread is about whether blank=True, null=False (the fourth > > possibility) ever makes sense for non-text fields. > > answer is yes for any field type that accepts an empty string as

Re: Ad Management System

2008-11-24 Thread varikin
On Nov 23, 5:26 pm, Nick <[EMAIL PROTECTED]> wrote: > I'm exploring whether or not to use Django for redesigned website and > the only thing I haven't really been able to find out is whether there > is an existing, portable, robust solution for advertising management > on the site. This would

Re: serving static file via django

2008-11-19 Thread varikin
On Nov 19, 12:55 am, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Wed, Nov 19, 2008 at 1:54 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > yes..its just a transparent gif...i'm thinking of writing my own view, > > which will get the visitor data and then just call the static serve > >

Re: Beginner desperately seeking Django experts.

2008-11-15 Thread varikin
On Nov 15, 3:39 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-11-14 at 22:54 -0800, Innergy wrote: > > Thanks for reading my question.  I may not be asking all the right > > questions. > > > I am looking for a fast way to build a ecommerce site with many of the > > qualities

Re: saving multiple versions of an uploaded image

2008-11-04 Thread varikin
On Nov 4, 2:33 am, Chris Amico <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm trying to turn one uploaded image into several: a full-size and > thumbnail (and more, eventually). Here's the model I'm playing with, > just for testing: > > class TestPhoto(models.Model): >     "This is only for

Re: Why is my string not auto escaped?

2008-11-01 Thread varikin
On Oct 31, 8:28 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > > So if these built in filters are marking my strings safe, inspite of > > > > unsafe data being passed in, should they not handle escaping as well? > > > > The problem seems to be that your filter function doesn't mark itself >

Re: Migrate app from MySQL to PostgreSQL

2008-10-31 Thread varikin
On Oct 30, 1:57 pm, "Naitik Shah" <[EMAIL PROTECTED]> wrote: > I ran into issues with this approach as well - first uniqueness constraints > were failing, which I managed to fix manually. Next I got ContentType > matching query issues, which I have not fixed yet. > > I was hoping to come up

Re: Execute a java program

2008-10-31 Thread varikin
On Oct 30, 5:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi everyone I am newbie to django and I am italian so excuse me for my > english :P > I have to execute a java program very simple look something like this: > > public class Book { >     public static void main(String[] args)

Re: Why is my string not auto escaped?

2008-10-31 Thread varikin
On Oct 30, 6:58 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Oct 30, 1:30 am, shabda <[EMAIL PROTECTED]> wrote: > > > So if these built in filters are marking my strings safe, inspite of > > unsafe data being passed in, should they not handle escaping as well? > > The problem seems to be

Re: What does FieldFile._required_file() do?

2008-10-28 Thread varikin
On Oct 28, 10:05 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 10:31 PM, varikin <[EMAIL PROTECTED]> wrote: > > try: > >     object.photo._require_file() > > except ValueError: > >      #handle exception >

What does FieldFile._required_file() do?

2008-10-28 Thread varikin
I was looking at someone else's code and saw the following code: try: object.photo._require_file() except ValueError: #handle exception Where object is a model instance and photo is an ImageField attribute. Can someone tell me what _require_file() does? Here is the definition of it

Re: tinymce help

2008-10-26 Thread varikin
On Oct 25, 8:47 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote: > hi.  I'm using django 1.0 over at webfaction.  I have the following > setup > > /static   (serves js, css, flash, images etc) > /www   (my django app) > > I have tiny_mce loaded to /static/js/tiny_mce/ > > I have followed the steps

Re: File upload progress bar for Django?

2008-10-21 Thread varikin
On Oct 20, 6:15 pm, Sascha Brossmann <[EMAIL PROTECTED]> wrote: > > Is anyone > > familiar with a django or python tutorial that shows how to implement > > some kind of file upload progress bar? > > Sorry, but the main magic in those uploaders is done via flash, not > via js or php. AFAIK there

Re: rename or renaming a Django application

2008-10-16 Thread varikin
On Oct 15, 7:17 pm, coderb <[EMAIL PROTECTED]> wrote: > hi tim, thanks for the quick response. > > I will convert your bash commands to my (whisper) "windows" > equivalents to manually rename all instances. I have tools like > windows grep etc.. > Doing batch renames, search replaces etc ..

Re: Resizing images when uploading

2008-10-04 Thread varikin
On Oct 3, 4:18 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote: > Hi, I used to use a pre 1.0 svn version of Django. There I had this class: > > class Foto(models.Model): >     descripcion = models.CharField(max_length=30, blank=True, > verbose_name=u"descripción") >     imagen =

Re: Admin UI Problems

2008-10-03 Thread varikin
On Oct 2, 4:14 am, jordanwlee <[EMAIL PROTECTED]> wrote: > when installing django-cms make sure to COPY the > /projectname/media/admin/cms files (admin.css cmslayout.css > DateTimeShortcuts.js etc..) to > /django_trunk/django/contrib/admin/media/ > into a "cms" folder > so it looks like: >

Re: Django and CSS

2008-08-28 Thread varikin
MEDIA_ROOT is the local path to the files on the server. One place this is used is with uploading files. So uploaded files will be placed in MEDIA_ROOT/some-upload-dir. I don't know about other uses, though. John --~--~-~--~~~---~--~~ You received this message

Re: Pre-populating an integer field with a count of model objects

2008-08-22 Thread varikin
On Aug 21, 11:29 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I have a column, 'position', which is a PositiveIntegerField, to allow > > my end-user to order records with. I would like to pre-populate the