Re: How to hire a freelance Django developer

2011-03-29 Thread Lakshman Prasad
> Is there a good *free* resource to browse freelance Django developers

github.com is out there: https://github.com/search?q=django

On Wed, Mar 30, 2011 at 5:34 AM, Micah Carrick wrote:

> Hey folks,
>
> Let me start by saying: Please don't email me your resume--this is not a
> job listing.
>
> That being said, I do need to hire python/django developers and system
> admins from time to time to help me out with projects or take something off
> my plate. Is there a good *free* resource to browse freelance Django
> developers and/or post freelance gigs? I'm typically hiring somebody to help
> with very small, open-source projects for which I am not trying to make
> money off of. So paying $300 at github, stackoverflow, or any other paid job
> posting site is not an option.
>
>
>
>
>  --
> 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.



Multiple Admins, improper object linking

2011-01-25 Thread Lakshman Prasad
Hi,

I have a lot of admin customization. Queryset overriding, custom urls per
object, per admin site, save methods overriding and calling some external
services, template changes, you name it.

So, In my application, I like to have another instance of admin I call
"bare-tables" in which I auto register all existing models in a project
level admin.py using the following:

from django.db.models import get_models

from django.contrib.admin import AdminSite

from reversion.admin import VersionAdmin


class BareTables(AdminSite):

pass


new_admin = BareTables(name='bare_tables')


for el in get_models():

new_admin.register(el,VersionAdmin)



And I link up both the admins in the URL using the following:

urlpatterns = patterns('',

url(r'^admin_tools/', include('admin_tools.urls')),

(r'^admin/doc/', include('django.contrib.admindocs.urls')),

(r'^admin/', include(admin.site.urls)),

(r'^bare-tables/', include(new_admin.urls)),


I was all good and happy. Except, I included the admin tools, to customize
only the first admin with all the Jazz, dashboard and menus, the way I like
it. Now, when I go to the admin, or to the plain admin that I called
"bare-tables", the objects are linked to the main admin. :( If I manually
change the "admin" in the url above to "bare-tables", it works.

I think the problem is that admin_tools templates don't use the prefix to
reverse the urls, or that I need to pass it the prefix somehow and I am not.
What simple change that I can make to make it work properly. I am ok, even
if the plain admin retains the old skin, Is there a way I can tell
admin-tools, not to get involved if the base url is something.

-Regards,
Lakshman
lakshmanprasad.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.



Django facebook group

2010-10-07 Thread Lakshman Prasad
Hi,

I just created a django facebook group:
http://www.facebook.com/home.php?sk=group_114422875284562

Those interested may join.

PS: I know it doesn't matter to some people. If it doesn't matter, it
shouldn't matter even to complain, I think :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: manually add objects to a QuerySet

2010-08-08 Thread Lakshman Prasad
You can't really add an object to queryset like that.

If you don't want to generate a list in the view, you can chain the
querysets

chained_qs = chain(qs1,qs2)

On Sun, Aug 8, 2010 at 9:45 AM, chefsmart  wrote:

> I had asked this on stackoverflow, but I guess I couldn't explain
> myself clearly enough. I'll try to ask again here:
>
> Say I have two objects obj1 and obj2 of the same model (MyModel), now
> I would like to add these objects to a new QuerySet. Can I create a
> QuerySet manually like the following
>
> my_qs = QuerySet(model=MyModel)
>
> and then add obj1 and obj2 to this QuerySet like
>
> my_qs.add(obj1)
> my_qs.add(obj2)
>
> Regards,
> CM.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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-us...@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: Email Backend setting needed, a potential bug

2010-05-26 Thread Lakshman Prasad
So, I see what has happened. (Interesting it is)

I upgraded django to 1.2 to try out:

$pip install --upgrade django

Then, back to work again:

$pip install django==1.1.2

I don't think pip removed the pyc files when replacing, which is making it
import mail module.

So, This problem should be solved if I removed all pycs. I did.

$find -name "*.pyc" -delete

I still have the same problem.

I am sure, I am using 1.1.1 right now, because in my view I do:

import django
django.get_version()

and it prints:
1.1.1

(This is no major problem, I know I can delete the entire folder and install
again. But it is interesting how it happened, which could be a bug in pip.)


On Wed, May 26, 2010 at 12:34 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

> On Wed, May 26, 2010 at 2:54 AM, Lakshman Prasad 
> wrote:
> > Hi,
> > Since I upgraded to 1.1.2, I am unable to send mails as django seems
> > expecting a EMAIL_BACKEND.
>
> Something is severely broken with your setup, then. EMAIL_BACKEND is a
> setting that was introduced in Django 1.2, but it doesn't exist in
> 1.1.1 or 1.1.2.
>
> So - somehow you've managed to install Django 1.2, and that is what is
> being found by Python. Your stack trace also confirms this -
> django.core.mail is a module on Django 1.1.X, and a directory on 1.2.
> The stack trace you provide shows that you've got a directory.
>
> Yours,
> Russ Magee %-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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-us...@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.



Email Backend setting needed, a potential bug

2010-05-25 Thread Lakshman Prasad
Hi,

Since I upgraded to 1.1.2, I am unable to send mails as django seems
expecting a EMAIL_BACKEND.

I tried to simply downgrade back to 1.1.1 not having to bother, but the
error continues.

I seems like a bug, but I don't know how it can be one, because, I cant see
how sending email can go untested.

Any pointers to what I am doing wrong, or if something is wrong in django,
appreciated. Thanks.

Following is the trraceback:

File "/usr/local/lib/python2.6/dist-packages/django/core/mail/__init__.py"
in send_mail
  59. fail_silently=fail_silently)
File "/usr/local/lib/python2.6/dist-packages/django/core/mail/__init__.py"
in get_connection
  29. path = backend or settings.EMAIL_BACKEND
File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py" in
__getattr__
  273. return getattr(self._wrapped, name)
Exception Type: AttributeError at /home/
Exception Value: 'Settings' object has no attribute 'EMAIL_BACKEND'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: problem with apache and wsgi

2010-04-23 Thread Lakshman Prasad
Did you try:

Alias /smedia /home/user/media

On Fri, Apr 23, 2010 at 2:15 PM, Kenneth Gonsalves wrote:

> hi,
>
> using django trunk on svn and the latest ubuntu with python 2.6. The setup
> is
> this:
>
> MEDIA_ROOT = /home/user/media/
> MEDIA_URL = http://mysite/smedia/
> apache has:
> Alias /smedia/ /home/user/media/
>
> the uloaded file is in /home/user/media/images/pic.jpg
>
> apache cannot find the file. Page source shows the file as
> http://mysite/smedia/images/pic.jpg
>
> but the apache error log shows:
> /home/user/mediaimages/pic.jpg not found - note that the '/' between
> 'media'
> and 'images' is missing. What can be the cause of this error?
>
> --
> regards
> Kenneth Gonsalves
> Senior Associate
> NRC-FOSS
> http://certificate.nrcfoss.au-kbc.org.in
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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-us...@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: Looking for a wiki or cms created with django

2010-02-24 Thread Lakshman Prasad
You can try django-wakawaka: http://github.com/bartTC/django-wakawaka by
bartTC, that is used in Pinax.

On Wed, Feb 24, 2010 at 1:42 PM, Adrian Maier wrote:

> Hello,
>
> Thanks for trying to help, but I am aware of the django-cms project.  I
> have
> already tried to use it, but it proved to be a nightmare to install on my
> hosting
> solution.
>
> I could probably make it work, but the main problem is that I am seeking
> for something that works like a wiki :  to have a "edit" button that allows
> page
> editing with wiki syntax.  I don't want to edit the pages from some
> administration
> interface. And an essential feature is that editing uses wiki markup.
>
> So, perhaps I should re-word my question : which is the best wiki
> implementation
> built with django?
>
> Obviously I have already tried to search this on the internet,  but the '
> wiki '  keyword
> is a tricky one to search.  Most projects have their own wiki ,  so the
> results for
> searches like 'django wiki'   typically point me to "the wiki of the Django
> project".
>
>
>
> Cheers,
> Adrian M.
>
>
>
> On Tue, Feb 23, 2010 at 23:59, piz...@gmail.com  wrote:
>
>> First google result for "django cms":
>>
>> http://www.django-cms.org/
>>
>> Hope this is what you need :)
>>
>> El 23/02/2010, a las 22:53, Adrian Maier escribió:
>>
>>  Hello all,
>>>
>>> I am looking for a solution for creating a website that :
>>> - is a presentation for a company
>>> - the contents is editable in wiki-style
>>> - allows full control over the template used by each page
>>> - has search capabilities
>>> - is preferably implemented with django
>>>
>>> So I am basically looking for a content management system that
>>> works like a wiki :  only a limited number of users that can authenticate
>>> and edit pages. The rest of the world should not be aware that the
>>> website is a wiki  : no user registration, no editing, no page history,
>>> and not even 'edit' links for the non-authenticated users .
>>>
>>> Does anyone happen to know about a project similar to what
>>> i've described above ?
>>>
>>>
>>> Cheers,
>>> Adrian M.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-us...@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-us...@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.
>>
>>
>
>
> --
> Adrian Maier
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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.
>



