Re: Cheap Django hosting?

2012-01-02 Thread Alec Taylor
Try from this interface: https://groups.google.com/forum/#!forum/django-users

(it'll make you join, then you'll be able to send to that address
directly from your Inbox)

-- 
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: Cheap Django hosting?

2012-01-02 Thread ali alizadeh
hi.

sorry, but i'm new to this mailing list. can somebody tell me how can i
post a question?
i tried sending an email to "django-users@googlegroups.com" but i keep
receiving a failure notice.

On Tue, Jan 3, 2012 at 4:36 AM, Alec Taylor  wrote:

> Webfaction seems to be the best so far, offers lots of features, lots
> of space+memory and is around $6 a month.
>
> On Tue, Jan 3, 2012 at 8:34 AM, zzeus  wrote:
> > webfaction.com
> >
> > On 2 янв, 13:49, Alec Taylor  wrote:
> >> Good afternoon,
> >>
> >> I'm looking for some cheap Django hosting, to host all my test sites.
> >> My production sites will be have more expensive, more reliable, faster
> >> servers+sites; but it would be good to have a cheap host for
> >> prototypes.
> >>
> >> Know of a good one?
> >>
> >> 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.
> >
>
> --
> 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.



InlineModelAdmin show dropdown in Many to Many models

2012-01-02 Thread Enrique Juan de Dios
Hi everyone.
I'm newbie on Django and use Grappelli for admin site.
Files related: https://gist.github.com/1553188
When I use a one to many relation the admin shown this one:



But when I use many to many relation just had a drop down...



How I can transform the ugly drop down to a beautiful form like a one to 
many relation.

Thanks for your advice!

-- 
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/-/ZmEDwHbaO68J.
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: Using STATIC_URL in CSS/JS files?

2012-01-02 Thread Andres Reyes
If you're serving your media from the same domain as your CSS i'd use
relative paths

2012/1/2 Christophe Pettus :
>
> On Jan 2, 2012, at 5:56 PM, Victor Hooi wrote:
>> E.g. I have a CSS file that points to a PNG sprite, and I'd like a way to 
>> get it to point to {{ STATIC_URL}} without hardcoding the URL/path - any way?
>
> You can use Django to serve your CSS file if you want to, although you'll 
> want to cache the heck out of it for performance reasons.  There are also a 
> wide variety of tools which generate CSS from various input files to allow 
> for various kind of template expansion, and those might be a suitable 
> alternative.
>
> --
> -- Christophe Pettus
>   x...@thebuild.com
>
> --
> 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.
>



-- 
Andrés Reyes Monge
armo...@gmail.com
+(505)-8873-7217

-- 
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.



Introducing: pythonpackages.com

2012-01-02 Thread Alex Clark

Hi,

For the past two months I've been developing a service for developers 
and consumers of Python packages:


- http://pythonpackages.com

(And as a Django user, this service may be of interest to you).

Recently, we've added the ability for folks to login with their github 
account. This changes the landscape of the site from anonymous to 
personal, and with this change the creation of "profile pages" is now 
possible, e.g.:


- http://pythonpackages.com/user/nutjob4life

We've seen a fair amount of activity on the site by anonymous users, and 
with this change I envision a fair amount of github user activity. 
Toward that end, I would appreciate it if you would take a minute to 
login with your github account here (requires read only access) and give 
the service a try:


- http://pythonpackages.com/login

You can also browse recent package activity (via the PyPI API) here:

- http://pythonpackages.com/activity

Discuss packages here:

- http://pythonpackages.com/discuss

And read our site documentation here:

- http://pythonpackages-docs.readthedocs.org

Lastly, if you have any feedback please feel free to leave a comment here:

- http://pythonpackages.com/about

Or open a ticket here:

- https://bitbucket.org/pythonpackages/pythonpackages.com/issues/new


Thanks,


Alex


--
Alex Clark · http://pythonpackages.com

--
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: Using STATIC_URL in CSS/JS files?

2012-01-02 Thread Christophe Pettus

On Jan 2, 2012, at 5:56 PM, Victor Hooi wrote:
> E.g. I have a CSS file that points to a PNG sprite, and I'd like a way to get 
> it to point to {{ STATIC_URL}} without hardcoding the URL/path - any way?

You can use Django to serve your CSS file if you want to, although you'll want 
to cache the heck out of it for performance reasons.  There are also a wide 
variety of tools which generate CSS from various input files to allow for 
various kind of template expansion, and those might be a suitable alternative.

