Re: Expand FlatPage admin interface.

2012-01-01 Thread Elad Zucker
Thanks,
I already seen that articles. The main problem I am having with trying to
change the flatpage is that the flatpage is already registered. so I cant
re-register with a new admin modal. I have an error :

All I want to do is that when I access the FlatPage I would like to have an
aditional fields there.

Thanks,
Elad

On Sun, Jan 1, 2012 at 10:27 PM, Timothy Makobu  wrote:

> https://docs.djangoproject.com/en/1.3/releases/1.0-porting-guide/#the-admin
>
> On Sun, Jan 1, 2012 at 9:59 PM, Elad Zucker  wrote:
>
>> I am learning Django using the book "Practical Django Project". This
>> isn't such an old book but seems to be very out-dated in terms of django.
>> it Uses the old admin interface which I assume was replaced in version 1.0.
>>
>> To make a long story short, one of the example of the book is to add a
>> keyword items to a flatpage model. this is done by doing somthing like that
>> :
>> page = models.ForeignKey(FlatPage, edit_inline=models.STACKED,)
>>
>> Now, I am trying to do the same using the new admin interface but with no
>> luck. I can use admin.StackedInline but how do I associate it with the
>> flatpage model ?
>>
>> Hope I am clear here.
>>
>> Thanks,
>> Elad
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Need help in renaming template tags

2012-01-01 Thread CareerDhaba tech
Just bumping this up in case anyone can help.

Thanks,
Harshil

On Mon, Dec 26, 2011 at 7:31 PM, CareerDhaba tech wrote:

> Hey everyone,
>
> I am running into an issue where two third party apps easy_thumbnail and
> sorl_thumbnail are using the custom template tag called thumbnail. Hence, I
> am actually unable to use the tag at all. I would like to change it so that
> the template tag from sorl_thumbnail is renamed as sorl_thumbnail. A
> similar issue has cropped up before over on SO, but it hasn't been
> resolved. See here: http://bit.ly/sE64Tb
>
> I have created a templatetags module within one of my apps, and have tried
> a simple way to rename a registered tag as such:
>
> from django import template
> from sorl.thumbnail.templatetags import thumbnail
>
> register = template.Library()
>
> def do_sorl_thumbnail(parser, token):
> return thumbnail(parser, token)
>  register.tag('sorl_thumbnail', do_sorl_thumbnail)
>
> Do I need to write a compile function and a render function for this? Any
> help on this would be great.
>
> Thanks,
> Harshil
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache RewriteRule for django

2012-01-01 Thread Tiago de Souza Moraes
Hi Bob Kline,

May be that this link help you:
http://teago.futuria.com.br/tip/4/

Tiago