-- 
- Lp

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: question about django-pagination

2009-12-18 Thread Lakshman Prasad
> would I still be able to paginate over the entire list of 1 objects?
Or my list would be shortened to 5 objects?

Its the latter. Your query set will loop only for the size of it's length.


On Sat, Dec 19, 2009 at 12:03 PM, Continuation wrote:

> In the django-pagination, it uses the example:
> {% autopaginate object_list %}
>
> My question is does object_list have to be the **entire** list over
> which I want to paginate, or can I limit the length of object_list? If
> I limit the length of object_list, will autopaginate still go through
> the entire list?
>
> As an example, say I want to paginate over the list a.field_set.all().
> Let's say that list has 1 objects. I might not want my database to
> return such a large result set. So I might want to do something like:
>
> object_list = a.field_set()[:5]
>
> Now if I use {% autopaginate object_list %} in my template, would I
> still be able to paginate over the entire list of 1 objects? Or my
> list would be shortened to 5 objects?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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,
Lakshman
becomingguru.com
lakshmanprasad.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-us...@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: Help with apache mod rewrite engine

2009-12-08 Thread Lakshman Prasad
You can just replace the regex ^/comments/$ with ^/sees/comments/$ within
the urls.py

Why can't you do that?

On Wed, Dec 9, 2009 at 12:10 PM, Amit Sethi wrote:

> Hi all , I need some help understanding the mod rewrite module of apache .
> What I wished to do want that i had a comments folder by the name of
> /comments/ . Now i run a django project on /sees and i want all the call to
> /comments/ be redirected to /sees/comments and than be handled by the wsgi
> file but the rewriting is not happening is it possible to rewrite url and
> than route it through wsgi script
>
> --
> A-M-I-T S|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-us...@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,
Lakshman
becomingguru.com
lakshmanprasad.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-us...@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 a Django project alike stackoverflow.com

2009-12-01 Thread Lakshman Prasad
> 1) Is it possible to realize my idea with Django, managing the traffic
load for 2.000+ user?

The precise question you asked is answered by the Django BDFL, right there
on Stackoverflow:
http://stackoverflow.com/questions/886221/does-django-scale/1739974#1739974

In summary, "Yes, it is possible to build a site like stackoverflow using
django, that caters to over 100k users per day." But as Russ rightly pointed
out, For that scalability, **You should** build it that way.