--
-- Christophe Pettus
   x...@thebuild.com

-- 
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.



Using STATIC_URL in CSS/JS files?

2012-01-02 Thread Victor Hooi
Hi,

In Django, you can use {{ STATIC_URL }} in your HTML templates to point to 
the correct path for static files, however I'm wondering if there's any way 
to use it inside of CSS/JS files?

E.g. I have a CSS file that points to a PNG sprite, and I'd like a way to 
get it to point to {{ STATIC_URL}} without hardcoding the URL/path - any 
way?

Cheers,
Victor

-- 
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/-/24ML6hwMPCAJ.
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/Data Base Advice

2012-01-02 Thread Victor Hooi
Hi,

Do you mean learning more about Django in general, or about the 
models.py/database portion specifically?

If you haven't done much web-development before, or used any MVC 
frameworks, I suggest you start by reading up on those - there's plenty of 
guides to that online.

In terms of learning database theory, I'd suggest either "Database Design 
for Mere Mortals" 
(http://www.amazon.com/Database-Design-Mere-Mortals-Hands/dp/0201694719), 
or "Database Design with UML and SQL" (http://www.tomjewett.com/dbdesign/).

Cheers,
Victor

-- 
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/-/kGmkW-Gk7I8J.
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: Cheap Django hosting?

2012-01-02 Thread Alec Taylor
Webfaction seems to be the best so far, offers lots of features, lots
of space+memory and is around $6 a month.

On Tue, Jan 3, 2012 at 8:34 AM, zzeus  wrote:
> webfaction.com
>
> On 2 янв, 13:49, Alec Taylor  wrote:
>> Good afternoon,
>>
>> I'm looking for some cheap Django hosting, to host all my test sites.
>> My production sites will be have more expensive, more reliable, faster
>> servers+sites; but it would be good to have a cheap host for
>> prototypes.
>>
>> Know of a good one?
>>
>> 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.
>

-- 
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/Data Base Advice

2012-01-02 Thread Mike Dewhirst

On 3/01/2012 10:59am, Chris Kavanagh wrote:



On Jan 2, 6:57 pm, Chris Kavanagh  wrote:

I'm new to django&  programming in general. I know the basics of
Python. Anyways, going through the djangoproject tutorial, I came to
the part where you edit the polls/models.py, and this is where I need
advice.

I understand roughly what's going in when we write the script in
models.py, however if I had to create something like this on my own, I
wouldn't know where to begin. Obviously I have no .db experience, but
I get the gist of the different types of fields django uses. The
question is, how do I go about learning this?? Do I need to go through
an SQL tutorial to better understand how this works??

Thanks in advance for ANY help!


I read somewhere that it takes about 10,000 hours of 
(learning/training/practice/work) to achieve mastery in any area 
requiring complex skills and knowhow. Playing a musical instrument, 
writing complex database systems for the web, air traffic control - you 
name it.


I think you need to bite the bullet and slog your way through the 
tutorial. Don't expect to understand too much the first time but learn 
to follow the written instructions *slavishly* until it actually works.


Then get yourself a copy of The Definitive Guide to Django by Adrian 
Holovaty and Jacob Kaplan-Moss and work through that.


Finally tackle a small project of your own and make that work. Google 
will help you answer most of your questions.


Good luck

Mike




BTW, I'm using Winxp, django1.3.1 and Sqlite3 (with Python2.7)



--
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/Data Base Advice

2012-01-02 Thread Chris Kavanagh


On Jan 2, 6:57 pm, Chris Kavanagh  wrote:
> I'm new to django & programming in general. I know the basics of
> Python. Anyways, going through the djangoproject tutorial, I came to
> the part where you edit the polls/models.py, and this is where I need
> advice.
>
> I understand roughly what's going in when we write the script in
> models.py, however if I had to create something like this on my own, I
> wouldn't know where to begin. Obviously I have no .db experience, but
> I get the gist of the different types of fields django uses. The
> question is, how do I go about learning this?? Do I need to go through
> an SQL tutorial to better understand how this works??
>
> Thanks in advance for ANY help!

BTW, I'm using Winxp, django1.3.1 and Sqlite3 (with Python2.7)

-- 
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/Data Base Advice

2012-01-02 Thread Chris Kavanagh
I'm new to django & programming in general. I know the basics of
Python. Anyways, going through the djangoproject tutorial, I came to
the part where you edit the polls/models.py, and this is where I need
advice.

I understand roughly what's going in when we write the script in
models.py, however if I had to create something like this on my own, I
wouldn't know where to begin. Obviously I have no .db experience, but
I get the gist of the different types of fields django uses. The
question is, how do I go about learning this?? Do I need to go through
an SQL tutorial to better understand how this works??

Thanks in advance for ANY 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: Cheap Django hosting?

2012-01-02 Thread zzeus
webfaction.com

On 2 янв, 13:49, Alec Taylor  wrote:
> Good afternoon,
>
> I'm looking for some cheap Django hosting, to host all my test sites.
> My production sites will be have more expensive, more reliable, faster
> servers+sites; but it would be good to have a cheap host for
> prototypes.
>
> Know of a good one?
>
> 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.



Pythons subprocess with WSGI + Apache mpm-worker: IOError 4

2012-01-02 Thread sbrandt
Hello,

I hope it's okay to if I just share a StackOverflow link here because
I've explained the problem in detail there:
http://stackoverflow.com/questions/8678897/

I hope any of you guys encountered the same error because I don't know
what to do next. It works on a second virtual machine running the same
software (but quota isn't doing anything there) and I can't figure out
why.

Thanks for your replies

For all who don't want to open StackOverflow a copy below:
I have a strange problem here which solution I can't figure out by
searching the net :/

After switching Apache from mpm-prefork to mpm-worker, using
subprocess in my (Django) Python WSGI application raises the following
exception after hanging for a couple of time:

IOError at /
[Errno 4] Interrupted system call

The call in question is:

out = check_output(['sudo', 'quota', user_id])

where check_output is a backport of this function from Python 2.7
while I'm using Python 2.6 from Debian Squeeze repositories.

The processes, in fact, seem to be executed, but die:

ps aux | grep quota
root 15378  0.0  0.0  21864  1176 ?S02:34   0:00 sudo
quota ...SOME_ID...
root 15379  0.0  0.0  0 0 ?Z02:34   0:00
[quota] 

The Apache configuration is no more than setting the WSGIScriptAlias
and some directory directives.

Am I missing the obvious?

Greets Sebastian

-- 
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 list_editable and custom manager bug?

2012-01-02 Thread Slafs
Oh 

Maybe it has something to do with my previous report 
https://code.djangoproject.com/ticket/13126 ?

And one more thing to mention is that there's no error indication on the 
changelist.

Regards

-- 
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/-/UtMN4mn5KQgJ.
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 admin list_editable and custom manager bug?

2012-01-02 Thread Slafs
Hi there!

Can You please examine my code 
https://bitbucket.org/slafs/listeditexample/overview ?

I thinks there's a bug in django admin when using the list_editable with 
overriden queryset method and a custom default manager. Please refer to 
this small example for details. 
Is there anything similar reported already?

Regards

Sławek


-- 
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/-/DQ_8qp5P6lwJ.
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.



Field Inheritance

2012-01-02 Thread Sepero
I would like to suggest listing/displaying the Parent Class for
classes on API pages like this-
https://docs.djangoproject.com/en/1.3/ref/models/fields/

In part1 of the Django tutorial, it instructs to create a model like
this-
pub_date = models.DateTimeField('date published')

While trying to look up what the argument 'date published' was
supposed to assign, I was presented with this definition-
class DateTimeField([auto_now=False, auto_now_add=False, **options])

In the description it vaguely indicates that DateTimeField is a child
of DateField (which has the same definition), and I see no indication
at all that DateField is a child of Field.

I apologize if this seems noobish of me to not understand, or if there
is somewhere in the docs with info that I'm just misunderstanding. I
know how to go into the shell to look up parents of objects, but it
would seem that the purpose of an API is to be very explicit about
these kind of things.

-- 
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: How to get current session user in models.py?

2012-01-02 Thread Waldek Herka
@Andy: I agree it may be convoluted a bit indeed.. but your
alternative a) is not an option - I would not do it if I did not
needed it, wouldn't I ;-)
b) requires interface changes, sometimes it's even messier.. changing
the signatures means you need make sure all the callers would accept
that change , c) local threading way posted by you is not as straight
forward as it looks - I'd say it's very similar in complexity to
mine.. you still need to explicitly call 'activate' somewhere(view
method) to populate local thread storage while in my case you 'only'
inspect the call stack - the change is limited to a single block of
code.. All in all - I never claimed the way I solved it's perfect - it
just works fine for me and wanted to share it with others.