On Mon, Jan 2, 2012 at 12:39 AM, Bob Kline  wrote:
> I'm moving a django site to a shared hosting server, where I'll need
> to use fastcgi (the site on the original server is using mod_python,
> which isn't available on the shared hosting server).  I have found the
> instructions for setting this up, but it's not working.  I'm getting
> "The requested URL /appname/appname.fcgi/admin was not found on this
> server" (I'm using "appname" instead of the real name). The rewrite
> rule is:
>
> RewriteRule ^(.*)$ appname.fcgi/$1 [QSA,L]
>
> In light of this rule, which is taken straight from the Django Book,
> I'm not surprised by the error message.  All the other RewriteRules
> I've seen/used in the past put the requested resource in the query
> parameter; for example, Drupal uses
>
> RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
>
> which makes sense: Apache will load index.php and pass it "q=what-you-
> asked-for" but in the rule given above for django the forward slash in
> the replacement string is going to cause Apache to look for something
> that doesn't exist, instead of appname.fcgi, which does exist.
>
> Please tell me what I'm missing!
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
Tiago de Souza Moraes                       Skype & Gtalk teagom
Enviroment Linux                                 Debian and Ubuntu
Public profile
http://www.linkedin.com/pub/tiago-souza-moraes/32/130/599

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Apache RewriteRule for django

2012-01-01 Thread Bob Kline
I'm moving a django site to a shared hosting server, where I'll need
to use fastcgi (the site on the original server is using mod_python,
which isn't available on the shared hosting server).  I have found the
instructions for setting this up, but it's not working.  I'm getting
"The requested URL /appname/appname.fcgi/admin was not found on this
server" (I'm using "appname" instead of the real name). The rewrite
rule is:

RewriteRule ^(.*)$ appname.fcgi/$1 [QSA,L]

In light of this rule, which is taken straight from the Django Book,
I'm not surprised by the error message.  All the other RewriteRules
I've seen/used in the past put the requested resource in the query
parameter; for example, Drupal uses

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

which makes sense: Apache will load index.php and pass it "q=what-you-
asked-for" but in the rule given above for django the forward slash in
the replacement string is going to cause Apache to look for something
that doesn't exist, instead of appname.fcgi, which does exist.

Please tell me what I'm missing!

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject will NOT work.

2012-01-01 Thread Bart Nagel
At 2012-01-01 14:23:50 -0800, Chris Kavanagh wrote:
> On Jan 1, 4:44 am, Bart Nagel  wrote:
> > At 2012-01-01 01:12:27 -0800, Chris Kavanagh wrote:
> >
> > > On Dec 31 2011, 7:13 pm, Bart Nagel  wrote:
> > > > When I run that I get
> > > > 3 arguments: ['args.py', 'startproject', 'mysite']
> >
> > > > Paste your own output.
> >
> > > I get the same as you:
> >
> > > C:\Python27\Scripts>python args.py startproject mysite
> > > 3 arguements: ['args.py', 'startproject', 'mysite']
> >
> > What's with the spelling error?
> 
> LOL, well apparently I don't know how to spell 'argument'.
> 
> However, I still got the same output as you (except for correct
> spelling).
> 
> What exactly were we (you) looking for in this test??

I explained that in a previous post. Afraid I can't help you any 
further, though I'm glad you eventually got it working.

--bart

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Creating clean URLS

2012-01-01 Thread Lie Ryan

On 01/02/2012 07:53 AM, lankesh87 wrote:

I want my url to be free from parameters being passed.

I have handled the request in "twitter_after_auth" function of view
and

I am redirecting user to the new url "http://localhost/create_cr/";

but instead the url shows some additional parameters that I have
already handled.

something like below:-

"http://localhost/create_cr/?
oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"

I just want my url to be of something like below:-

"http://localhost/create_cr/";

please help..



What kind of redirect are you issuing (i.e. what is the HTTP status 
code)? Some kinds of redirects will command the browser to pass GET/POST 
parameters to the new URL since those redirect is meant to be issued 
when the request failed to be processed here but can be processed in the 
new URL.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject will NOT work.

2012-01-01 Thread Chris Kavanagh


On Jan 1, 4:44 am, Bart Nagel  wrote:
> At 2012-01-01 01:12:27 -0800, Chris Kavanagh wrote:
>
> > On Dec 31 2011, 7:13 pm, Bart Nagel  wrote:
> > > When I run that I get
> > > 3 arguments: ['args.py', 'startproject', 'mysite']
>
> > > Paste your own output.
>
> > I get the same as you:
>
> > C:\Python27\Scripts>python args.py startproject mysite
> > 3 arguements: ['args.py', 'startproject', 'mysite']
>
> What's with the spelling error?

LOL, well apparently I don't know how to spell 'argument'.

However, I still got the same output as you (except for correct
spelling).

What exactly were we (you) looking for in this test??

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Creating clean URLS

2012-01-01 Thread Charles Cossé
I had that occur at one point last night ... can't remember the
circumstance, but perhaps you are using a form?

On Sun, Jan 1, 2012 at 2:24 PM, Jonas Geiregat  wrote:

>
>
> > I want my url to be free from parameters being passed.
> >
> > I have handled the request in "twitter_after_auth" function of view
> > and
> >
> > I am redirecting user to the new url "http://localhost/create_cr/";
> >
> > but instead the url shows some additional parameters that I have
> > already handled.
>
> > something like below:-
> >
> > "http://localhost/create_cr/?
> > oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"
> >
> > I just want my url to be of something like below:-
> >
> > "http://localhost/create_cr/";
> >
>
> It would be interesting to see some part of the view code for further
> inspection of the problem.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
AsymptopiaSoftware|Software@theLimit
  http://www.asymptopia.org

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Skip upload of existing S3 Object

2012-01-01 Thread Ivo Brodien
Hi,

the form sends the picture to S3 and then S3 calls you on an URL which you 
specify with “ success_action_redirect”. This should point to an URL on your 
server where you then store the key/hash which will be provided in the URL.

Your code uses POST data but S3 will put the metadata in the URL (=GET) 
(bucket, key and etag)

So just make sure that your forms posts to S3 and you define the 
success_action_redirect URL.

I think you actually don’t need the S3StorageBackend since you are not storing 
anything or at least it does not actually pass your server.

hope that helps!

Cheers
Ivo


On Jan 1, 2012, at 12:25 , Chris Hasenpflug wrote:

> I have a model with an ImageField and am using django-storages
> S3BotoStorage backend. To reduce load on the server, I'm using
> Amazon's S3 Browser Upload functionality[1] to send images directly to
> S3. In order to create the model, my plan is have another view take
> the uploaded key and save a model instance of my image.  Currently my
> view code looks something like this:
> 
> def add_existing_image(request):
>...
>image_key = request.POST.get('image_key', None)
>im = default_storage.open(image_key)
>i = Image(image=im, owner=user)
> 
> However, this seems to re-save the image on S3. I was hoping that
> since I'm not directly reading the file it would not need to do so
> behind the scenes, but it is. Since the goal is to not incur that
> overhead, how should I go about creating model instances of these
> files that already exist in my storage?
> 
> [1] http://aws.amazon.com/articles/1434
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Creating clean URLS

2012-01-01 Thread Jonas Geiregat


> I want my url to be free from parameters being passed.
> 
> I have handled the request in "twitter_after_auth" function of view
> and
> 
> I am redirecting user to the new url "http://localhost/create_cr/";
> 
> but instead the url shows some additional parameters that I have
> already handled.

> something like below:-
> 
> "http://localhost/create_cr/?
> oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"
> 
> I just want my url to be of something like below:-
> 
> "http://localhost/create_cr/";
> 

It would be interesting to see some part of the view code for further 
inspection of the problem.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Creating clean URLS

2012-01-01 Thread lankesh87
I want my url to be free from parameters being passed.

I have handled the request in "twitter_after_auth" function of view
and

I am redirecting user to the new url "http://localhost/create_cr/";

but instead the url shows some additional parameters that I have
already handled.

something like below:-

"http://localhost/create_cr/?
oauth_token=SOME_VALUE&oauth_verifier=SOME_VALUE"

I just want my url to be of something like below:-

"http://localhost/create_cr/";

please help..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: USStateField default value

2012-01-01 Thread Erisa
Changing 'default' to 'initial' gives me an unexpected argument
'blank' error.  If I remove the blank=True attribute, there is no
error,
but the select box is absent from the form!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Expand FlatPage admin interface.

2012-01-01 Thread Timothy Makobu
https://docs.djangoproject.com/en/1.3/releases/1.0-porting-guide/#the-admin

On Sun, Jan 1, 2012 at 9:59 PM, Elad Zucker  wrote:

> I am learning Django using the book "Practical Django Project". This isn't
> such an old book but seems to be very out-dated in terms of django. it Uses
> the old admin interface which I assume was replaced in version 1.0.
>
> To make a long story short, one of the example of the book is to add a
> keyword items to a flatpage model. this is done by doing somthing like that
> :
> page = models.ForeignKey(FlatPage, edit_inline=models.STACKED,)
>
> Now, I am trying to do the same using the new admin interface but with no
> luck. I can use admin.StackedInline but how do I associate it with the
> flatpage model ?
>
> Hope I am clear here.
>
> Thanks,
> Elad
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Expand FlatPage admin interface.

2012-01-01 Thread Elad Zucker
I am learning Django using the book "Practical Django Project". This isn't
such an old book but seems to be very out-dated in terms of django. it Uses
the old admin interface which I assume was replaced in version 1.0.

To make a long story short, one of the example of the book is to add a
keyword items to a flatpage model. this is done by doing somthing like that
:
page = models.ForeignKey(FlatPage, edit_inline=models.STACKED,)

Now, I am trying to do the same using the new admin interface but with no
luck. I can use admin.StackedInline but how do I associate it with the
flatpage model ?

Hope I am clear here.

Thanks,
Elad

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Unable to display static content.

2012-01-01 Thread Babatunde Akinyanmi
Are you sure you read this?:
https://docs.djangoproject.com/en/1.3/ref/contrib/staticfiles/

>From my own experience, storing my static files in '/static/' never
works so I always create a separate folder for my static files and add
the path to STATICFILES_DIRS in my settings.

On 1/1/12, Chirdeep  wrote:
> Now I have changed the project structure to
>
> Project
> -webApp
> ---static
> -images
> -stylesheets
> -index.html
> ---templates
>
> I can browse to index.html inside static folder.
>
> http://127.0.0.1:8000/static/index.html
>
> For some reason, its adding the search-form to the URL for loading CSS
> and Images when I browse to http://127.0.0.1:8000/search-form/
>
> Firebug shows :
> http://127.0.0.1:8000/search-form/common.css
>
> Obviously then it won't find the resources.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
Sent from my mobile device

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: User-set domain-prefixes, i.e. myname.googlegroups.com

2012-01-01 Thread creecode
Hello Alec Taylor,

I've done something like this at one of my websites.

The basic steps I use are gather the info in a form.

On form submit the info goes into a website registration database and the 
user is sent a website creation confirmation email.

The user receives the email and clicks on the supplied confirmation link.

The user is informed that they will receive an email when their website has 
been created.

(The above should be familiar to those of you that have used James 
Bennett's django-registration.  It's basically the same mechanics but 
applied to website registration/creation.)

A cron job triggers once a minute and scans the website registration 
database, creating any confirmed pending website registration requests.

The cron job sets up a django environment and calls a series of custom 
django-admin commands that creates databases, django projects, apache 
configs, etc.

The DNS config for the domain is given a wildcard (*.googlegroups.com) 
address record and Apache is used to redirect to a default domain for any 
domain that isn't picked up by Apache's config files.

Toodle-looo
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0VvJsoARllkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "1054 unknown column..." in MySql5

2012-01-01 Thread Babatunde Akinyanmi
Its not a mysql problem but you really have to give a better
description of the problem so you can get quick and useful replies to
your question.

However:
Have you snycdb-ed?
Also, did you remove or add an attribute from a model class after
syncdb-ing? If you did, you have to manually drop the table and syncdb
again.

On 1/1/12, James Jang  wrote:
> Hi,
> I hope I get your good helps or advises.
>
> MY SYSTEM :   win7, python2.6, django-1.3.1, using development
> server(django), MySql5
>
> After making model class, "1054 unknown column...in field list."
> message is shown in admin page.
>
> Is this a MySql version issue? or?
>
> Thanks any.
>
>
> Happy New Year~
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
Sent from my mobile device

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Unable to display static content.

2012-01-01 Thread Chirdeep
Now I have changed the project structure to

Project
-webApp
---static
-images
-stylesheets
-index.html
---templates

I can browse to index.html inside static folder.

http://127.0.0.1:8000/static/index.html

For some reason, its adding the search-form to the URL for loading CSS
and Images when I browse to http://127.0.0.1:8000/search-form/

Firebug shows :
http://127.0.0.1:8000/search-form/common.css

Obviously then it won't find the resources.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



"1054 unknown column..." in MySql5

2012-01-01 Thread James Jang
Hi,
I hope I get your good helps or advises.

MY SYSTEM :   win7, python2.6, django-1.3.1, using development
server(django), MySql5

After making model class, "1054 unknown column...in field list."
message is shown in admin page.

Is this a MySql version issue? or?

Thanks any.


Happy New Year~

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django dev/deploy environment for distributed agile teams

2012-01-01 Thread creecode
Hello Ashkan,

Gunicorn can handle async from what I read < 
http://gunicorn.org/design.html >.  From the docs...


 Sync Workers  

The most basic and the default worker type is a synchronous worker class 
that handles a single request at a time. This model is the simplest to 
reason about as any errors will affect at most a single request. Though as 
we describe below only processing a single request at a time requires some 
assumptions about how applications are programmed.
 Async Workers  

The asynchronous workers available are based on 
Greenlets(via 
Eventlet  and Gevent ). Greenlets 
are an implementation of cooperative multi-threading for Python. In 
general, an application should be able to make use of these worker classes 
with no changes.
 Tornado Workers  

There's also a Tornado worker class. It can be used to write applications 
using the Tornado framework. Although the Tornado workers are capable of 
serving a WSGI application, this is not a recommended configuration.

Of course there may be other technical reason to not use Gunicorn but if 
you're looking for something that eases deployment, give it a go!

Toodle-l..
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/otf8gw9roOMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Happy new year

2012-01-01 Thread Timothy Makobu
+1

On Sun, Jan 1, 2012 at 8:28 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Happy new year everyone :)
>
> Lets hope 2012 is a great year for Django!!
>
>
> On Sun, Jan 1, 2012 at 8:58 AM, Daniel Ngarambe  wrote:
>
>> Hello Geeks,
>>
>> I wish you all a happy mew year.
>>
>> DNSr.
>>
>> Sent from Samsung Galaxy S
>> On 1 Jan 2012 08:24, "girish shabadimath" 
>> wrote:
>>
>>> New year wishes to everyone,,
>>>
>>> regards,
>>> girish ms
>>> On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma 
>>> wrote:
>>>
 Happy new year to all of you.


 On Sun, Jan 1, 2012 at 10:22 AM, yati sagade wrote:

> Happy new year all :)
>
>
> On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <
> adrien.lema...@aquasys.co.jp> wrote:
>
>> Happy new year dear folks !
>>
>> On Jan 1, 1:48 am, Sławomir Zborowski  wrote:
>> > Happy new year, Django users :-) !
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



 --
 Regards
 Nikhil Verma
 +91-958-273-3156


  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>