>2) How long *may* it take to realize the following? I know that's a
very risky relative question, but assuming I'm a regular-skilled
programmer willing to spend +5h a day.

Some people think "It can be thrown together in a weekend"
http://news.ycombinator.com/item?id=678501 ;)

On Tue, Dec 1, 2009 at 7:23 AM, ~km  wrote:

> Hello,
>
> I'm a Python enthusiast and Django newbie. I'm trying to develop a
> website with an "Ask and Get an Answer"-Interface, with the goal to
> get a strong community; see http://stackoverflow.com to get an idea.
> For more information on stackoverflow.com see
> http://blog.stackoverflow.com/2008/09/what-was-stack-overflow-built-with/
>
> Following questions:
>
> 1) Is it possible to realize my idea with Django, managing the traffic
> load for 2.000+ user?
> 2) How long *may* it take to realize the following? I know that's a
> very risky relative question, but assuming I'm a regular-skilled
> programmer willing to spend +5h a day.
>
> I previously compared other Web frameworks, e.g. Zope, RoR, Gok,
> etc.. , with Django and came to the conclusion that Django /seems/ to
> be the most mature solution for developing such an idea from scratch.
> Do you think Django does the best job for my needs? (I know this is
> the wrong place to ask such a question, but comments are welcome.)
>
> Cheers,
> Kenny
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@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,
Lakshman
becomingguru.com
lakshmanprasad.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-us...@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: Will PasswordField be in Django?

2009-11-10 Thread Lakshman Prasad
django comes with an inbuilt form that does the hashing and saving of
password.

 from django.contrib.auth.forms import UserCreationForm

Simliarly an inbuilt form that does the login, logout and such. Look at the
source in the path above, and/or refer to the documentation of django auth:
http://docs.djangoproject.com/en/dev/topics/auth/

Best!

On Tue, Nov 10, 2009 at 6:40 PM, Shu Hung (Koala)  wrote:

>
> On Tue, Nov 10, 2009 at 8:55 PM, Brett Parker <
> idu...@sommitrealweird.co.uk> wrote:
>
>>
>> Well, a password field isn't actually a different type of data than a
>> text field, so you'd usually just override the form's default for the
>> password field, using a modelform to specify that you want it to appear
>> as a password widget.
>>
>> --
>> Brett Parker
>>
>
> A password field is different from text.
> Usually a password field would store hashed password.
>
> How do I specify, with django's model, that a field need to be encryped and
> hased before store?
>
>
> Koala Yeung
>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Django 1.1.1 - Can't get form validation working

2009-11-02 Thread Lakshman Prasad
To add to all the helpful messages above, for forms with standard fields,
django comes loaded with inbuilt forms.

A quick scan of the source shows (django.contrib.auth.forms) following
inbuilt forms:

AdminPasswordChangeForm
AuthenticationForm
PasswordChangeForm
PasswordResetForm
SetPasswordForm
UserChangeForm
*UserCreationForm*(Similar to RegistrationForm of your example.)

Also, if you need to, eventually, you may as well extend the above forms, to
add/remove fields.
While we are at it, worth mentioning, the django.contrib.auth.views also
contains views for all standard operations, like login, register, change
password etc.

Best!

On Mon, Nov 2, 2009 at 8:09 PM, Andrew  wrote:

>
> Thanks Guys,
> I understand about the form issues...I was just tinkering...
> However yes it was the comma's I had at the end of the fields in my
> form. They didn't throw errors for the face its a sequence as you said
> Karen.
> Thanks Karen and David for such a quick response...
> Andrew
>
> On Nov 2, 2:08 pm, Karen Tracey  wrote:
> > On Mon, Nov 2, 2009 at 9:57 AM, David De La Harpe Golden <
> >
> >
> >
> > david.delaharpe.gol...@ichec.ie> wrote:
> >
> > > Karen Tracey wrote:
> > > > Commas are good on the ends of elements in a sequence, they are not
> > > > good here.
> >
> > > Indeed, a comma at the end actively denotes a kind of sequence, a
> matter
> > > of python syntax. There won't be an immediate error as "blah," means
> > > "1-element tuple" as per
> > >
> http://docs.python.org/tutorial/datastructures.html#tuples-and-sequences
> >
> > > i.e.
> > > username = forms.CharField(),
> > > means
> > > username = (forms.CharField(),)
> >
> > > So the assignment succeeds without error but django later won't do
> > > anything especially useful with username during inspection of the form
> > > definition as it'll look at it and go "nope, this ain't a django
> > > formfield, just some tuple"
> >
> > Ah, right.  Thanks for pointing out the explanation.  Doing something to
> > make Django fail loudly for stuff like this (I recall it tripping up
> someone
> > once on a model definition as well) might be worthwhile.  The current
> > no-error-but-really-confusing-results behavior is not ideal.
> >
> > Karen
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Replicating Google Groups in Django

2009-10-23 Thread Lakshman Prasad
You should use the lamson project, by Zed Shaw: http://lamsonproject.org/

On Fri, Oct 23, 2009 at 6:36 PM, Julien Phalip  wrote:

>
> Hi,
>
> On one site I'm considering the possibility of replicating the (basic)
> functionality of Google Groups in Django. The idea is:
>
> - There would be 5 different mailing lists. Users can subscribe to one
> or more lists.
> - People can purely use emails to access the lists.
> - All the emails can then also be seen via a web interface.
>
> I've been thinking of using Mailman to leverage all the email
> management part. But now I'm not sure how to reliably sync the Mailman
> subscription system with django.contrib.auth.
>
> I don't think there's any straight forward to do this. Would you have
> any advice to get me started?
>
> Thanks!
>
> Julien
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Just upgraded to 1.1, can't start development server, TypeError

2009-10-14 Thread Lakshman Prasad
Seems like, some of the apps that you have in settings.py INSTALLED_APPS are
there in the pythonpath for python2.5 and not for python2.6.
You will need to do a easy_install-2.6 (or a corresponding pip/distribute
equivalent) package_name