Thanks for your comment! I really appreciate it :-)

Cheerio,
Waldek

On Jan 2, 7:49 pm, Andy McKay  wrote:
> Inspecting your stack to find the user seems a pretty convoluted way to do
> it.
>
> You could either a) not access users in your models b) explicitly pass the
> user around or c) just place your user into a local threading and retrieve
> it anywhere else for 
> example:https://github.com/andymckay/arecibo/blob/master/listener/lib/usersto...
> any other methods for doing that.

-- 
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: How to get current session user in models.py?

2012-01-02 Thread Andy McKay
Inspecting your stack to find the user seems a pretty convoluted way to do
it.

You could either a) not access users in your models b) explicitly pass the
user around or c) just place your user into a local threading and retrieve
it anywhere else for example:
https://github.com/andymckay/arecibo/blob/master/listener/lib/userstorage/utils.pyor
any other methods for doing that.

-- 
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-02 Thread Chris Kavanagh


Thanks to EVERYONE for the help! ( and Bart for his help/patience!)

-- 
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-02 Thread Chris Kavanagh


On Jan 2, 4:59 am, Andre Terra  wrote:
> Use virtualenv:  http://pypi.python.org/pypi/virtualenv
>
> Cheers,
> AT
>
> I think I'll give that a try. Thanks for the 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: How to get current session user in models.py?