>>>
>>> --
>>> Girish M S
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django app for IP address lookup

2012-01-01 Thread Cal Leeming [Simplicity Media Ltd]
Nice little web app.

It would be great if you can put the source code on GitHub, so others may
benefit from this :)

Cal

On Sun, Jan 1, 2012 at 6:56 AM, Timothy Makobu
wrote:

> Thanks man. Happy new year!
>
>
> On Sun, Jan 1, 2012 at 9:33 AM, Addy Yeow  wrote:
>
>> Here you go:
>> http://dazzlepod.com/ip/8.8.8.8.json
>>
>> On Sat, Dec 31, 2011 at 10:14 PM, Timothy Makobu <
>> makobu.mwambir...@gmail.com> wrote:
>>
>>> Thanks.
>>>
>>> Do you have an API for it yet? so we can do something like
>>> http://dazzlepod.com/ip/api/json/1x7.x37.8.xx and get the data in JSON?
>>>
>>>
>>> On Sat, Dec 31, 2011 at 4:09 PM, yati sagade wrote:
>>>
 Nice app :) can you share the sources? And happy new year to you, too!


 On Sat, Dec 31, 2011 at 5:20 PM, Addy Yeow  wrote:

> Hi guys,
>
> Just sharing a simple Django app that allows you to do IP address
> lookup:
> http://dazzlepod.com/ip/
>
> Happy new year!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Happy new year