On Wed, Oct 14, 2009 at 11:48 AM, eculver  wrote:

>
> I just tried upgrade to django 1.1, ran ./manage.py runserver, but was
> promptly halted due to this exception:
>
> ...
>
> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
> site-packages/django/utils/translation/trans_real.py", line 180, in
> _fetch
>app = import_module(appname)
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/site-packages/django/utils/importlib.py", line 35, in
> import_module
>__import__(name)
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/site-packages/django/contrib/admin/__init__.py", line 1, in
> 
>from django.contrib.admin.options import ModelAdmin, HORIZONTAL,
> VERTICAL
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/site-packages/django/contrib/admin/options.py", line 5, in
> 
>from django.contrib.contenttypes.models import ContentType
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/site-packages/django/contrib/contenttypes/models.py", line
> 1, in 
>from django.db import models
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
> python2.6/site-packages/django/db/__init__.py", line 57, in 
>'TIME_ZONE': settings.TIME_ZONE,
> TypeError: __init__() takes exactly 1 argument (2 given)
>
> Everything worked fine in 1.0.4 before the upgrade. Seems like it may
> be an obvious upgrade problem/oversight on my part. Any ideas?
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



Session data passing after login

2009-10-12 Thread Lakshman Prasad
Hi,
On a user login, the session key changes. This makes the data stored in the
session before user logging in, inaccessible.

But the session data before user login is required in so many cases, say for
instance, a shopping cart.

How to pass the session data of the anonymous user to the logged in user?
-

Not exactly the same, but on a related note, when the anonymous user makes a
post request to a @login_required view, how to preserve the post data.
Currently, it seems like the post data is discarded. On googling, I found
that this was a feature in the earlier django release, but removed due to
some security vulnerability:
http://www.djangoproject.com/weblog/2008/sep/02/security/

With signed cookies and the like that are done recently, is it still a
vulnerability?

-- 
Regards,
Lakshman
becomingguru.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: Django documentation site is SLOW

2009-08-08 Thread Lakshman Prasad
Indeed for most of the people in this group Django documentation is very
often consulted resource.
It makes a lot of sense to have those locally. If you have a svn co,
documentation is within the checkout, so you need to browse to
file:///home/name/django-trunk/docs/_build/html/index.html and you have it
locally all the time, with all the latest updates. Just bookmark the
location.

After each svn update run a command `make html` from the docs folder. (you
may first need to easy_install sphinx)

Hope this helps.

On Sat, Aug 8, 2009 at 1:24 PM, Torsten Bronger <
bron...@physik.rwth-aachen.de> wrote:

>
> Hallöchen!
>
> Malcolm Tredinnick writes:
>
> > On Sat, 2009-08-08 at 00:14 -0700, Thierry wrote:
> >
> >> Just wanted to add my own testimony: I too, noticed serious
> >> performance issues with Firefox when consulting Django
> >> documentation.
> >
> > "Performance issues" could many a myriad of things. Is it slow to
> > render, or slow to load the data? Or slow to update as you scroll
> > through the page?
>
> While loading the pages is sufficiently fast for me, scrolling has
> always been slightly annoying for me, with various FFs on various
> computers.  I experience this only on Django's documentation site,
> although it may well be on other sites which are less important to
> me, too.
>
> Funny enough, scrolling with the scroll bar is rather smooth, while
> scrolling with the mouse wheel or cursor keys is very jerky.  I'm
> pretty sure that it has to do with the CSS for the greenish code
> snippets.  The kind of flickering suggests that the definition of
> the upper edge of the inserts (margin/padding/broder/whatever) may
> contain some sort of CSS hack which is too complicated for Firefox.
> But this is just a guess.
>
> Additionally, in very rare cases, artifacts remain on the canvas
> because flaws in FF's rendering engine are triggered by Django's
> CSS.
>
> Tschö,
> Torsten.
>
> --
> Torsten Bronger, aquisgrana, europa vetus
>   Jabber ID: torsten.bron...@jabber.rwth-aachen.de
>  or http://bronger-jmp.appspot.com
>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Django file upload. 'None'

2009-08-04 Thread Lakshman Prasad
You need to set the form with the request file, which I think you may have
missed:
from appname.forms import ImageForm
form = ImageForm(request.POST,request.FILES)

>From the documentation:
http://docs.djangoproject.com/en/dev/topics/http/file-uploads/#basic-file-uploads

On Tue, Aug 4, 2009 at 8:30 PM, Martje  wrote:

>
> One question though. Even when it is in request.FILES, it doesn't get
> saved like I expected it would.
>
> I expected Django to upload my image to "media/afbeeldingen/
> gastenboek/" ánd validate if it is an image or not (I've change
> FileField to ImageField).
>
> Why doesn't Django do this?
>
> On 4 aug, 15:19, Martje  wrote:
> > You're right, that was the problem. Thanks!
> >
> > On Aug 4, 2:18 pm, James Bennett  wrote:
> >
> > > On Tue, Aug 4, 2009 at 7:08 AM, Martje
> wrote:
> > > > This seem ok, since I only used field 3 and 1. But when I look at
> > > > request.FILES, I get:
> >
> > > > 
> >
> > > > It shouldn't be empty, should it?
> >
> > > If you've forgotten to set the 'enctype' attribute of the HTML 
> > > element properly, you won't get any files sent. The documentation
> > > covers this and how to programmatically detect forms which need it:
> >
> > >http://docs.djangoproject.com/en/dev/ref/forms/api/#testing-for-multi.
> ..
> >
> > > --
> > > "Bureaucrat Conrad, you are technically correct -- the best kind of
> correct."
> >
> >
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Stuck re:Practical Django Projects 2nd E...

2009-07-18 Thread Lakshman Prasad
If you get a page not found, verify the slug (the entire url pattern for
that pattern), either from the console or admin, that it exists.