2012-01-02 Thread Waldek Herka
Hi,
I actually have already sent this to Shawn, but thought it might be useful 
if I post to it a broader audience. Here is my solution to this problem:


user = None
outer_frames = inspect.getouterframes(inspect.currentframe())
for tpl in outer_frames:
arginfo = inspect.getargvalues(tpl[0])
if(type(arginfo[3]) is dict):
arg_dict = arginfo[3].copy()
for k in arg_dict:
if(type(arg_dict.get(k)) is WSGIRequest):
user = arg_dict.get(k).user
break
del arg_dict
del arginfo
if(user):
break



This code is quite generic and should work in any place you ended up 
provided the origin was the django view/class method. I'm using it on 
models and customized admin forms for storing audit trails. It uses inspect 
to scan the parameters from the callers of the current frame stack. You can 
modify it to fish out pretty much anything.. there is no need to change the 
interfaces.

Hope it helps.

Cheers,
Waldek  

-- 
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/-/dzmUtcvpXrUJ.
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-02 Thread Bob Kline
On Mon, Jan 2, 2012 at 11:39 AM, Dan Poirier  wrote:

> Apache doesn't quite work that way. If the part before a slash
> corresponds to a file, it'll use that file and pass the rest to the
> request processor.

Ah, very clever.  I can confirm what you say by changing the
AddHandler directive from

AddHandler fcgid-script .fcgi

to

AddHandler cgi-script .fcgi

So, when Apache was telling me (when the first version of the
AddHandler directive was in play) "The requested URL
"/appname.fcgi/admin was not found on this server" (the error message
leading me to the incorrect conclusion that Apache interpreted the
file path syntax the same way Unix does) what it really meant was
"your hosting provider hasn't set up mod_fcgid properly."  Odd way to
communicate that problem.  So I guess I'll have to go back to my
hosting provider and ask why this isn't working, in spite of
documentation on their site implying that it should.

Thank you very much for getting me unstuck from the misleading Apache
error message.

-- 
Bob Kline
http://www.rksystems.com
mailto:bkl...@rksystems.com

-- 
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-02 Thread ravinder singh
Happy new year to all
On Jan 1, 2012 11:06 PM, "Timothy Makobu" 
wrote:

> +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.
>

-- 
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-02 Thread Dan Poirier
On Mon. 2012-01-02 at 07:23 AM EST, Bob Kline  wrote:

> So, my .htaccess file looks just like that (with "mysite" replaced
> with the real name of the script). The part I don't understand is the
> slash between the script name and the placeholder $1. The way the
> filesystem syntax works, that slash tells Apache (and indirectly, the
> OS) that mysite.fcgi is a directory name, but it's a file, which
> Apache won't be able to find if it thinks mysite.fcgi is a directory
> in which it's supposed to find the requested resource (whatever's
> plugged in for the "$1" placeholder), hence the "not found" message.
> I'm sure there's a simple piece I'm missing here, but I just don't
> see it.

Apache doesn't quite work that way. If the part before a slash
corresponds to a file, it'll use that file and pass the rest to the
request processor.

-- 
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: "1054 unknown column..." in MySql5

2012-01-02 Thread James Jang
Thank you for kind reply.

I followed your word; DROP TABLE!!
and the puzzle was solved.

OOh~ Thank you.