2012-01-01 Thread Cal Leeming [Simplicity Media Ltd]
Happy new year everyone :)

Lets hope 2012 is a great year for Django!!

On Sun, Jan 1, 2012 at 8:58 AM, Daniel Ngarambe  wrote:

> Hello Geeks,
>
> I wish you all a happy mew year.
>
> DNSr.
>
> Sent from Samsung Galaxy S
> On 1 Jan 2012 08:24, "girish shabadimath" 
> wrote:
>
>> New year wishes to everyone,,
>>
>> regards,
>> girish ms
>> On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma 
>> wrote:
>>
>>> Happy new year to all of you.
>>>
>>>
>>> On Sun, Jan 1, 2012 at 10:22 AM, yati sagade wrote:
>>>
 Happy new year all :)


 On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <
 adrien.lema...@aquasys.co.jp> wrote:

> Happy new year dear folks !
>
> On Jan 1, 1:48 am, Sławomir Zborowski  wrote:
> > Happy new year, Django users :-) !
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
  --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>
>>>
>>> --
>>> Regards
>>> Nikhil Verma
>>> +91-958-273-3156
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>> Girish M S
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Skip upload of existing S3 Object

2012-01-01 Thread Chris Hasenpflug
I have a model with an ImageField and am using django-storages
S3BotoStorage backend. To reduce load on the server, I'm using
Amazon's S3 Browser Upload functionality[1] to send images directly to
S3. In order to create the model, my plan is have another view take
the uploaded key and save a model instance of my image.  Currently my
view code looks something like this:

def add_existing_image(request):
...
image_key = request.POST.get('image_key', None)
im = default_storage.open(image_key)
i = Image(image=im, owner=user)

However, this seems to re-save the image on S3. I was hoping that
since I'm not directly reading the file it would not need to do so
behind the scenes, but it is. Since the goal is to not incur that
overhead, how should I go about creating model instances of these
files that already exist in my storage?

[1] http://aws.amazon.com/articles/1434

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Getting children of an ABC

2012-01-01 Thread Knight Samar
I am using Django 1.3.1 and I have the following piece of models:

class masterData(models.Model):
uid = models.CharField(max_length=20,primary_key=True)

class Meta:
abstract = True;

class Type1(masterData):
 pass;

class Type2(masterData):
 pass;

Now, I am trying to get a list of all child classes of masterData. I
have tried:

masterData.__subclasses__()

The very interesting thing that I found about the above is that it
works flawlessly in *python manage.py shell* and does NOT work at all
when running the webserver!

So how do I get the models derived from an Abstract Base Class model ?

Regards,
Samar

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Happy new year

2012-01-01 Thread Daniel Ngarambe
Hello Geeks,

I wish you all a happy mew year.

DNSr.

Sent from Samsung Galaxy S
On 1 Jan 2012 08:24, "girish shabadimath"  wrote:

> New year wishes to everyone,,
>
> regards,
> girish ms
> On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma wrote:
>
>> Happy new year to all of you.
>>
>>
>> On Sun, Jan 1, 2012 at 10:22 AM, yati sagade wrote:
>>
>>> Happy new year all :)
>>>
>>>
>>> On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <
>>> adrien.lema...@aquasys.co.jp> wrote:
>>>
 Happy new year dear folks !

 On Jan 1, 1:48 am, Sławomir Zborowski  wrote:
 > Happy new year, Django users :-) !

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To post to this group, send email to django-users@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.


>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>> Nikhil Verma
>> +91-958-273-3156
>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Girish M S
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



User-set domain-prefixes, i.e. myname.googlegroups.com

2012-01-01 Thread Alec Taylor
Good morning,

I want to integrate user-set domain-prefixes to the registration
process of my site.

Sample form:

Username: []
Name: []
Password: []
Email: []
Domain prefix: [].googlegroups.com

How would I go about doing this in Django? — I suspect there would be
some facets of this (i.e. DNS) outside the scope of Django, but there
would be a good portion of it possible within Django.

Thanks for all suggestions,

Alec Taylor

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django dev/deploy environment for distributed agile teams

2012-01-01 Thread Ashkan Roshanayi
Thanks Denis, I am not sure about using Gunicorn. Actually am thinking about a 
more async, non-blocking platform maybe using Tornado. What do you think?

Cheers,

On 11 Dey, 1390, at 12:53 AM, Denis Darii wrote:

> Hi Ashkan,
> 
> You can take a look at our project: django-fagungis = DJANGO + FAbric + 
> GUnicorn + NGInx + Supervisor deployment
> Here: https://bitbucket.org/DNX/django-fagungis/
> We use it for the same purpose as you described.
> If you have some questions, suggestions or ideas about and for the project 
> feel free to open an issue on bitbucket.
> 
> Happy new year to all!
> 
> 
> On Sat, Dec 31, 2011 at 8:11 PM, Paul Msegeya  wrote:
> sounds good...Happy new year too.
> 
> 
> On Sat, Dec 31, 2011 at 10:25 PM, Ashkan Roshanayi 
>  wrote:
> Hi everybody, we are working in a geographically distributed agile team. I am 
> trying to design and configure our development environment and deployment 
> procedures and need to know about your valuable experiences. My requirements 
> are:
> 
> * Each new developer can kick-start developing: dev environment and all 
> installs/configs (python related) should be achievable in 15 minutes. This 
> procedure should be automated and repeatable.
> 
> * Everybody can pull & build whole project locally and run complete 
> *functional* test suite
> 
> * Upon pushing code in our Github repo, it will be pulled out by our 
> build/staging server automatically --> all *functional* & *non-functional* 
> tests will be run by Jenkins --> if successful: we can test it manually on 
> this server too.
> 
> * Admins can choose some features or profiles on this staging server and 
> deploy them to live (production) server by ideally executing a script
> 
> 
> I've read a lot about virtualenv, pip, fabric, puppet, chef & blueprint and 
> used some of them but want to hear more about your recommendations, best 
> practices and potential pitfalls. Appreciate it very much.
> 
> Happy new year :)
> 
> --
> Ashkan
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> 
> -- 
> This e-mail and any file transmitted with it is intended only for the person 
> or entity to which is addressed and may contain information that is 
> privileged, confidential or otherwise protected from disclosure. Copying, 
> dissemination or use of this e-mail or the information herein by anyone other 
> than the intended recipient is prohibited. If you are not the intended 
> recipient, please notify the sender immediately by return e-mail, delete this 
> communication and destroy all copies.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Multiple access to static data