On Sat, Jul 18, 2009 at 4:30 PM, Rob B (uk) wrote:

>
> Bit stumped on chapter 4.
>
> Every thing is working except I'm getting a 'Page not found (404)'
> when I try to view any entries.
>
> View:
> def entry_detail(request, year, month, day, slug):
>import datetime, time
>date_stamp = time.strptime(year+month+day, "%Y%b%d")
>pub_date = datetime.date(*date_stamp[:3])
>return render_to_response('coltrane/entry_detail.html',
>  { 'entry': Entry.objects.get
> (pub_date__year=pub_date.year,
>
> pub_date__month=pub_date.month,
>
> pub_date__day=pub_date.day,
>
> slug=slug) })
>
> Url:
> (r'^weblog/(?P\d{4})/(?P\w{3})/(?P\d{2})/(P?[-
> \w]+)/$', 'coltrane.views.entry_detail'),
>
>
> Any ideas?
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Saving Data To Your DB. Simple?

2009-07-14 Thread Lakshman Prasad
> It runs OK (no errors) but doesn't save a single thing
 It has to run without errors because you have enclosed the whole thing
in try.

 You have to coerce the record_id and user_id into int before assigning
to the model fields, for it to save.

On Tue, Jul 14, 2009 at 9:45 PM, The Danny Bos  wrote:

>
> Heya, am trying to simply save 3 values to a database, without using
> Forms.
>
> In the Template:
>
> 
>
>
>Rate This: {% for n in numbers %} value="{{ n }}">{{ n }}{% endfor %}
>
> 
>
> In the View:
>
> from mysite.rating.models import Rating
> def critics_rating(request):
>try:
>record_id = request.POST['record_id']
>user_id = request.POST['user_id']
>rating_val = request.POST['rating']
>
>rating = Rating()
>rating.rating = rating_val
>rating.item = record_id
>rating.writer = user_id
>rating.save()
>
>return HttpResponseRedirect('/')
>except:
>pass
>obj = Record.objects.get(id=record)
>return render_to_response('record/detail.html', {'object_detail':
> obj}, context_instance=RequestContext(request))
>
> It runs OK (no errors) but doesn't save a single thing, also it goes
> back to the 'detail.html' page fine, but when you hit reload, it sends
> the data again. Again, not saving.
>
> Any ideas what's wrong with this?
> I've done a lot of searching but all people seem to use the Forms
> widget, I was thinking as this is only three fields I'd skip that.
> Silly?
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Deployment dilemma

2009-07-14 Thread Lakshman Prasad
zc.buildout  enables reproducible
build and deployments. pip offers a simple solution by the way of freeze and
requirements file at server.

On Tue, Jul 14, 2009 at 9:33 PM, Alex Gaynor  wrote:

>
>
> On Tue, Jul 14, 2009 at 10:46 AM, Rama Vadakattu  > wrote:
>
>>
>> I have a django project with N number of dependencies to other
>> packages.
>> Now i want to deploy the project on production server?
>>
>> As of now iam doing this.
>> 1.Move the django project to production server.
>> 2.install the dependencies on production server similar to that of the
>> way i have done on local system.
>>
>> Is it the right approach?
>> i feel reinstalling dependencies again on production server is
>> tedious.
>>
>> i would like to know how everyone  is dealing with the above problem.
>>
>> --rama
>>
>>
>>
>>
>>
>>
>>
> Take a look at PIP and it's requirement file system, which I think for
> python packages is a good solution.  If you have OS level dependencies (such
> as the stuff GIS relies on) you'll probably need to see what tools your
> packages manager offers.
> Alex
>
> --
> "I disapprove of what you say, but I will defend to the death your right to
> say it." -- Voltaire
> "The people's good is the highest law." -- Cicero
> "Code can always be simpler than you think, but never as simple as you
> want" -- Me
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Style sheet not working after shifting from desktop to laptop

2009-07-14 Thread Lakshman Prasad
Either you have a wrong directory pointed to, in your settings.py file for
static media; or you haven't configured django to serve them.

You need to define MEDIA_ROOT and MEDIA_URL in the settings.py
appropriately. Once you have done that, you can setup django to serve those
during development, by using the following pattern in the urls.py.

urlpatterns += patterns('django.views.static',
(r'^app/(?P.*)$', 'serve', { 'document_root':
settings.DIRNAME,
'show_indexes': True }),
)


On Tue, Jul 14, 2009 at 11:22 AM, djangonoob  wrote:

>
> Hi, I have developed a simple application on my desktop computer
> successfully using django 1.02, Ubuntu 9.04, python version 2.6.2
>
> I copied my files over to my laptop computer and did the following:
> 1) ran the django-admin.py startproject projectName
> 2) cd to projectName folder, and ran the python manage.py startapp
> appName.
>
> After which i copied my application folder over to appName with the
> same name.
>
> Than i ran python manage.py runserver on my laptop
>
> My application works, but than the css style sheet is not working; my
> application has no style.
>
> But upon inspecting the source code of the generated page, the  rel="stylesheet" href="/media_user/css/style.css" type="text/css" />
> url and others are correct.
>
> But the style simply does not show.
>
> Anyone faced this problem before and solve it?
>
> best Regards.
>
> >
>


-- 
Regards,
Lakshman
http://uswaretech.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: Complex form for a newbie with ImageField and ForeignField

2009-07-14 Thread Lakshman Prasad
You could replace in the view:

if form_upload.is_valid():
  form_upload.save()


# with this:

if form_upload.is_valid():
  form_upload.user = request.user
  form_upload.save()


You may also want to not display the user field in the form. You can do it
by defining an 'exclude' Meta class attribute for the ModelForm, as done
below. I believe you can also hide a field in the form by marking it
"editable=False" in its model's field definition.