-- 
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-02 Thread Alec Taylor
On Mon, Jan 2, 2012 at 5:27 AM, creecode  wrote:
> 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.

Thanks a heap!

I'll see if I can set this up.

---

Do you think this sort of layout is popular, or would
googlegroups.com/myname be better (or be provided as an alternative)?

-- 
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-02 Thread CareerDhaba tech
Sent the previous email without reading the thread. I tried both {% import
%} and {% load %}, but it errors out when trying to access either of the
thumbnails in the app, spitting out an unpacking error. I have opened an
issue on the github page, but haven't heard from the original developer
yet.

- Harshil

On Mon, Jan 2, 2012 at 6:58 PM, Andre Terra  wrote:

> I now realize the problem is much more complex than what I though
> originally.
>
> My suggestion to you is to use this nifty third-party tool called
> django-smart-load-tag[1].
>
> Once you get it up and running, try using {% import %} instead of {% load
> %}.
>
>
> Cheers,
> AT
>
> [1] https://github.com/codysoyland/django-smart-load-tag
>
>
> On Mon, Jan 2, 2012 at 10:57 AM, Andre Terra  wrote:
>
>> Hello,
>>
>> I looked into your problem and realized the current implementation of {%
>> load %} doesn't allow for homonimous tags. I plan on working toward a patch
>> to fix this, but this can take a little while. Meanwhile, your best bet
>> would be to fork one of the two projects and change the tag's name, I
>> guess. Yes, it's very hacky, and no, don't do it in production.
>>
>> I'll try to keep you posted once I've got a ticket in TRAC.
>>
>>
>> Cheers,
>> AT
>>
>>
>>
>>
>> On Mon, Jan 2, 2012 at 4:38 AM, CareerDhaba tech wrote:
>>
>>> 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.
>>>
>>
>>
>  --
> 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-02 Thread CareerDhaba tech
I am using two because django-userena uses easy_thumbnail, but I'd like to
use sorl-thumbnail for actual thumbnail use in my app.

- Harshil

On Mon, Jan 2, 2012 at 8:07 PM, francescortiz wrote:

> Why are you using two thumbnail providers?
>
> On Dec 26 2011, 3:01 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.
>
>

-- 
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-02 Thread CareerDhaba tech
Hi Andre,

Thanks for looking into this. Have you come across this django app?
https://github.com/codysoyland/django-smart-load-tag

The app claims to have a fix for this problem, but I had trouble getting it
to work (unpacking issue). If you can keep me in the loop regarding the
ticket, that would be great.

Best,
Harshil

On Mon, Jan 2, 2012 at 6:27 PM, Andre Terra  wrote:

> Hello,
>
> I looked into your problem and realized the current implementation of {%
> load %} doesn't allow for homonimous tags. I plan on working toward a patch
> to fix this, but this can take a little while. Meanwhile, your best bet
> would be to fork one of the two projects and change the tag's name, I
> guess. Yes, it's very hacky, and no, don't do it in production.
>
> I'll try to keep you posted once I've got a ticket in TRAC.
>
>
> Cheers,
> AT
>
>
>
> On Mon, Jan 2, 2012 at 4:38 AM, CareerDhaba tech wrote:
>
>> 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.
>>
>
>  --
> 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-02 Thread francescortiz
Why are you using two thumbnail providers?

On Dec 26 2011, 3:01 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: Creating clean URLS

2012-01-02 Thread lankesh87
Yes I am using form to send values..

and here is the view code:-

--
views.py
--

# /return Called back by Twitter after the authorization
#this is where the twitter callbacks the application.

from tweety.models import Customer
import twitter

def twitter_after_auth(request):
token = oauth.Token(request.GET['oauth_token'],
request.GET['oauth_verifier'])
_consumer = oauth.Consumer(CONSUMER_KEY, CONSUMER_SECRET)

client = oauth.Client(_consumer, token)

resp, content = client.request(ACCESS_TOKEN_URL, 'POST')
access_token = dict(urlparse.parse_qsl(content))

token = oauth.Token(access_token['oauth_token'],
access_token['oauth_token_secret'])

t_api = twitter.Api(CONSUMER_KEY, CONSUMER_SECRET,
access_token['oauth_token'], access_token['oauth_token_secret'])

#add code here to store token in database.
customer = Customer()

customer.customer_id= access_token['user_id'] #user.id
customer.customer_handle= access_token['screen_name']
customer.token_auth_key = access_token['oauth_token']
customer.token_sec_key  = access_token['oauth_token_secret']
customer.company_name   = access_token['screen_name']

