Re: Why does django default to Chicago time?

2012-02-15 Thread Mario Gudelj
I believe that people who created Django are from there. :)

On 16 February 2012 14:46, Roy Smith  wrote:

> In the default settings.py file, the timezone is set to:
>
> TIME_ZONE = 'America/Chicago'
>
> Why?  Wouldn't None (to match the server's time zone) be a more sane
> default?  Even setting it to UTC would be more reasonable than setting it
> to any specific timezone, but surely going with the system default is the
> best of all.
>
> --
> 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/-/_kKC8BMhA-kJ.
> 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.



Django 1.4 beta 1 released

2012-02-15 Thread James Bennett
Hot off the presses, it's the first Django 1.4 beta! Blog post with
more information is here:
https://www.djangoproject.com/weblog/2012/feb/15/14-beta-1/


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

-- 
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: import problem

2012-02-15 Thread Furbee
Can you reply with the actual NameError Exception? Like: NameError: globalname
'datetime' is not defined, or whatever it is. From the module that is
throwing this error are you importing anything else that is importing an
overridden date method or datetime object?

You can also try this (instead of "import datetime"):

from datetime import date

On Wed, Feb 15, 2012 at 7:48 PM, Scott  wrote:

> Hello,
> I'm having a strange issue and have already spent an hour trying to
> figure it out.
>
> I created a python app called mn.  Then I setup all my models and
> stuff to work under mn.hcp.  Everything has been working fine until I
> tried to use date time in a py file in the hcp directory.
>
> I've imported datetime, with import date time at the top of my py
> file.  Then within the file I have a class with an internal method
> trying to use some date functions.
>
> datetime.date(2003,11,11)
>
> For some reason I am getting a NameError on the datetime object.  I
> don't understand why this is happening after I've imported datetime.
> Any help would be appreciated.  Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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: import problem

2012-02-15 Thread DrBloodmoney
On Wed, Feb 15, 2012 at 10:48 PM, Scott  wrote:
> Hello,
> I'm having a strange issue and have already spent an hour trying to
> figure it out.
>
> I created a python app called mn.  Then I setup all my models and
> stuff to work under mn.hcp.  Everything has been working fine until I
> tried to use date time in a py file in the hcp directory.
>
> I've imported datetime, with import date time at the top of my py
> file.  Then within the file I have a class with an internal method
> trying to use some date functions.
>
> datetime.date(2003,11,11)
>
> For some reason I am getting a NameError on the datetime object.  I
> don't understand why this is happening after I've imported datetime.
> Any help would be appreciated.  Thanks.

You probably have some sort of namespace collision. Look for circular
imports or import modules with the same name etc.

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



load settings on database

2012-02-15 Thread Anderson Borges
Hey guys 
I am learning django and I have a question 
I have a table in my database call SettingsUser so how can I load this table to 
all views on my application?
I do not want past and copy to each function in my view and I don't know if I 
can load just once before de view is call.
thanks. :D

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



import problem

2012-02-15 Thread Scott
Hello,
I'm having a strange issue and have already spent an hour trying to
figure it out.

I created a python app called mn.  Then I setup all my models and
stuff to work under mn.hcp.  Everything has been working fine until I
tried to use date time in a py file in the hcp directory.

I've imported datetime, with import date time at the top of my py
file.  Then within the file I have a class with an internal method
trying to use some date functions.

datetime.date(2003,11,11)

For some reason I am getting a NameError on the datetime object.  I
don't understand why this is happening after I've imported datetime.
Any help would be appreciated.  Thanks.

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



Why does django default to Chicago time?

2012-02-15 Thread Roy Smith
In the default settings.py file, the timezone is set to:

TIME_ZONE = 'America/Chicago'

Why?  Wouldn't None (to match the server's time zone) be a more sane 
default?  Even setting it to UTC would be more reasonable than setting it 
to any specific timezone, but surely going with the system default is the 
best of all.

-- 
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/-/_kKC8BMhA-kJ.
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: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
but on which method of the class view?

the post method?

On Feb 16, 12:03 pm, Matt Schinckel  wrote:
> You can use the @method_decorator decorator decorator.
>
> https://docs.djangoproject.com/en/dev/topics/class-based-views/#decor...

-- 
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: Where are the 2+ places user_id is defined?

2012-02-15 Thread Furbee
Did you try Alasdair's answer from the question you posed on StackOverflow (
http://stackoverflow.com/questions/9302434/when-i-try-a-syncdb-where-is-the-duplicate-user-id-error-coming-from
)?

Syncdb is trying to create a new superuser, but it fails when it creates
the related user profile because there is already a user profile with that
user_id in the database.

If you are currently developing, then the easiest thing to do is to drop
the user profile table and let syncdb recreate it. Alternatively you could
delete the unneeded user profiles in the shell.

Furbee