2012-01-01 Thread francescortiz
If you are sending a 2mb json on every action and there are only about
40 nutrients per food, either I am missing a point or something is
really wrong about your logic.

On Dec 3 2011, 12:34 pm, mf  wrote:
> I'm building an application and I'm having trouble making a choice
> about how is the best way to access multiple times to static data in a
> django app. My experience in the field is close to zero so I could use
> some help.
>
> The app basically consists in a drag & drop of foods. When you drag a
> food to a determined place(breakfast for example) differents values
> gets updated: total breakfast calories, total day nutrients(Micro/
> Macro), total day calories, ...That's why I think the way I store and
> access the data it's pretty important performance speaking.
>
> This is an excerpt of the json file I'm currently using:
>
> foods.json
>
> {
> "112": {
>     "type": "Vegetables",
>     "description": "Mushrooms",
>     "nutrients": {
>         "Niacin": {
>             "unit": "mg",
>             "group": "Vitamins",
>             "value": 3.79
>         },
>         "Lysine": {
>             "units": "g",
>             "group": "Amino Acids",
>             "value": 0.123
>         },
>         ... (+40 nutrients)
>     "amount": 1,
>     "unit": "cup whole",
>     "grams": 87.0 }
>  }
>
> I've thought about different options:
>
> 1) JSON(The one I'm currently using):
>
> Every time I drag a food to a "droppable" place, I call a getJSON
> function to access the food data and then update the corresponding
> values. This file has a 2mb size, but it surely will increase as I add
> more foods to it. I'm using this option because it was the most
> quickest to begin to build the app but I don't think it's a good
> choice for the live app.
>
> 2) RDBMS with normalized fields:
>
> I could create two models: Food and Nutrient, each food has 40+
> nutrients related by a FK. The problem I see with this is that every
> time a food data request is made, the app will hit the db a lot of
> times to retrieve it.
>
> 3) RDBMS with picklefield:
>
> This is the option I'm actually considering. I could create a Food
> models and put the nutrients in a picklefield.
>
> 4) Something with Redis/Django Cache system:
>
> I'll dive more deeply into this option. I've read some things about
> them but I don't clearly know if there's some way to use them to solve
> the problem I have.
>
> Thanks in advance, Mariano.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Internationalization and localization

2012-01-01 Thread francescortiz
I always create multilingual sites. What I do is inspired by django-
modeltranslation, but I find awkward that it leaves a "default"
language field and I prefer to have all my fields defined inside my
models.

1. Create a field for each language and a function that returns the
field corresponding to the client language:

class MyModel(models.Model):
title_ca = models.CharField(max_length=255)
title_en = models.CharField(max_length=255)
title_es = models.CharField(max_length=255)
def title(self):
return getattr(self, 'title_%s' % get_language())

2. In templates call the fuction that detects the language:
{{object.title}}

2. Then, urls.py looks like this:
   (r'^$', 'home'),
(r'^(?P\w{2})/$', 'home'),

3. And views.py:

from myapp.utils import enable_language

def home(request, language=None):

# We don't want urls without language prefix in order to prevent
duplicate content
if language is None:
return
HttpResponseRedirect(reverse('isaweb.views.home',kwargs={'language':get_language()})
 )

enable_language(request, language)

return render_to_response('home.html',
{},context_instance=RequestContext(request))

4. This goes into utils.py:

def enable_language(request, language):
# Language only gets updated if it changed or is not set.
try:
if request.session['django_language'] != language:
request.session['django_language'] = language
translation.activate(language)
request.LANGUAGE_CODE = translation.get_language()
except KeyError:
request.session['django_language'] = language
translation.activate(language)
request.LANGUAGE_CODE = translation.get_language()




On Dec 7 2011, 3:14 am, kenneth gonsalves 
wrote:
> On Mon, 2011-12-05 at 19:00 -0800, rentgeeen wrote:
> > What I want to how to translate stuff from DB, all at django official
> > say is about static content, what I have only found is this:
>
> django-modeltranslation
> --
> regards
> Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django e-commerce logic

2012-01-01 Thread francescortiz
I've been looking around for django commerce sollutions for a while
and they all seem to work with predefined database models. For
instance, you always have a name field and a slug field that come with
the product. While this could seem fine if you are creating a store
form scratch, it makes it very uncomfortable if you already have a
model structure on a site and you just want to start selling one of
your models.

What I would feel more comfortable is to add a commerce layer to the
site and tell this layer how to obtain the product information, client
information, etc, or fallback to provided defaults, so it can fit in
any existing project without having to run data migrations of any
kind.

Do you know any django commerce that works like this?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Need help for using easy_thumbnails

2012-01-01 Thread francescortiz
I wrote a thumbnailing app myself:

https://github.com/francescortiz/image

The main advantages of this are:
- You set the center of attention for images through the admin
section. This way, when you crop your image it looks properly aligned,
whatever crop you do. This is the reason why I created it.
- Video thumbnails through ffmpeg
- Cached images can be exposed to public http docs, so you can have
rewrite rules to skip django when serving them.

Also:
- maks
- overlays
- thumbnails from urls (i.e: handle thumbnails for youtube videos)

On Dec 7 2011, 6:41 am, "Nibil M.S"  wrote:
> I am using Django Development trunk version on Fedora 15. I tried to enable
> the thumbnails option on my project followed by the instructions given 
> inhttps://github.com/SmileyChris/easy-thumbnails. But the thumbnail is not
> working. Only the image is loading. Please help to fix the problem.
> Attaching the bookpage.html file which uses this thumbnails. I have added
> the 'easy_thumbnails' in INSTALLED_APPS of settings.py
> --
> Nibil M.S
> 'Needam'
> Trithala.
>
>  bookpage.html
> < 1KViewDownload

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject will NOT work.

2012-01-01 Thread Bart Nagel
At 2012-01-01 01:12:27 -0800, Chris Kavanagh wrote:
> On Dec 31 2011, 7:13 pm, Bart Nagel  wrote:
> > When I run that I get
> >     3 arguments: ['args.py', 'startproject', 'mysite']
> >
> > Paste your own output.
> 
> I get the same as you:
> 
> C:\Python27\Scripts>python args.py startproject mysite
> 3 arguements: ['args.py', 'startproject', 'mysite']

What's with the spelling error?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django-admin.py startproject will NOT work.

2012-01-01 Thread Chris Kavanagh


On Dec 31 2011, 7:13 pm, Bart Nagel  wrote:
> At 2011-12-31 16:00:44 -0800, Chris Kavanagh wrote:
>
> > On Dec 31, 6:48 pm, Bart Nagel  wrote:
> > > Does this little script tell you correctly the number of arguments you
> > > pass to it?
>
> > Yes, it tells me the number of args.
>
> Okay, in that case the arguments should also be getting to the
> django-admin script. To give you the help message it must not be able
> to read the "startproject" argument, since the name of the project
> shouldn't matter to it. Perhaps something bad is happening to it,
> possibly due to the registry stuff you folks were talking about
> earlier, or some other Windows sorcery.
>
> Change args.py a little to this:
>
> import sys
> print "%d arguments: %s" % (len(sys.argv), sys.argv)
>
> And now run it with the arguments you were trying to give to
> django-admin:
>     python args.py startproject mysite
>
> When I run that I get
>     3 arguments: ['args.py', 'startproject', 'mysite']
>
> Paste your own output.
>
> --bart

I get the same as you:

C:\Python27\Scripts>python args.py startproject mysite
3 arguements: ['args.py', 'startproject', 'mysite']

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.