customer.save()
#this is the url to which i want to direct the user to
return render_to_response('http://brainslane.no-ip.info/
create_cr')



# /create_cr
#this url contains html forms for cr registration
#but it has the url problem i have mentioned
def create_cr(request):
return render_to_response('register_cr.html')

--


On Jan 2, 5:37 am, Lie Ryan  wrote:
> 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: Cheap Django hosting?

2012-01-02 Thread Timothy Makobu
ep.io

On Mon, Jan 2, 2012 at 1:00 PM, Andre Terra  wrote:

> Hello, Alec
>
>
> There are plenty of threads regarding inexpensive django hosting. Please
> browse the mailing list archives before starting a new one.
>
> We don't need another 100 replies with suggestions!
>
>
> Cheers,
> AT
>
>
> On Mon, Jan 2, 2012 at 6:49 AM, Alec Taylor wrote:
>
>> Good afternoon,
>>
>> I'm looking for some cheap Django hosting, to host all my test sites.
>> My production sites will be have more expensive, more reliable, faster
>> servers+sites; but it would be good to have a cheap host for
>> prototypes.
>>
>> Know of a good one?
>>
>> 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.
>>
>>
>  --
> 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: ERP with Supply chain management (incl. POS) and Customer relationship management — What's available?

2012-01-02 Thread Venkatraman S
 
On Mon, Jan 2, 2012 at 3:15 PM, Alec Taylor  wrote:

>
> So I think building it myself would be my best bet.
>
> Looking forward to the schema design tutorial of the model layer,
>

Am not sure what you are hinting at. First define the business processes
and then start designing the app.
Or are you not sure what the schema should be? (If this is the Q, then you
need to again go to the first step and define your business processes).

-V

-- 
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-02 Thread Martin Pajuste
You get that error because 'blank' is model field option. If you want to be 
able to accept empty values, use required=False instead.

> state = USStateField(initial='CA', required=False)

-- 
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/-/_ApzlaY9CMQJ.
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-02 Thread Andre Terra
I now realize the problem is much more complex than what I though
originally.

My suggestion to you is to use this nifty third-party tool called
django-smart-load-tag[1].

Once you get it up and running, try using {% import %} instead of {% load
%}.


Cheers,
AT

[1] https://github.com/codysoyland/django-smart-load-tag

On Mon, Jan 2, 2012 at 10:57 AM, Andre Terra  wrote:

> Hello,
>
> I looked into your problem and realized the current implementation of {%
> load %} doesn't allow for homonimous tags. I plan on working toward a patch
> to fix this, but this can take a little while. Meanwhile, your best bet
> would be to fork one of the two projects and change the tag's name, I
> guess. Yes, it's very hacky, and no, don't do it in production.
>
> I'll try to keep you posted once I've got a ticket in TRAC.
>
>
> Cheers,
> AT
>
>
>
>
> On Mon, Jan 2, 2012 at 4:38 AM, CareerDhaba tech wrote:
>
>> 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.
>>
>
>

-- 
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-02 Thread Andre Terra
Hello,

I looked into your problem and realized the current implementation of {%
load %} doesn't allow for homonimous tags. I plan on working toward a patch
to fix this, but this can take a little while. Meanwhile, your best bet
would be to fork one of the two projects and change the tag's name, I
guess. Yes, it's very hacky, and no, don't do it in production.

I'll try to keep you posted once I've got a ticket in TRAC.


Cheers,
AT



On Mon, Jan 2, 2012 at 4:38 AM, CareerDhaba tech wrote:

> 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.
>

-- 
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-02 Thread Bob Kline
Thanks, Tiago.  Unfortunately I don't understand enough Portuguese to get 
the full benefit of the page you pointed me to.  It appears that your using 
WSGI on a server on which you have root access, whereas I'm moving the app 
to a shared hosting server where I can't edit httpd.conf, and I'm using 
fastcgi.  I do see, however, that your .htaccess file has the same syntax 
for the RewriteRule as the rule I'm using, and that's the part that has me 
puzzled.  If the RewriteRule ends up telling Apache that the resource name 
is "myscript.fcgi/whatever" won't Apache (and the OS) think that 
myscript.fcgi is a directory name and that the resource is a file in that 
directory called "whatever"?  That's what the slash means, right?

-- 
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/-/DlmAyGBA5n0J.
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.



Sample Application for using Google Docs API

2012-01-02 Thread kapil Garg
Hi ,

I'm working on a web application and want to integrate Google docs with
that. Being new to Django and Web app, I'm finding it difficult to
understand the documentation provided for using Google Docs API . Is there
any sample application that I can refer to for the same.

~Kapil

-- 
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-02 Thread Bob Kline
Thanks for your reply, Daniel.  My reading of the documents you pointed me 
to was that the FastCGIExternalServer directive goes in the httpd.conf 
file, to which I don't have access, as I'm setting this up on a shared 
hosting service.  So I followed the instructions pointed to by the note 
further up on that page ("If you’re on a shared hosting system, you’ll 
probably be forced to use Web server-managed FastCGI processes. See the 
section below on running Django with Web server-managed processes for more 
information").  Those instructions say:

"Many shared-hosting providers don't allow you to run your own server 
daemons or edit the httpd.conf file. In these cases, it's still possible to 
run Django using Web server-spawned processes.

"If you're using Web server-spawned processes, as explained in this 
section, there's no need for you to start the FastCGI server on your own. 
Apache will spawn a number of processes, scaling as it needs to."

"In your Web root directory, add this to a file named .htaccess:

AddHandler fastcgi-script .fcgiRewriteEngine OnRewriteCond %{REQUEST_FILENAME} 
!-fRewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
"Then, create a small script that tells Apache how to spawn your FastCGI 
program. Create a file mysite.fcgi and place it in your Web directory, and be 
sure to make it executable: "

So, my .htaccess file looks just like that (with "mysite" replaced with the 
real name of the script). The part I don't understand is the slash between 
the script name and the placeholder $1. The way the filesystem syntax 
works, that slash tells Apache (and indirectly, the OS) that mysite.fcgi is 
a directory name, but it's a file, which Apache won't be able to find if it 
thinks mysite.fcgi is a directory in which it's supposed to find the 
requested resource (whatever's plugged in for the "$1" placeholder), hence 
the "not found" message. I'm sure there's a simple piece I'm missing here, 
but I just don't see it.




-- 
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/-/q6OLqT-ET0MJ.
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-02 Thread Andre Terra
On Mon, Jan 2, 2012 at 5:57 AM, Elad Zucker  wrote:

> 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.



Try having a call to admin.site.unregister first!


Cheers,
AT

-- 
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: technique about using thread in views.py

2012-01-02 Thread Andre Terra
Don't use Thread, use Celery [1] and django-celery[2].

You will also need one of several available brokers, like RabbitMQ[3][6],
or kombu[4] + django-kombu[5].


Happy reading!

Cheers,
AT

[1] http://ask.github.com/celery/
[2] http://pypi.python.org/pypi/django-celery/
[3] http://www.rabbitmq.com/
[4] http://pypi.python.org/pypi/kombu/
[5] https://github.com/ask/django-kombu
[6] http://webcookies.org/blog/2009/09/10/rabbitmq-celery-and-django/


On Mon, Jan 2, 2012 at 8:37 AM, Kay  wrote:

> Hi,guys~
> Happy new year ^^
> I am a beginner at django.
> I want to run a very simple thread in django project.
> when view.py after running welcome_page.html to show a html on browser
> then call a thread print something on background.
> But I can't run it well with those two merged in views.py.
> Following is the code I used.
> What's wrong with my code
> Any tips?
> Thanks.
>
> Kay
>
> ---
> from django.http import HttpResponse
> from django.shortcuts import render_to_response
> from django.core.context_processors import csrf
> from threading import Thread
>
> def welcome(request):
>c = {}
>c.update(csrf(request))
>return render_to_response("welcome_page.html",c)
>
>go = test()
>go.start()
>
> class test(Thread):
>
>def __init__(self):
>Thread.__init__(self)
>
>def run(self):
>print 'thread is running'
>
> --
> 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: technique about using thread in views.py

2012-01-02 Thread kenneth gonsalves
On Mon, 2012-01-02 at 02:37 -0800, Kay wrote:
> def welcome(request):
> c = {}
> c.update(csrf(request))
> return render_to_response("welcome_page.html",c)

your code stops here, unless you have something in the welcome page to
call this or another view function, you will be stuck on the welcome
page for ever. (remember 'return' ends the execution of a function)

-- 
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.



technique about using thread in views.py

2012-01-02 Thread Kay
Hi,guys~
Happy new year ^^
I am a beginner at django.
I want to run a very simple thread in django project.
when view.py after running welcome_page.html to show a html on browser
then call a thread print something on background.
But I can't run it well with those two merged in views.py.
Following is the code I used.
What's wrong with my code
Any tips?
Thanks.

Kay
---
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.core.context_processors import csrf
from threading import Thread

def welcome(request):
c = {}
c.update(csrf(request))
return render_to_response("welcome_page.html",c)

go = test()
go.start()

class test(Thread):

def __init__(self):
Thread.__init__(self)

def run(self):
print 'thread is running'

-- 
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-02 Thread Daniel Roseman
On Monday, 2 January 2012 02:39:00 UTC, 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!


No, this is correct. But you haven't shown us the rest of the 
configuration. Do you have FastCGIExternalServer specified correctly?

See 
https://docs.djangoproject.com/en/1.3/howto/deployment/fastcgi/#apache-setup 
--
DR.

-- 
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/-/MWwurfoHU8cJ.
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: Cheap Django hosting?

2012-01-02 Thread Andre Terra
Hello, Alec


There are plenty of threads regarding inexpensive django hosting. Please
browse the mailing list archives before starting a new one.

We don't need another 100 replies with suggestions!


Cheers,
AT

On Mon, Jan 2, 2012 at 6:49 AM, Alec Taylor  wrote:

> Good afternoon,
>
> I'm looking for some cheap Django hosting, to host all my test sites.
> My production sites will be have more expensive, more reliable, faster
> servers+sites; but it would be good to have a cheap host for
> prototypes.
>
> Know of a good one?
>
> 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.
>
>

-- 
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-02 Thread Andre Terra
Use virtualenv:  http://pypi.python.org/pypi/virtualenv


Cheers,
AT

On Sun, Jan 1, 2012 at 10:29 PM, Bart Nagel  wrote:

> 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.
>
>

-- 
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: Cheap Django hosting?

2012-01-02 Thread Kenneth Reitz
Heroku!

http://blog.heroku.com/archives/2011/9/28/python_and_django/ 


On Monday, January 2, 2012 at 4:49 AM, Alec Taylor wrote:

> Good afternoon,
> 
> I'm looking for some cheap Django hosting, to host all my test sites.
> My production sites will be have more expensive, more reliable, faster
> servers+sites; but it would be good to have a cheap host for
> prototypes.
> 
> Know of a good one?
> 
> 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 
> (mailto:django-users@googlegroups.com).
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com 
> (mailto: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.



Cheap Django hosting?

2012-01-02 Thread Alec Taylor
Good afternoon,

I'm looking for some cheap Django hosting, to host all my test sites.
My production sites will be have more expensive, more reliable, faster
servers+sites; but it would be good to have a cheap host for
prototypes.

Know of a good one?

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: ERP with Supply chain management (incl. POS) and Customer relationship management — What's available?

2012-01-02 Thread Alec Taylor
On Mon, Jan 2, 2012 at 7:39 PM, Venkatraman S  wrote:
>
> On Thu, Dec 15, 2011 at 12:13 AM, Alec Taylor 
> wrote:
>>
>> Which libraries (or projects even) will provide the best base for
>> building this off?
>>
>
> Well, if you building this from scratch , then you define your schema first.
> This is the 'model' layer.

I am interested in learning more about this approach. Can you elaborate?

(feel free to contact me on or off list)

On Sat, Dec 17, 2011 at 3:07 AM, Emile van Sebille  wrote:
> OpenERP?
>
> Emile

On Mon, Jan 2, 2012 at 7:39 PM, Venkatraman S  wrote:
> Else, have a look at OpenERP or similar open source ERP projects for
> implementation/customization.
>
> -V
>

OpenERP is good, but I am not a fan of its license. The alternative
ERP solutions I've looked at have either had a too restrictive license
(GPL is ok), or do not have the functionality I am after.

So I think building it myself would be my best bet.

Looking forward to the schema design tutorial of the model layer,

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: ERP with Supply chain management (incl. POS) and Customer relationship management — What's available?

2012-01-02 Thread Venkatraman S
On Thu, Dec 15, 2011 at 12:13 AM, Alec Taylor wrote:

> Good morning,
>
> I am building a ERP
> [http://en.wikipedia.org/wiki/Enterprise_resource_planning] with
> Supply chain management (incl. POS and ecommerce) and Customer
> relationship management.
>
> Which libraries (or projects even) will provide the best base for
> building this off?
>
>
Well, if you building this from scratch , then you define your schema
first. This is the 'model' layer.
Else, have a look at OpenERP or similar open source ERP projects for
implementation/customization.

-V

-- 
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.