Fwd: ValueError: unknown locale: UTF-8

2012-05-02 Thread Timothy Makobu
Hi Devs,

I got no reply on this issue when I posted it on django-users. I was
eventually able to go around it by installing Django 1.3 (I was getting the
error on 1.4) This error occurred on both PostreSQL and MySQL databases.

regards,
Tim


-- Forwarded message --
From: Timothy Makobu 
Date: Sun, Apr 29, 2012 at 1:09 PM
Subject: ValueError: unknown locale: UTF-8
To: django-us...@googlegroups.com


Hi,

I'm getting an "unknown locale" exception and yet the LANG environment
variable is set:

Traceback (most recent call last):
  File "manage.py", line 14, in 
execute_manager(settings)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 459, in execute_manager
utility.execute()
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 196, in run_from_argv
self.execute(*args, **options.__dict__)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 232, in execute
output = self.handle(*args, **options)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 371, in handle
return self.handle_noargs(**options)
  File
"/opt/local/lib/python2.7/site-packages/south/management/commands/syncdb.py",
line 90, in handle_noargs
syncdb.Command().execute(**options)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 232, in execute
output = self.handle(*args, **options)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 371, in handle
return self.handle_noargs(**options)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
line 110, in handle_noargs
emit_post_sync_signal(created_models, verbosity, interactive, db)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/sql.py",
line 189, in emit_post_sync_signal
interactive=interactive, db=db)
  File
"/opt/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
line 172, in send
response = receiver(signal=self, sender=sender, **named)
  File
"/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 73, in create_superuser
call_command("createsuperuser", interactive=True, database=db)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 150, in call_command
return klass.execute(*args, **defaults)
  File
"/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
line 232, in execute
output = self.handle(*args, **options)
  File
"/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
line 70, in handle
default_username = get_default_username()
  File
"/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 105, in get_default_username
default_username = get_system_username()
  File
"/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 85, in get_system_username
return getpass.getuser().decode(locale.getdefaultlocale()[1])
  File "/opt/local/lib/python2.7/locale.py", line 503, in getdefaultlocale
return _parse_localename(localename)
  File "/opt/local/lib/python2.7/locale.py", line 435, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8


# echo $LANG
# en_US.UTF-8

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



Re: ValueError: unknown locale: UTF-8

2012-05-02 Thread Timothy Makobu
Worked. Thanks.

On Wed, May 2, 2012 at 3:00 PM, Adnane Belmadiaf wrote:

> Hi,
>
> Look at this ticket https://code.djangoproject.com/ticket/5846
>
> For more infos :
> http://patrick.arminio.info/blog/2012/02/fix-valueerror-unknown-locale-utf8/
>
> 2012/5/2 Timothy Makobu 
>
>> Hi Devs,
>>
>> I got no reply on this issue when I posted it on django-users. I was
>> eventually able to go around it by installing Django 1.3 (I was getting the
>> error on 1.4) This error occurred on both PostreSQL and MySQL databases.
>>
>> regards,
>> Tim
>>
>>
>> -- Forwarded message --
>> From: Timothy Makobu 
>> Date: Sun, Apr 29, 2012 at 1:09 PM
>> Subject: ValueError: unknown locale: UTF-8
>> To: django-us...@googlegroups.com
>>
>>
>> Hi,
>>
>> I'm getting an "unknown locale" exception and yet the LANG environment
>> variable is set:
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 14, in 
>> execute_manager(settings)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 459, in execute_manager
>> utility.execute()
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 382, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 196, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 232, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 371, in handle
>> return self.handle_noargs(**options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/south/management/commands/syncdb.py",
>> line 90, in handle_noargs
>> syncdb.Command().execute(**options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 232, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 371, in handle
>> return self.handle_noargs(**options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>> line 110, in handle_noargs
>> emit_post_sync_signal(created_models, verbosity, interactive, db)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/sql.py",
>> line 189, in emit_post_sync_signal
>> interactive=interactive, db=db)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 73, in create_superuser
>> call_command("createsuperuser", interactive=True, database=db)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 150, in call_command
>> return klass.execute(*args, **defaults)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 232, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
>> line 70, in handle
>> default_username = get_default_username()
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 105, in get_default_username
>> default_username = get_system_username()
>>   File
>> "/opt/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 85, in get_system_username
>> return getpass.getuser().decode(locale.getdefaultlocale()[1])
>>   File "/opt/local/lib/python2.7/locale.py", line 503, in getdefaultlocale
>> return _parse_localename(localename)
>>   File "/opt/local/lib/python2.7/locale.py", line 435, in
>> _parse_localename
>> raise ValueError, 'unknown locale: %s' % localename
>> ValueError: unknown local

Re: Customizing User model manager

2012-07-05 Thread Timothy Makobu
Ask this on django-users


On Thu, Jul 5, 2012 at 11:50 AM, Tsachi  wrote:

> Hi,
> I have a simple question, which I couldn't find an answer to it anywhere:
> In a django project I'm working on, a deleted user is marked as *
> is_active=False*.
> *I need to custom the User manager to filter out all is_active=Falseusers.
> *
> This is a project-wide requirement. In other words: I don't need to see
> deleted users in any case.
> I do, however, need them to stay in the DB, for other reasons: data
> integrity, re-registration prevention (on DB level).
>
> I want to modify the *objects* manager, because:
> a. the  project already exists, so it's gonna make a lot of work finding
> all the places with *objects* and replacing them with another manager.
> b. A proxy model will require me to replace all *user *occurences and
> replace them (also, I'm not sure a proxied model can be used with *request
> *).
> c. There are places where functions like *get_object_or_404()* are used.
>
> So, what's the correct way of modifying the User *objects* manager to
> exclude *is_active=False* users?
>
> Thanks,
> Tsachi
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-developers/-/FStQ6EMNTREJ.
> To post to this group, send email to django-developers@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>

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



Admin filter column scroll bar

2015-05-09 Thread Timothy Makobu
Hello,

The follwing CSS change to #changelist-filter in changelists.css gives the 
filter column it's own scroll bar:

https://gist.github.com/timkofu/fa5505cff4a2ad5ffd71


regards,

Tim.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e841389d-755b-4297-be85-a4f23ef11b81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


A word of thanks.

2010-08-22 Thread Timothy Makobu
Hi all,

Django is truly outstanding software. Thank you all for your great
work.

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