class FormUpload(forms.ModelForm):

class Meta:
model = ModelName
exclude = ('user',)




On Tue, Jul 14, 2009 at 5:53 PM, djangonoob  wrote:

>
> I'm using django 1.02, Ubuntu 9.04, python 2.6.2
>
> Issue: I am creating a simple application that allows users to upload
> images.
> I'm using the User from django.contrib.auth.models to manage my users.
> For the image class, i have a ForeignKey to the user and a ImageField
> to store my images
>
> My application works perfectly, except that:
> when the user uploads images, the images will be linked to the user
> himself.
> However, on the upload form, i have a option selection box where all
> the usernames are selectable.
>
> How do i fix the views.py, models.py such that the user can only
> upload images using
> his own username and at the same time, without having to select his
> username from the dropdown selection box?
>
> The following is my code:
> http://dpaste.com/66944/
>
> Thank you in advance.
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Best distro for django

2009-07-04 Thread Lakshman Prasad
For one, you could use the much more feature
full with tab auto complete debugger, ipdb.
But I just verified that, even pdb.set_trace() works well with arrow
keys, on my system. Python 2.6.2 GNome Terminal 2.26

On Sat, Jul 4, 2009 at 2:19 PM, wei ribao  wrote:

>
> Sorry if I did not describe the problem clear.
>
> It is , in ubuntu, in the terminal sometimes I cannot use the left key and
> some other keys in the shell, I press the left key the cursor will not go
> left, instead it displays something like "^X[[". Normally everything is ok,
> but in some interative environment, say, the environment brought by
> "pdb.set_trace()", this problem happens.
>
>
> On Sat, Jul 04, 2009 at 11:43:45AM +0530, Lakshman Prasad wrote:
>>>Thats strange; Can you elaborate the problem a little;
>>>
>>>I have been  using Ubuntu9.04 and I couldn't be happier. I don't know
> how any
>>>other environment can be even more conducive to development.
>>>
>>>2009/7/4 wei ribao 
>>>
>>>
>>>I am using ubuntu9.04 too. I have a long-standing trouble.
>>>
>>>When using pdb to debug, set pdb.set_trace() to bring up the
> interactive
>>>shell, i cannot use arrow keys.
>>>
>>>It is all ok in windows. And I can find anything from google.
>>>
>>>How do you guys slove that?
>>>
>>>On Fri, Jul 03, 2009 at 03:56:14PM -0400, Vitaly Babiy wrote:
>>>   >>I use Ubuntu 9.04, works great on a XPS M1530 Laptop
>>>   >>
>>>   >>Vitaly Babiy
>>>   >>
>>>   >>
>>>   >>On Fri, Jul 3, 2009 at 2:36 PM, developingchris <
>>>developingch...@gmail.com>
>>>   >>wrote:
>>>   >>
>>>   >>
>>>   >>Looking for opinion of the best distro for a developer
> machine for
>>>   >>django.
>>>   >>
>>>   >>I'm on ubuntu now, its going ok. I'm having keyboard
> issues, and
>>>   >>wondering if I should put the time in on fixing it, or
> just ditch
>>>it
>>>   >>for say, pc-bsd, if thats what the cool django kids are
> using.
>>>   >>
>>>   >>
>>>   >>
>>>   >>
>>>   >>
>>>   >>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>--
> >>Regards,
>>>Lakshman
>>>becomingguru.com
>>>lakshmanprasad.com
>>>
>>>>>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Best distro for django

2009-07-03 Thread Lakshman Prasad
Thats strange; Can you elaborate the problem a little;
I have been  using Ubuntu9.04 and I couldn't be happier. I don't know how
any other environment can be even more conducive to development.

2009/7/4 wei ribao 

>
> I am using ubuntu9.04 too. I have a long-standing trouble.
>
> When using pdb to debug, set pdb.set_trace() to bring up the interactive
> shell, i cannot use arrow keys.
>
> It is all ok in windows. And I can find anything from google.
>
> How do you guys slove that?
>
> On Fri, Jul 03, 2009 at 03:56:14PM -0400, Vitaly Babiy wrote:
>>>I use Ubuntu 9.04, works great on a XPS M1530 Laptop
>>>
>>>Vitaly Babiy
>>>
>>>
>>>On Fri, Jul 3, 2009 at 2:36 PM, developingchris <
> developingch...@gmail.com>
>>>wrote:
>>>
>>>
>>>Looking for opinion of the best distro for a developer machine for
>>>django.
>>>
>>>I'm on ubuntu now, its going ok. I'm having keyboard issues, and
>>>wondering if I should put the time in on fixing it, or just ditch
> it
>>>for say, pc-bsd, if thats what the cool django kids are using.
>>>
>>>
>>>
>>>
>>>
>>>>>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



django development addons

2009-06-19 Thread Lakshman Prasad
Hi,
I have come across various development add ons, particularly,

django-extensions

django-annoying 

django-debug-toolbar

Just in the other thread
django-tools 

I
haven't exactly tried all of these. I would like to know some
interesting use cases or blog posts of
people who use them.

Given that django pretty error pages are wonderful themselves, I want to see
how, many of the debugging tools add more value.

-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: django-admin loaddata and dumpdata problem.

2009-05-29 Thread Lakshman Prasad
The latter problem is solved. It was just a mysql integrity error because of
a larger field name.
I just resized the field sizes and it works!

On Fri, May 29, 2009 at 8:44 PM, Lakshman Prasad wrote:

> I performed *python2.5 manage.py dumpdata* on a project folder and
> received the following error:
>
> Error: Unable to serialize database: Project matching query does not exist.
>
> Also, I have a file dump.xml obtained by dumpdata on a different
> environment. The loaddata stops abruptly leaving the following traceback:
> http://dpaste.com/hold/49035/
>
> There are associated folders with names /report /pictures, that I have
> placed in the same folder as the manage.py. The dump.xml is also in the same
> folder.
>
> If it matters, I am using mysql. What am I doing wrong, How do I load the
> data properly. Thanks in advance.
> --
> Regards,
> Lakshman
> becomingguru.com
> lakshmanprasad.com
>