On Wed, Feb 15, 2012 at 3:49 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> P.S. The source is at http://JonathansCorner.com/project/pim.tgz.
>
>
> On Wed, Feb 15, 2012 at 3:40 PM, Christos Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> I forgot to specify where. The traceback is on a '''python manage.py
>> syncdb''', and happens immediately after the password is entered twice.
>>
>>
>> On Wed, Feb 15, 2012 at 3:39 PM, Christos Jonathan Hayward <
>> christos.jonathan.hayw...@gmail.com> wrote:
>>
>>> I'm getting an error:
>>>
>>> Traceback (most recent call last):
>>>   File "manage.py", line 14, in 
>>> execute_manager(settings)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 438, in execute_manager
>>> utility.execute()
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 379, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 191, in run_from_argv
>>> self.execute(*args, **options.__dict__)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 220, in execute
>>> output = self.handle(*args, **options)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 351, in handle
>>> return self.handle_noargs(**options)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>>> line 109, in handle_noargs
>>> emit_post_sync_signal(created_models, verbosity, interactive, db)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/sql.py",
>>> line 190, in emit_post_sync_signal
>>> interactive=interactive, db=db)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>>> line 172, in send
>>> response = receiver(signal=self, sender=sender, **named)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>>> line 70, in create_superuser
>>> call_command("createsuperuser", interactive=True)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>>> line 166, in call_command
>>> return klass.execute(*args, **defaults)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>>> line 220, in execute
>>> output = self.handle(*args, **options)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
>>> line 134, in handle
>>> User.objects.create_superuser(username, email, password)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>>> line 140, in create_superuser
>>> u = self.create_user(username, email, password)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>>> line 136, in create_user
>>> user.save(using=self._db)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>>> line 460, in save
>>> self.save_base(using=using, force_insert=force_insert,
>>> force_update=force_update)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>>> line 570, in save_base
>>> created=(not record_exists), raw=raw, using=using)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>>> line 172, in send
>>> response = receiver(signal=self, sender=sender, **named)
>>>   File "/Users/jonathan/pim/accounts/models.py", line 12, in
>>> create_user_profile
>>> UserProfile.objects.create(user = instance)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
>>> line 138, in create
>>> return self.get_query_set().create(**kwargs)
>>>   File
>>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
>>> line 360, in create
>>> obj.save(force_ins

Re: Where are the 2+ places user_id is defined?

2012-02-15 Thread Christos Jonathan Hayward
P.S. The source is at http://JonathansCorner.com/project/pim.tgz.

On Wed, Feb 15, 2012 at 3:40 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I forgot to specify where. The traceback is on a '''python manage.py
> syncdb''', and happens immediately after the password is entered twice.
>
>
> On Wed, Feb 15, 2012 at 3:39 PM, Christos Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> I'm getting an error:
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 14, in 
>> execute_manager(settings)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 438, in execute_manager
>> utility.execute()
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 379, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 191, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 220, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 351, in handle
>> return self.handle_noargs(**options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>> line 109, in handle_noargs
>> emit_post_sync_signal(created_models, verbosity, interactive, db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/sql.py",
>> line 190, in emit_post_sync_signal
>> interactive=interactive, db=db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 70, in create_superuser
>> call_command("createsuperuser", interactive=True)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 166, in call_command
>> return klass.execute(*args, **defaults)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 220, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
>> line 134, in handle
>> User.objects.create_superuser(username, email, password)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>> line 140, in create_superuser
>> u = self.create_user(username, email, password)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>> line 136, in create_user
>> user.save(using=self._db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 460, in save
>> self.save_base(using=using, force_insert=force_insert,
>> force_update=force_update)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 570, in save_base
>> created=(not record_exists), raw=raw, using=using)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File "/Users/jonathan/pim/accounts/models.py", line 12, in
>> create_user_profile
>> UserProfile.objects.create(user = instance)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
>> line 138, in create
>> return self.get_query_set().create(**kwargs)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
>> line 360, in create
>> obj.save(force_insert=True, using=self.db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 460, in save
>> self.save_base(using=using, force_insert=force_insert,
>> force_update=force_update)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 553, in save_base
>> result = manager._insert(values, return_id=update_pk, using=using)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
>> line 195, in _insert
>> return insert_query(self.model, values, **kwargs)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
>> line 1436, in insert_query
>> return query.get_compiler(us

Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Matt Schinckel
You can use the @method_decorator decorator decorator.

https://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-class-based-views

-- 
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/-/s5ShG52nRpcJ.
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: Mod_Wsgi + Apache 2.2 + Threads + httplib2

2012-02-15 Thread Graham Dumpleton


On Feb 14, 1:31 am, sbrandt  wrote:
> mod_wsgi doesn't support print, does it? Its usage should raise an
> exception.

Yes it does support 'print'. Read:

http://blog.dscpl.com.au/2009/04/wsgi-and-printing-to-standard-output.html

Graham

-- 
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: Where are the 2+ places user_id is defined?

2012-02-15 Thread Christos Jonathan Hayward
I forgot to specify where. The traceback is on a '''python manage.py
syncdb''', and happens immediately after the password is entered twice.

On Wed, Feb 15, 2012 at 3:39 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I'm getting an error:
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> execute_manager(settings)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 438, in execute_manager
> utility.execute()
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 379, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 191, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 220, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 351, in handle
> return self.handle_noargs(**options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
> line 109, in handle_noargs
> emit_post_sync_signal(created_models, verbosity, interactive, db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/sql.py",
> line 190, in emit_post_sync_signal
> interactive=interactive, db=db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
> line 70, in create_superuser
> call_command("createsuperuser", interactive=True)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 166, in call_command
> return klass.execute(*args, **defaults)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 220, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
> line 134, in handle
> User.objects.create_superuser(username, email, password)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
> line 140, in create_superuser
> u = self.create_user(username, email, password)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
> line 136, in create_user
> user.save(using=self._db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 460, in save
> self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 570, in save_base
> created=(not record_exists), raw=raw, using=using)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File "/Users/jonathan/pim/accounts/models.py", line 12, in
> create_user_profile
> UserProfile.objects.create(user = instance)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
> line 138, in create
> return self.get_query_set().create(**kwargs)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
> line 360, in create
> obj.save(force_insert=True, using=self.db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 460, in save
> self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 553, in save_base
> result = manager._insert(values, return_id=update_pk, using=using)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
> line 195, in _insert
> return insert_query(self.model, values, **kwargs)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
> line 1436, in insert_query
> return query.get_compiler(using=using).execute_sql(return_id)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
> line 791, in execute_sql
> cursor = super(SQLInsertCompiler, self).execute_sql(None)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/sit

Re: Need a Django/Python Freelancer (Paid Project)

2012-02-15 Thread creecode
How about a little more detail posted here to the list?  General parameters 
of how the website is to function?  Some specs?  You might generate more 
interest with more information.

Toodle-l...
creecode

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/nGl-yqlB_OEJ.
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.



[ANN]: FeinCMS v1.5.0.rc1

2012-02-15 Thread Matthias Kestenholz
Hello everyone

The first release candidate of FeinCMS v1.5 has just hit the streets,
late as always.

The release is available at the following places:

PyPI: http://pypi.python.org/pypi/FeinCMS
Github: https://github.com/feincms/feincms

Documentation:
http://readthedocs.org/docs/feincms-django-cms/en/next/

The release notes draft follows:


FeinCMS 1.5 release notes (upcoming)



Explicit reversing of URLs from ``ApplicationContent``-embedded apps


URLs from third party apps embedded via ``ApplicationContent`` have
been traditionally made reversable by an ugly monkey patch of
``django.core.urlresolvers.reverse``. This mechanism has been deprecated
and will be removed in future FeinCMS versions. To reverse an URL
of a blog entry, instead of this::

# deprecated
from django.core.urlresolvers import reverse
reverse('blog.urls/blog_detail', kwargs={'year': 2011, 'slug': 'some-slug'})

do this::

from feincms.content.application.models import app_reverse
app_reverse('blog_detail', 'blog.urls', kwargs={'year': 2011,
'slug': 'some-slug'})

If you do not want to use the monkey patching behavior anymore, set
``FEINCMS_REVERSE_MONKEY_PATCH = False`` in your settings file.

The new method is accessible inside a template too::

{% load applicationcontent_tags %}

{# You have to quote the view name and the URLconf as in Django's
future {% url %} tag. #}
{% app_reverse "blog_detail" "blog.urls" year=2011 slug='some-slug' %}


Inheritance 2.0
===

It's possible to use Django's template inheritance from third party
applications embedded through ``ApplicationContent`` too. To use this
facility, all you have to do is return a tuple consisting of the
template and the context. Instead of::

def my_view(request):
# ...
return render_to_response('template.html', {'object': ...})

simply use::

def my_view(request):
# ...
return 'template.html', {'object': ...}

.. note::

   ``template.html`` should extend a base template now.


Better support of ``InlineModelAdmin`` options for content types


The ``FeinCMSInline`` only differs from a stock StackedInline in
differing defaults of ``form``, ``extra`` and ``fk_name``. All inline
options should be supported now, especially ``raw_id_fields`` and
``fieldsets``.




Minor changes
=

* The main CMS view is now based on Django's class-based generic
  views. Inheritance 2.0 will not work with the old views. You don't
  have to do anything if you use ``feincms.urls`` (as is recommended).

* Request and response processors have been moved out of the
  ``Page`` class into their own module, ``feincms.module.page.processors``.
  They are still accessible for some time at the old place.

* ``django.contrib.staticfiles`` is now a mandatory dependency for
  the administration interface.

* The ``active`` and ``in_navigation`` booleans on the ``Page``
  class now default to ``True``.

* The minimum version requirements have changed. Django versions older than
  1.3 aren't supported anymore, django-mptt must be 0.4 upwards.

* The mptt tree rebuilders have been removed; django-mptt offers tree
  rebuilding functionality itself.

* ``django-queryset-transform`` has been imported under ``feincms.utils``
  and is used for speeding up various aspects of the media library. The
  prefilled attributes have been deprecated, because
  ``django-queryset-transform`` can be used to do everything they did,
  and better.

* ``PageManager.active_filters`` has been converted from a list to a
  ``SortedDict``. This means that replacing or removing individual
  filters has become much easier than before. If you only used the
  public methods for registering new filters you don't have to change
  anything.

* The same has been done with the request and response processors.

* The ``TemplateContent`` has been changed to use the ``filesystem`` and
  the ``app_directories`` template loaders directly. It can be used
  together with the cached template loader now.

* The tree editor has received a few usability fixes with (hopefully)
  more to come.

* ``Page.setup_request`` can be called repeatedly without harm now.
  The return value of the first call is cached and returned on
  subsequent calls which means that request processors are run
  at most once.

* Extensions such as ``translations`` and ``datepublisher`` which were
  only usable with the page module have been made more generic and are
  available for other FeinCMS-derived models too.

* Media files from the medialibrary can be exported and imported in
  bulk.

* When creating a new translation of a page, content is only copied
  from the original translation when the new page does not have any
  content yet. Furthermore the user is notified that some content-

Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
Thanks. But the more important question is how to use
commit_on_success with class based view?



On Feb 16, 1:52 am, 赵帅  wrote:
> The commit_on_success decorator only garrentees that one commit is done
> when no exception is raised from the function and rollback if there is any .
> You have to ensure on your own hand the values in the two tables are equal.
>
> 2012/2/15 Yann 
>
>
>
>
>
>
>
> > Hi,
>
> > In a class view, I am trying to modify two instances of different
> > models. There are some identical data stored in both tables. They
> > should really be the same in any circumstance .
>
> > Should I use "@commit_on_success"?
>
> > If I should, how should i use it for the class based view?
>
> > Should I do something like this?
>
> > class CreateSomethingView(CreateView):
>
> > ""
> > ""
> >    @method_decorator(transaction.commit_on_succes)
> >    def post(self):
> >       ""
>
> > --
> > 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: What is the best type of wood to use for staking vampires?

2012-02-15 Thread Furbee
Ha ha ha, that's funny!

On Wed, Feb 15, 2012 at 12:44 PM, James Pyrich  wrote:

> On 2/15/12 1:28 PM, Dennis Lee Bieber wrote:
>
>> On Wed, 15 Feb 2012 11:45:51 -0800, Furbee
>> wrote:
>>
>>  Is this posting a zombie? It doesn't seem to ever die no matter what we
>>> do
>>> to kill it! :-)
>>>
>>> More like a vampire -- we dispose of it, and then sometime later
>> someone pulls the stake out of the corpse and it comes back to drain the
>> life force of some newsgroup...
>>
> I think cedar is best though I have heard good things about hickory...
>
> --
> 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+unsubscribe@**
> 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.



What is the best type of wood to use for staking vampires?

2012-02-15 Thread James Pyrich

On 2/15/12 1:28 PM, Dennis Lee Bieber wrote:

On Wed, 15 Feb 2012 11:45:51 -0800, Furbee
wrote:


Is this posting a zombie? It doesn't seem to ever die no matter what we do
to kill it! :-)


More like a vampire -- we dispose of it, and then sometime later
someone pulls the stake out of the corpse and it comes back to drain the
life force of some newsgroup...

I think cedar is best though I have heard good things about hickory...

--
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 a Django/Python Freelancer (Paid Project)

2012-02-15 Thread yati sagade
can you email me the details? I'm a student in kolkata - I think I'm
interested.



On Wed, Feb 15, 2012 at 7:15 PM, shahzeb kohari  wrote:

> Hi all,
>
> I work for a small company in Mumbai, India.
> We need an internal social networking site for our employees.
> If any of you would be interested in 'providing a working set of codes
> strictly built from Django/Python to setup a social networking site', I
> would be happy to collaborate with you.
>
> This will be a paid-project on a milestone-pay-as-you-go basis. For more
> information, please write to me directly at skoh...@gmail.com.
>
> If this email is in violation of this Group's policies, then I
> unconditionally apologise and would request all to ignore it.
>
> Thanks,
> Shahzeb
>
> --
> 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.
>



-- 
Yati Sagade 

(@yati_itay )

-- 
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 example/tutorial for AJAX + Django

2012-02-15 Thread Antoni Aloy
You can learn AJAX and learn Django and then mix them together.
You can look at Dajaxice project http://www.dajaxproject.com/ it's a good start.

2012/2/15 H.T. Wei :
> Hi,
>
> I am new to Django and searched around for a good example/tutorial about
> AJAX + Django but most of them were not considered as complete.
> Can anyone suggest if there is a good (complete) example for learning AJAX +
> Django? Thanks in advance!
>
> --
>
> --
> 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.



-- 
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net

-- 
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: Response problem

2012-02-15 Thread Daniel Roseman
On Wednesday, 15 February 2012 19:02:51 UTC, Hans wrote:
>
> I'm using a form for my webpage that returns values with simillar key 
> values. Now for backend compatibility reasons I cannot change the key 
> variables. 
>
> This is the query dictionary returned from the HTML file. 
>  u'dsadasdadas'], u'first_name': [u'asdasdas'], u'last_name': 
> [u'dasdasdas'], u'security_number': [u'321'], u'address1': [u'yonge 
> street', u'bay street'], u'address2': [u'32131', u'111'], 
> u'card_type': [u'visa'], u'postal_code': [u'M2N7g0', u'M2N7G9'], 
> u'expiry_month': [u'12'], u'country': [u'CA', u'CA'], u'answer': 
> [u'Save'], u'expiry_year': [u'2014'], u'csrfmiddlewaretoken': 
> [u'454262933677675b67eb1e23147c60df'], u'phone_number': [u'21312312'], 
> u'card_number': [u'4111']}>" 
>
> whenever i use HttpResponse(request.POST['address1']) it prints out 
> 'bay street' when I would like it to print out the other value stored 
> in the key address1 which is 'yonge street'. How would I go about 
> accessing this other value in the key variable?


request.POST.getlist('address1')

However, if you're using a form, you should be accessing 
form.cleaned_data['address1'].
--
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/-/K0yaQtF8Mr0J.
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.



best example/tutorial for AJAX + Django

2012-02-15 Thread H.T. Wei
Hi,

I am new to Django and searched around for a good example/tutorial about
AJAX + Django but most of them were not considered as complete.
Can anyone suggest if there is a good (complete) example for learning AJAX
+ Django? Thanks in advance!

--

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



Response problem

2012-02-15 Thread Hans
I'm using a form for my webpage that returns values with simillar key
values. Now for backend compatibility reasons I cannot change the key
variables.

This is the query dictionary returned from the HTML file.
"

whenever i use HttpResponse(request.POST['address1']) it prints out
'bay street' when I would like it to print out the other value stored
in the key address1 which is 'yonge street'. How would I go about
accessing this other value in the key variable?

-- 
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: what is the best IDE to use for Python / Django

2012-02-15 Thread Furbee
Is this posting a zombie? It doesn't seem to ever die no matter what we do
to kill it! :-)

Furbee

On Wed, Feb 15, 2012 at 10:09 AM,  wrote:

> **
> @Sanders, nice answer :D, SOL
> +adesst
> --
> *From: * Thorsten Sanders 
> *Sender: * django-users@googlegroups.com
> *Date: *Wed, 15 Feb 2012 17:32:29 +0100
> *To: *
> *ReplyTo: * django-users@googlegroups.com
> *Subject: *Re: what is the best IDE to use for Python / Django
>
> Why this kind of stuff never ends?;(
>
> The best IDE is simply the one you can work best with, YOURSELF!
>
> On 15.02.2012 16:13, Vikas Ruhil wrote:
>
> Vim is best IDE for Python/Django ! look here the link
> http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html
>
> On Wed, Feb 15, 2012 at 8:16 PM, Bastian Ballmann <
> bastian.ballm...@notch-interactive.com> wrote:
>
>> Hey thats a cool list and I feel like I must answer on it :)
>>
>>
>> Am 01.02.2012 17:43, schrieb Masklinn:
>>
>>> On 2012-02-01, at 17:00 , Bastian Ballmann wrote:
>>>
 And what exact feature makes PyCharm an IDE that emacs hasnt?

>>> * Semantics navigation (not via tags, it knows to find a class when you
>>> want a class)
>>>
>> I heard ECB can do this, but I dont use it
>>
>>
>>  * Better static analysis and language knowledge (the type inference is
>>> still pretty limited, but if you instantiate an object and call a method on
>>> it it knows and only proposes the available methods)
>>>   - virtualenv-aware, knows to restrict its libraries search to the
>>> project's virtualenv
>>>
>> You can do this with setenv or virtualenv.el too
>>
>>
>>- errors and warnings are faster to display than via flymake in my
>>> experience
>>>
>> For me flymake is faster *g*
>>
>>- also intentions and quickfixes, PyCharm can improve or simplify code
>>> for known bad or sub-par patterns, and can fix a limited number of errors
>>> (PyCharm will suggest importing a module you reference without you having
>>> to go to the module top and doing so manually)
>>>
>>
>> Autoimport can be done with rope-auto-import
>>
>>
>>- finds all references to an object
>>>
>>
>> And this one with rope-find-occurrences
>>
>>
>>  * Much, much better (faster, more expansive and with less bullet holes)
>>> refactoring support than Rope&  ropemacs (I use both)
>>> * Good support of various template languages (Django, Jinja2 and Mako as
>>> of 2.0) with autocompletion, basic static analysis, syntax highlighting,
>>> etc…
>>>
>> Yeah that's something I miss, but auto-completion for Django template
>> code is available in django-mode
>>
>>
>>  * Semantic knowledge of Django projects
>>>   - jumping between a view and its template
>>>
>>
>> This can also be done with django-mode
>>
>>
>>  * Much better debugging story
>>>   - Pretty good visual debugger with watches and conditional breakpoints
>>>   - Remote debugger (via a specific agent)
>>>
>>
>> Therefore I use pddb outside of Emacs
>>
>>- Django templates debugging
>>>
>> Yep that's also something I miss. Can partly be done with Werkzeug in the
>> browser
>>
>> For me Emacs has the far better editing features than the Eclipse editor
>> with stuff like rectangle edit,
>> macros and the like and it's very good extensible and therefore can
>> perfectly adapted to one's needs.
>> Greets
>>
>> Basti
>>
>> --
>> Bastian Ballmann / Web Developer
>> Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich
>> Phone +41 43 818 20 91 / www.notch-interactive.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.
>>
>>
> --
> 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 

Re: what is the best IDE to use for Python / Django

2012-02-15 Thread adesantoasman
@Sanders, nice answer :D, SOL

+adesst

-Original Message-
From: Thorsten Sanders 
Sender: django-users@googlegroups.com
Date: Wed, 15 Feb 2012 17:32:29 
To: 
Reply-To: django-users@googlegroups.com
Subject: Re: what is the best IDE to use for Python / Django

Why this kind of stuff never ends?;(

The best IDE is simply the one you can work best with, YOURSELF!

On 15.02.2012 16:13, Vikas Ruhil wrote:
> Vim is best IDE for Python/Django ! look here the link 
> http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html
>
> On Wed, Feb 15, 2012 at 8:16 PM, Bastian Ballmann 
>  > wrote:
>
> Hey thats a cool list and I feel like I must answer on it :)
>
>
> Am 01.02.2012 17:43, schrieb Masklinn:
>
> On 2012-02-01, at 17:00 , Bastian Ballmann wrote:
>
> And what exact feature makes PyCharm an IDE that emacs hasnt?
>
> * Semantics navigation (not via tags, it knows to find a class
> when you want a class)
>
> I heard ECB can do this, but I dont use it
>
>
> * Better static analysis and language knowledge (the type
> inference is still pretty limited, but if you instantiate an
> object and call a method on it it knows and only proposes the
> available methods)
>   - virtualenv-aware, knows to restrict its libraries search
> to the project's virtualenv
>
> You can do this with setenv or virtualenv.el too
>
>
>   - errors and warnings are faster to display than via flymake
> in my experience
>
> For me flymake is faster *g*
>
>   - also intentions and quickfixes, PyCharm can improve or
> simplify code for known bad or sub-par patterns, and can fix a
> limited number of errors (PyCharm will suggest importing a
> module you reference without you having to go to the module
> top and doing so manually)
>
>
> Autoimport can be done with rope-auto-import
>
>
>   - finds all references to an object
>
>
> And this one with rope-find-occurrences
>
>
> * Much, much better (faster, more expansive and with less
> bullet holes) refactoring support than Rope&  ropemacs (I use
> both)
> * Good support of various template languages (Django, Jinja2
> and Mako as of 2.0) with autocompletion, basic static
> analysis, syntax highlighting, etc…
>
> Yeah that's something I miss, but auto-completion for Django
> template code is available in django-mode
>
>
> * Semantic knowledge of Django projects
>   - jumping between a view and its template
>
>
> This can also be done with django-mode
>
>
> * Much better debugging story
>   - Pretty good visual debugger with watches and conditional
> breakpoints
>   - Remote debugger (via a specific agent)
>
>
> Therefore I use pddb outside of Emacs
>
>   - Django templates debugging
>
> Yep that's also something I miss. Can partly be done with Werkzeug
> in the browser
>
> For me Emacs has the far better editing features than the Eclipse
> editor with stuff like rectangle edit,
> macros and the like and it's very good extensible and therefore
> can perfectly adapted to one's needs.
> Greets
>
> Basti
>
> -- 
> Bastian Ballmann / Web Developer
> Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich
> Phone +41 43 818 20 91 / www.notch-interactive.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.
>
>
> -- 
> 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 e

Need a Django/Python Freelancer (Paid Project)

2012-02-15 Thread shahzeb kohari
Hi all,

I work for a small company in Mumbai, India.
We need an internal social networking site for our employees.
If any of you would be interested in 'providing a working set of codes
strictly built from Django/Python to setup a social networking site', I
would be happy to collaborate with you.

This will be a paid-project on a milestone-pay-as-you-go basis. For more
information, please write to me directly at skoh...@gmail.com.

If this email is in violation of this Group's policies, then I
unconditionally apologise and would request all to ignore it.

Thanks,
Shahzeb

-- 
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: what is the best IDE to use for Python / Django

2012-02-15 Thread Thorsten Sanders

Why this kind of stuff never ends?;(

The best IDE is simply the one you can work best with, YOURSELF!

On 15.02.2012 16:13, Vikas Ruhil wrote:
Vim is best IDE for Python/Django ! look here the link 
http://learnhackstuff.blogspot.in/2012/02/vim-as-universal-idepart-1.html


On Wed, Feb 15, 2012 at 8:16 PM, Bastian Ballmann 
> wrote:


Hey thats a cool list and I feel like I must answer on it :)


Am 01.02.2012 17:43, schrieb Masklinn:

On 2012-02-01, at 17:00 , Bastian Ballmann wrote:

And what exact feature makes PyCharm an IDE that emacs hasnt?

* Semantics navigation (not via tags, it knows to find a class
when you want a class)

I heard ECB can do this, but I dont use it


* Better static analysis and language knowledge (the type
inference is still pretty limited, but if you instantiate an
object and call a method on it it knows and only proposes the
available methods)
  - virtualenv-aware, knows to restrict its libraries search
to the project's virtualenv

You can do this with setenv or virtualenv.el too


  - errors and warnings are faster to display than via flymake
in my experience

For me flymake is faster *g*

  - also intentions and quickfixes, PyCharm can improve or
simplify code for known bad or sub-par patterns, and can fix a
limited number of errors (PyCharm will suggest importing a
module you reference without you having to go to the module
top and doing so manually)


Autoimport can be done with rope-auto-import


  - finds all references to an object


And this one with rope-find-occurrences


* Much, much better (faster, more expansive and with less
bullet holes) refactoring support than Rope&  ropemacs (I use
both)
* Good support of various template languages (Django, Jinja2
and Mako as of 2.0) with autocompletion, basic static
analysis, syntax highlighting, etc…

Yeah that's something I miss, but auto-completion for Django
template code is available in django-mode


* Semantic knowledge of Django projects
  - jumping between a view and its template


This can also be done with django-mode


* Much better debugging story
  - Pretty good visual debugger with watches and conditional
breakpoints
  - Remote debugger (via a specific agent)


Therefore I use pddb outside of Emacs

  - Django templates debugging

Yep that's also something I miss. Can partly be done with Werkzeug
in the browser

For me Emacs has the far better editing features than the Eclipse
editor with stuff like rectangle edit,
macros and the like and it's very good extensible and therefore
can perfectly adapted to one's needs.
Greets

Basti

-- 
Bastian Ballmann / Web Developer

Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich
Phone +41 43 818 20 91 / www.notch-interactive.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.


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



Django Location- Does anyone know about this?

2012-02-15 Thread coded kid
Hi Guys, Does anyone knows about any good django package for maps? or
for locating of areas, states, streets? Please kindly answer if you
do. Thanks.

BTW: I've tried using Django easy_maps but it's not working. If you've
used easy_maps before, kindly comment below. Just want to ask you a
few questions.

-- 
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: what is the best IDE to use for Python / Django

2012-02-15 Thread Bastian Ballmann

Hey thats a cool list and I feel like I must answer on it :)


Am 01.02.2012 17:43, schrieb Masklinn:

On 2012-02-01, at 17:00 , Bastian Ballmann wrote:

And what exact feature makes PyCharm an IDE that emacs hasnt?

* Semantics navigation (not via tags, it knows to find a class when you want a 
class)

I heard ECB can do this, but I dont use it



* Better static analysis and language knowledge (the type inference is still 
pretty limited, but if you instantiate an object and call a method on it it 
knows and only proposes the available methods)
   - virtualenv-aware, knows to restrict its libraries search to the project's 
virtualenv

You can do this with setenv or virtualenv.el too



   - errors and warnings are faster to display than via flymake in my experience

For me flymake is faster *g*


   - also intentions and quickfixes, PyCharm can improve or simplify code for 
known bad or sub-par patterns, and can fix a limited number of errors (PyCharm 
will suggest importing a module you reference without you having to go to the 
module top and doing so manually)


Autoimport can be done with rope-auto-import



   - finds all references to an object


And this one with rope-find-occurrences



* Much, much better (faster, more expansive and with less bullet holes) refactoring 
support than Rope&  ropemacs (I use both)
* Good support of various template languages (Django, Jinja2 and Mako as of 
2.0) with autocompletion, basic static analysis, syntax highlighting, etc…
Yeah that's something I miss, but auto-completion for Django template 
code is available in django-mode




* Semantic knowledge of Django projects
   - jumping between a view and its template


This can also be done with django-mode



* Much better debugging story
   - Pretty good visual debugger with watches and conditional breakpoints
   - Remote debugger (via a specific agent)


Therefore I use pddb outside of Emacs


   - Django templates debugging
Yep that's also something I miss. Can partly be done with Werkzeug in 
the browser


For me Emacs has the far better editing features than the Eclipse editor 
with stuff like rectangle edit,
macros and the like and it's very good extensible and therefore can 
perfectly adapted to one's needs.

Greets

Basti

--
Bastian Ballmann / Web Developer
Notch Interactive GmbH / Badenerstrasse 571 / 8048 Zürich
Phone +41 43 818 20 91 / www.notch-interactive.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: Need details re: deletion of a referenced model instance

2012-02-15 Thread Jeff Blaine

>
> >> Known Facts:
> >>
> >> 1. Deleting any Topping object (for example, deleting id=1,
> >> name="Pepperoni") also removes it from foopizza.toppings.  Good.
> >> 2. No m2m_changed signal is sent when 1 (above happens).  BAD.
>
> ...
>
 

> Check this out ;)
> https://docs.djangoproject.com/en/dev/ref/signals/#m2m-change
> d
>
Already checked it out before posting.  See '2' above.

Bug report filed: https://code.djangoproject.com/ticket/17688 

Thank you Marc and Anssi!

-- 
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/-/JbupoNJCMS0J.
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: IntegrityError while testing

2012-02-15 Thread xina towner
I think the problem is that the testing tool is trying to reset the
database and when it tries to truncate this table it can't. Well, I'm
pretty sure, but I don't know how to fix it. The table references itself.

On 15 February 2012 14:06, 赵帅  wrote:

>
> Did you delete one key or update the key to different values that was
> referenced by another table as foreign key.
> 2012/2/15 xina towner 
>
>> Hello, I get this error when I try to test my app. I'm using mysql. I
>> think it's when django tries to delete the table. I've tried with all On
>> delete options and the error keeps happening.
>>
>> IntegrityError: (1452, 'Cannot add or update a child row: a foreign key
>> constraint fails (`test_django`.`locations_location`, CONSTRAINT
>> `locations_location_ibfk_1` FOREIGN KEY (`belongsTo_id`) REFERENCES
>> `locations_location` (`id`) ON DELETE SET NULL ON UPDATE SET NULL)')
>>
>>
>> --
>> Gràcies,
>>
>> Rubén
>>
>>  --
>> 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.
>



-- 
Gràcies,

Rubén

-- 
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 can I load a custom template filter which is in my project directory ?

2012-02-15 Thread 赵帅
refer to https://docs.djangoproject.com/en/1.3/howto/custom-template-tags/

2012/2/15 Thomas Rega 

> Am 14.02.12 21:28, schrieb Nolhian:
>
>  Hello everyone,
>>
>> In my template I put :
>>
>> {% load pygmentize %}
>>
>> But I got :
>> TemplateSyntaxError at /
>> 'pygmentize' is not a valid tag library: Template library pygmentize
>> not found, tried
>> django.templatetags.**pygmentize,django.contrib.**
>> admin.templatetags.pygmentize
>>
>> How can I load it ? I don't want to mess with django files.
>>
>> Thanks !
>>
>>  Hi Nolhian,
>
> "Custom template tags and filters must live inside a Django app."
>
> https://docs.djangoproject.**com/en/dev/howto/custom-**template-tags/
>
> "The app should contain a templatetags directory, at the same level as
> models.py, views.py, etc."
>
> Good luck,
> TR
>
>
> --
> 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+unsubscribe@**
> 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: IntegrityError while testing

2012-02-15 Thread 赵帅
Did you delete one key or update the key to different values that was
referenced by another table as foreign key.
2012/2/15 xina towner 

> Hello, I get this error when I try to test my app. I'm using mysql. I
> think it's when django tries to delete the table. I've tried with all On
> delete options and the error keeps happening.
>
> IntegrityError: (1452, 'Cannot add or update a child row: a foreign key
> constraint fails (`test_django`.`locations_location`, CONSTRAINT
> `locations_location_ibfk_1` FOREIGN KEY (`belongsTo_id`) REFERENCES
> `locations_location` (`id`) ON DELETE SET NULL ON UPDATE SET NULL)')
>
>
> --
> Gràcies,
>
> Rubén
>
>  --
> 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: Logging from multiple processes

2012-02-15 Thread bruno desthuilliers
On Feb 14, 6:23 pm, JC  wrote:
> Hey guys,
>
> Does Django 1.3.1 handle logging from multiple processes or I have to
> have some special consideration?

Not really a django-specific problem - the problem exists as soon as
you have concurrent write access on a same file. The solution is of
course to NOT log to a file.

> This document may be 
> related:https://code.djangoproject.com/wiki/LoggingProposalbut its two years
> old so I was wondering maybe Django now supports this?

https://docs.djangoproject.com/en/1.3/topics/logging/

IOW : learn to use the standard python logging module. If you're using
mod_wsgi the simplest thing is to use a streamhandler on sys.stderr
and let apache do the dirty work.

-- 
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: Admin error

2012-02-15 Thread Stanwin Siow
I did.

When admin.autodiscover() was uncommented out,

It gives the syntax error when my admin.py was only as such:

from r2.models import Keyword
from django.contrib import admin

admin.site.register(Keyword)


Best Regards,

Stanwin Siow



On Feb 15, 2012, at 5:20 PM, Ervin Hegedüs wrote:

> hello,
> 
> On Wed, Feb 15, 2012 at 04:48:18PM +0800, Stanwin Siow wrote:
>> ok i figured where that error was coming from.
>> 
>> It was from the method: admin.autodiscover()
>> 
>> What does this method do?
> 
> in Django doc:
> 
> https://docs.djangoproject.com/en/dev/ref/contrib/admin/
> 
> "Above we used admin.autodiscover() to automatically load the
> INSTALLED_APPS admin.py modules."
> 
> Did you import the required modules?
> 
> 
> 
> a.
> 
> -- 
> 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: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread 赵帅
The commit_on_success decorator only garrentees that one commit is done
when no exception is raised from the function and rollback if there is any .
You have to ensure on your own hand the values in the two tables are equal.

2012/2/15 Yann 

> Hi,
>
> In a class view, I am trying to modify two instances of different
> models. There are some identical data stored in both tables. They
> should really be the same in any circumstance .
>
> Should I use "@commit_on_success"?
>
> If I should, how should i use it for the class based view?
>
> Should I do something like this?
>
> class CreateSomethingView(CreateView):
>
> ""
> ""
>@method_decorator(transaction.commit_on_succes)
>def post(self):
>   ""
>
>
> --
> 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 runserver 504 on static assets with IE only

2012-02-15 Thread bruno desthuilliers


On Feb 14, 8:56 pm, JC  wrote:
> On IE8 however,
> my fiddler trace shows that random static assets (css, js, img) aren't
> loading most (2/3) of the time.  The server trace doesn't seem to see
> or log the request at all.

Then it might be that for some reason IE8 just doesn't request the
assets.

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



@commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
Hi,

In a class view, I am trying to modify two instances of different
models. There are some identical data stored in both tables. They
should really be the same in any circumstance .

Should I use "@commit_on_success"?

If I should, how should i use it for the class based view?

Should I do something like this?

class CreateSomethingView(CreateView):

""
""
@method_decorator(transaction.commit_on_succes)
def post(self):
   ""


-- 
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: Admin error

2012-02-15 Thread Ervin Hegedüs
hello,

On Wed, Feb 15, 2012 at 04:48:18PM +0800, Stanwin Siow wrote:
> ok i figured where that error was coming from.
> 
> It was from the method: admin.autodiscover()
> 
> What does this method do?

in Django doc:

https://docs.djangoproject.com/en/dev/ref/contrib/admin/

"Above we used admin.autodiscover() to automatically load the
INSTALLED_APPS admin.py modules."

Did you import the required modules?



a.

-- 
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 + Gevent + PostgreSQL = Idle Transaction

2012-02-15 Thread Damien Letellier
I implemented some simple Long Polling with Gevent in a Django View.
The client AJAX an url, enter the update view and wait with
Gevent.event.wait for an update.

Problem: We do not use Autocommit (and don't plan to) and the client
view's Postgres transaction stay open as long as Gevent.event.wait
block the request, even if the visitor navigate away.
This create a quick accumulation of idle transactions.

I'd like to close the transaction before starting Gevent.event.wait.
The transaction is not used after retrieving the request anyway.

What would be the cleanest way to close the Postgres transaction
without closing the request ? I'm currently sending the
request_finished signal manually but it feels like hack.

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



CSS reference to Media folder

2012-02-15 Thread Kolbe
Hi all,

I have a .css file in the /static/ folder where I keep all my styles.

Now when I want to refer to images that I use in my CSS that are
stored in the /media/ folder, how do I reference that?


e.g. background-image:url('gradient2.png');

gradient2.png is stored in ~/media/ and my css is in ~/static/

Is there a way to define the path to gradient2.png?

Cheers!
Max

-- 
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: Comments Not Displaying

2012-02-15 Thread coded kid
Thanks bro! Just got the logic! Cheers. @Daniel keep up the good work,
even if you once hit me in the ass on StackOverflow! :)

On Feb 14, 3:47 pm, Tom Evans  wrote:
> On Tue, Feb 14, 2012 at 2:45 PM, coded kid  wrote:
> > Below the status. I'm not sure if I fixed this. How will I make it
> > display comment? Please.
>
> This page has some hints:
>
> https://docs.djangoproject.com/en/1.3/ref/contrib/comments/#displayin...
>
> Cheers
>
> Tom

-- 
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 details re: deletion of a referenced model instance

2012-02-15 Thread Marc Aymerich
On Wed, Feb 15, 2012 at 12:37 AM, Marc Aymerich  wrote:
> On Tue, Feb 14, 2012 at 8:02 PM, Jeff Blaine  wrote:
>> Hi all,
>>
>> I'm having trouble detecting changes that happen to a M2M field behind the
>> scenes: as a result of one of the *referenced objects being deleted*
>>
>> I'm using Django 1.3.1 with PostgreSQL 8
>>
>> Let's say we have the following simple proof of concept models:
>>
>> class Topping(models.Model):
>>     name = models.CharField()
>>
>> class Pizza(models.Model):
>>     name = models.CharField()
>>     toppings = models.ManyToManyField(Topping, null=true, blank=true)
>>
>> And this data established using those models:
>>
>>     TOPPING
>>     id=1, name="Pepperoni"> Register a post_delete signal for Topping?  How 
>> do I refer to or find the
>>     id=2, name="Onion"
>>     id=3, name="Mushroom"
>>
>>     PIZZA
>>     id=1, name="foopizza"
>>     toppings=1,2,3
>>
>> Known Facts:
>>
>> 1. Deleting any Topping object (for example, deleting id=1,
>> name="Pepperoni") also removes it from foopizza.toppings.  Good.
>> 2. No m2m_changed signal is sent when 1 (above happens).  BAD.
>>
>> How do I tie into "topping *object* was deleted (no longer for sale),
>> perform custom code on ALL Pizza objects that referenced it" ?
>>
>> Register a post_delete signal for Topping?  How do I refer to or find the
>> Pizza objects that referred to it?
>>
>
> You can introspect topping model looking for pizza m2m relation-like:
> take a look at Topping._meta attribute, and then send a custom signal
> for each related objects when a topping is deleted.

Check this out ;)
https://docs.djangoproject.com/en/dev/ref/signals/#m2m-changed

-- 
Marc

-- 
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: Admin error

2012-02-15 Thread Mike Dewhirst

On 15/02/2012 7:48pm, Stanwin Siow wrote:

ok i figured where that error was coming from.

It was from the method: admin.autodiscover()


Well done!!! :)



What does this method do?


http://www.google.com.au/webhp?rlz=1C1GPEA_en___AU313&sourceid=chrome-instant&ix=sea&ie=UTF-8&ion=1#hl=en&rlz=1C1GPEA_en___AU313&output=search&sclient=psy-ab&q=admin.autodiscover()&pbx=1&oq=&aq=&aqi=&aql=&gs_sm=&gs_upl=&fp=eb2d694fa5cee7bd&ix=sea&ion=1&ix=sea&ion=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=eb2d694fa5cee7bd&biw=745&bih=910&ix=sea&ion=1

Mike



Best Regards,

Stanwin Siow



On Feb 15, 2012, at 3:12 PM, Mike Dewhirst wrote:


On 15/02/2012 5:41pm, Mike Dewhirst wrote:


invalid syntax (admin.py, line 1)


Your original error indicated there is an admin.py but with an error
on line 1 or a missing admin.py which you have confirmed.

That is the problem.

To get your models to appear in the admin app you need an admin.py in
each app directory. That is, each app listed in INSTALLED_APPS which
also has a models.py.

Inside each admin.py you need to import the models you want to see in
the admin and then do admin.site.register

If you are not even getting to the admin login prompt there is
something else wrong. Even so I think it will be related to admin.py
somewhere.

Mike

--
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: Admin error

2012-02-15 Thread Stanwin Siow
ok i figured where that error was coming from.

It was from the method: admin.autodiscover()

What does this method do?

Best Regards,

Stanwin Siow



On Feb 15, 2012, at 3:12 PM, Mike Dewhirst wrote:

> On 15/02/2012 5:41pm, Mike Dewhirst wrote:
>>> 
>>> invalid syntax (admin.py, line 1)
> 
> Your original error indicated there is an admin.py but with an error on line 
> 1 or a missing admin.py which you have confirmed.
> 
> That is the problem.
> 
> To get your models to appear in the admin app you need an admin.py in each 
> app directory. That is, each app listed in INSTALLED_APPS which also has a 
> models.py.
> 
> Inside each admin.py you need to import the models you want to see in the 
> admin and then do admin.site.register
> 
> If you are not even getting to the admin login prompt there is something else 
> wrong. Even so I think it will be related to admin.py somewhere.
> 
> Mike
> 
> -- 
> 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.