-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



django-admin loaddata and dumpdata problem.

2009-05-29 Thread Lakshman Prasad
I performed *python2.5 manage.py dumpdata* on a project folder and received
the following error:

Error: Unable to serialize database: Project matching query does not exist.

Also, I have a file dump.xml obtained by dumpdata on a different
environment. The loaddata stops abruptly leaving the following traceback:
http://dpaste.com/hold/49035/

There are associated folders with names /report /pictures, that I have
placed in the same folder as the manage.py. The dump.xml is also in the same
folder.

If it matters, I am using mysql. What am I doing wrong, How do I load the
data properly. Thanks in advance.
-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: "Conditional fields" in forms

2009-05-28 Thread Lakshman Prasad
You will need to use dynamic forms.

On Thu, May 28, 2009 at 1:02 AM, Jochem Berndsen  wrote:

>
> All,
>
> Is there an easy way to include "conditional fields" in forms within the
> Django framework. By "conditional fields", I mean fields that are shown
> or not shown depending on earlier choices the user made in the form.
> What would be the canonical way to implement this?
>
> Thanks for your consideration.
> Regards,
>
> --
> Jochem Berndsen | joc...@functor.nl
> GPG: 0xE6FABFAB
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: How to write subdomain from django apps

2009-05-21 Thread Lakshman Prasad
Here is one interesting open source implementation:
http://uswaretech.com/blog/2009/03/django-subdomains-easily-create-subscription-based-subdomains-enabled-webapps/

On Fri, May 22, 2009 at 12:20 AM, Tom Evans wrote:

>
> On Thu, 2009-05-21 at 16:24 +1000, Joshua Partogi wrote:
> > Sorry for this lame question.
> >
> > I just saw an application called suggestionbox.com and it's able to
> > write subdomain based on the customer id. Do we access and write BIND
> > configuration on the fly for this? Or is there a better way to do it?
> >
> > Anyone that has experience with this?
> >
> > Thanks very much in advance for sharing
> >
> > --
> > Join Scrum8.com.
> >
> > http://scrum8.com/member/jpartogi/
> > http://twitter.com/scrum8
> >
>
> Google for "bind wildcard subdomain" and enjoy.
>
> HTH
>
> Tom
>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Best Django host

2009-05-20 Thread Lakshman Prasad
In a sentence, to sum it up, Use Slicehost for VPS and Webfaction for shared
servers. Go shopping if you want to save some bucks and dont mind some extra
effort for installation.

On Wed, May 20, 2009 at 11:19 PM, ringemup  wrote:

>
>
> FWIW, I got django working on Dreamhost by basically using the
> instructions here:
>
>
> http://www.soasi.com/2008/09/django-10-on-dreamhost-with-passenger-mod_rails/
>
>
> On May 20, 1:13 pm, Masklinn  wrote:
> > On 20 May 2009, at 17:10 , Aneesh wrote:
> >
> > > I've set up a couple Django sites on Dreamhost, as well as one on
> > > Webfaction.   Webfaction is great.  Dreamhost requires lots of
> > > tweaking, but you can definitely run a Django site just fine there
> > > too.  I've had no issues with uptime.  If you need help setting it up
> > > on Dreamhost, check out Jeff Croft's helpful guide:
> > >http://jeffcroft.com/blog/2006/may/11/django-dreamhost/.
> >
> > Note that since Jeff's post Dreamhost added Phusion Passenger. Their
> > addition of mod_rails doesn't sound that useful, until you know it
> > supports wsgi (though that's experimental accodring to phusion).
> >
> > I haven't done performance (/stability/scalability) tests, but I did
> > test deployment of a very basic django app and the deployment is as
> > trivial as with mod_wsgi, and seems to work.
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Template tags and variables overlapping

2009-04-30 Thread Lakshman Prasad
Why cant you just do something like

{% sayHello " Hello Robert and " %} {{ currentname }}

2009/4/30 Julián C. Pérez 

>
> hi u all... again
> this has become my first resource on getting help
> a new doubt i have...
> in templates...
> i have a variable, let's say varOne -suposse it's equal to "Kathleen"
> ... {{ currentName }} ...
> and i have created a custom tag which takes an argument, called
> sayHello
> ... {% sayHello "Robert and Mary" %} ... > this would output 'Hello
> Robert and Mary'
> but if i do something like:
> ... {% sayHello "Robert and {{ currentName }}" %} ... > this would
> output 'Hello Robert and {{ currentName }}'
> needless to say i want some output like 'Hello Robert and Kathleen'
>
> how can i get this to work??
> thank u all!
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Google Appengine patch and Apengine Helper

2009-04-27 Thread Lakshman Prasad
I managed to successfully use the second app (appengine-patch). Thanks.

> but there has not been any visible activity
> on 1)app-engine Django since about August 08

Altho' there hasn't been a release, there has been continuous (weekly)
activity even in the earlier helper project.
http://code.google.com/p/google-app-engine-django/source/list

I am definitely looking forward to the day when django works on appengine
out of the box. Is that feasible? Can there be a generic mapper from ORM to
Bigtable?

The admin console of appengine is awesome. Are there any other webhosts that
provide a similar interface with all that detail?

On Mon, Apr 27, 2009 at 8:05 AM, dartdog  wrote:

>
> Well,, both have issues,, but there has not been any visible activity
> on 1)app-engine Django since about August 08. While the lone developer
> on 2)App engine patch is working hard daily..
>
> I have seen a few posts that others have abandoned # 1 in favor of # 2
> but the projects need more people to contribute!
>
> It appears that the Django community has not found this (app-engine
> support) to be a high priority. you can search for conversations from
> back in Feb that indicate this.
>
> The differing data models are really quite problematic.
>
>
> On Apr 25, 5:56 pm, Lakshman Prasad  wrote:
> > I see 2 different django projects for porting django app to app-engine
> >
> >
> http://code.google.com/p/app-engine-patch/http://code.google.com/p/google-app-engine-django/
> >
> > I'd like to know the preferred module to use and the relative benefits
> and
> > problems.
> >
> > Thanks in advance.
> >
> > --
> > Regards,
> > Lakshman
> > becomingguru.com
> > lakshmanprasad.com
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



Google Appengine patch and Apengine Helper

2009-04-25 Thread Lakshman Prasad
I see 2 different django projects for porting django app to app-engine

http://code.google.com/p/app-engine-patch/
http://code.google.com/p/google-app-engine-django/

I'd like to know the preferred module to use and the relative benefits and
problems.

Thanks in advance.

-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



Authorize.net integration problem

2009-03-31 Thread Lakshman Prasad
Hi,

I am trying to integrate Authorize.net SIM API into django views.

I am facing a problem in the fingerprint generation. I am repeatedly getting
that the fingerprint generated doesn't match the one the server generates.

I have generated the md5 hash with the key provided as specified in the SIM
documentation.

Here is the code:

params = {
> 'x_login' : '4ffrBT36La',
> 'x_amount' : '100.00',
> 'x_show_form' : 'PAYMENT_FORM',
> 'x_type' : 'AUTH_CAPTURE',
> 'x_method' : 'CC',
> 'x_fp_sequence' : '123',
> 'x_version' : '3.1',
> 'x_relay_response' : 'FALSE',
> }
> params['x_fp_timestamp'] = int(time.time())
>
> msg = '^'.join([params['x_login'],
>str(params['x_fp_sequence']),
>str(params['x_fp_timestamp']),
>str(params['x_amount'])
>])+'^'
>
> fingerprint = hmac.new('9LyEU8t87h9Hj49Y',msg).hexdigest()
>
>
I would be glad if some one that has dealt with this earlier, points out
what the glitch is. Thanks in advance.


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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: Django and IIS 7

2009-03-26 Thread Lakshman Prasad
django working on Jython was a Google Summer of Code project.

I am not aware of any project of porting django to work on IronPython.

On Thu, Mar 26, 2009 at 8:02 PM, P M  wrote:

>  IronPython is not CPython , i will be amazed if these two works
> identically ...
>
> On Thu, Mar 26, 2009 at 2:54 PM, Adi Sieker  wrote:
>
>>
>> Hi,
>>
>> On 26.03.2009, at 14:21, Sergey Petrov wrote:
>>
>> >
>> > I've blown my brains away, trying to make django work under IIS7 on
>> > Windows Server 2008.
>> >
>> > I've tried PyISAPIe. I've tried fastcgi module.
>> >
>> > I'm no guru of windows, not even a expirienced user, though.
>> >
>> > Google tells nothing about django on IIS7.
>> >
>> > So, I'm begging you — please, anyone, give me a hint (better — step by
>> > step howto) — how to make it work.
>> >
>> > Performance is not in question — anything that works will do.
>> >
>> > Thanks a lot.
>> >
>>
>> I have no idea about IIS, but a quick google for django on iis7 turned
>> up this:
>> http://ironpython-urls.blogspot.com/2008/11/wsgi-on-net-and-in-cloud.html
>>
>> adi
>>
>>
>>
>
>
> --
> If you spin an oriental man, does he become disoriented?
> (-: ¿ʇɥǝɹpɹǝʌ ɟdoʞ uǝp ɹıp ɥɔı ,qɐɥ 'ɐɐu
>
> is der net süß » ε(●̮̮̃•̃)з
> -PM
>
>
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



django with wing IDE

2009-03-24 Thread Lakshman Prasad
Hi,

With the latest beta version of Wing 3.2, the auto complete of attributes
happen during debug, by sniffing the current python namespace.

This means that, even the ORM objects should auto complete in the IDE.

But hooking wing run to django run server itself is a huge process.

Can somebody who has successfully accomplished both suggest me how to, or
guide me to appropriate resources, if any.

Thanks in advance!

-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---



django admin

2009-03-24 Thread Lakshman Prasad
Hi,

I was thinking that django admin is an utility to provide trusted
administrators of the site, full access to the site's data model.

However, after going through django admin in detail, I understand that it is
very powerful set of views and templates that one can use to create an
entire application.

How often do you create an entire application using admin alone? Is it
easier to create using views itself than customising admin that much?

How about building prototype using admin. Do we even need to build
prototype? The admin customization cannot be re-used in real application.

If I want to use a part of the admin code in real application (with
different templates), is there some kind of scaffolding option available?

Thanks in advance!

-- 
Regards,
Lakshman
uswaretech.com
becomingguru.com
lakshmanprasad.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: Sort of OT on the django book

2009-03-18 Thread Lakshman Prasad
I do not get these comments even on firefox on ubuntu. I know, my colleagues
do get it on FF on ubuntu, But I dont.

Thanks for pointing, it is done. I am going to read it too. BTW, when is
James Bennet's book 2.0 release?

On Thu, Mar 19, 2009 at 12:11 AM, waltbrad  wrote:

>
> Since the Django book 2.0 is up and ready, I'm doing a read of it. At
> first I was using firefox to read it but decided to switch over to
> Opera so that I could use Opera's note taking feature.
>
> One of the interesting things about the 2.0 book is it's commenting
> feature. But this doesn't show up in Opera.  Does anyone know why this
> is?  Is this a javascript feature or CSS?
>
> It shows up in Safari, but not in IE7.
> >
>


-- 
Regards,
Lakshman
becomingguru.com
lakshmanprasad.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
-~--~~~~--~~--~--~---