Re: ValidationError: ManagementForm data is missing or has been tampered with

2018-05-24 Thread Dane Kennedy
I'm getting the same thing, except it's 2018 >:/. I'm waiting to hear from 
users if they're using IE, but do you think there's any chance this is 
still a problem?

On Tuesday, 23 February 2010 06:40:05 UTC+2, DrMeers wrote:
>
> I have the same problem -- only intermittently, only IE, can't put my
> finger on what is causing it. A couple of times a month I get an
> emailed error message coming through. I have not been able to
> replicate it on my machine, even using IE and performing the same
> operation; very odd.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8804abb0-1739-4088-8dec-cbb5da25caf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hung apache threads after upgrading to django 1.4

2012-09-13 Thread Dane
We have extended status on.  Here is a link to our full status output. 
 This does not occur consistently, but under high traffic we see an 
increasing amount of occurrences.

I appreciate the help.

http://pastebin.com/wP8Xfrwf

On Wednesday, September 12, 2012 9:20:10 AM UTC-5, Tom Evans wrote:
>
> On Wed, Sep 12, 2012 at 2:49 PM, Dane <daneg...@gmail.com > 
> wrote: 
> > After using django 1.3 for a while I upgraded to django 1.4 and started 
> > noticing apache threads hanging indefinitely.  I set a timeout to avoid 
> > running out of threads, but it would be nice to know what is causing the 
> > issue in the first place. 
> > 
> > Using an strace, I found that the threads are attempting to read from a 
> > socket and are not doing anything after that. 
> > 
> > The apache logs were not helpful, but we did find the following 
> stacktrace 
> > in our mod_wsgi process: 
>
> The stacktrace doesn't look relevant tbh. 
>
> How are you determining that you have hanging threads? Eg, is the 
> scoreboard completely full? 
>
> It would be easier to debug if you could capture a snapshot of the 
> scoreboard whilst you think you are being affected. mod_status is your 
> friend, turn "ExtendedStatus on". 
>
> Cheers 
>
> Tom 
>

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



Hung apache threads after upgrading to django 1.4

2012-09-12 Thread Dane
After using django 1.3 for a while I upgraded to django 1.4 and started 
noticing apache threads hanging indefinitely.  I set a timeout to avoid 
running out of threads, but it would be nice to know what is causing the 
issue in the first place.

Using an strace, I found that the threads are attempting to read from a 
socket and are not doing anything after that.

The apache logs were not helpful, but we did find the following stacktrace 
in our mod_wsgi process:

[Wed Aug 22 15:20:49 2012] [error] # ProcessId: 17018

[Wed Aug 22 15:20:49 2012] [error] # ThreadID: 1135962432

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 
241, in __call__

[Wed Aug 22 15:20:49 2012] [error]   response = self.get_response(request)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/core/handlers/base.py", line 
111, in get_response

[Wed Aug 22 15:20:49 2012] [error]   response = callback(request, 
*callback_args, **callback_kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/contrib/auth/decorators.py", 
line 20, in _wrapped_view

[Wed Aug 22 15:20:49 2012] [error]   return view_func(request, *args, 
**kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_openid_auth/user_whitelist/decorators.py",
 
line 25, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/dispatcher.py", line 
91, in __call__

[Wed Aug 22 15:20:49 2012] [error]   return (handler(request, *args, 
**kwargs) if handler else

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/contrib/auth/decorators.py", 
line 20, in _wrapped_view

[Wed Aug 22 15:20:49 2012] [error]   return view_func(request, *args, 
**kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_openid_auth/user_whitelist/decorators.py",
 
line 25, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_user_authorization/decorators.py", 
line 34, in decorated

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/templates_decorators.py", 
line 61, in wrapped

[Wed Aug 22 15:20:49 2012] [error]   return func(request, *args, **kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/multiresponse.py", line 
83, in wrapper

[Wed Aug 22 15:20:49 2012] [error]   context_instance, headers)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/axiom_django/multiresponse.py", line 
112, in __get_response

[Wed Aug 22 15:20:49 2012] [error]   context_instance = context_instance)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/shortcuts/__init__.py", line 
20, in render_to_response

[Wed Aug 22 15:20:49 2012] [error]   return 
HttpResponse(loader.render_to_string(*args, **kwargs), 
**httpresponse_kwargs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
169, in render_to_string

[Wed Aug 22 15:20:49 2012] [error]   t = get_template(template_name)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
145, in get_template

[Wed Aug 22 15:20:49 2012] [error]   template, origin = 
find_template(template_name)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 
134, in find_template

[Wed Aug 22 15:20:49 2012] [error]   source, display_name = loader(name, 
dirs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/template/loader.py", line 42, 
in __call__

[Wed Aug 22 15:20:49 2012] [error]   return 
self.load_template(template_name, template_dirs)

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/saferef.py", line 
121, in remove

[Wed Aug 22 15:20:49 2012] [error]   function( self )

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 
250, in _remove_receiver

[Wed Aug 22 15:20:49 2012] [error]   for idx, (r_key, _) in 
enumerate(reversed(self.receivers)):

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/saferef.py", line 
121, in remove

[Wed Aug 22 15:20:49 2012] [error]   function( self )

[Wed Aug 22 15:20:49 2012] [error] File: 
"/opt/py26/lib/python2.6/site-packages/django/dispatch/dispatcher.py", line 
240, in _remove_receiver

[Wed Aug 22 15:20:49 2012] [error]   

Re: HttpResponse.delete_cookie() gives me an error

2010-08-19 Thread Dane Larsen
Well, regardless, it works if you convert it to a str first.

Thanks for the help!

On Thu, Aug 19, 2010 at 11:02 AM, Rolando Espinoza La Fuente <
dark...@gmail.com> wrote:

> On Thu, Aug 19, 2010 at 12:14 PM, Dane Larsen <dane.t.lar...@gmail.com>
> wrote:
> [...]
> > I then tried:
> > response.delete_cookie(key=str(color_id))
> > and it worked fine.
> > Should I report this as a bug?
>
> Cookie.Morsel does not handle unicode strings, mainly because
> string.translate expects
> two arguments where unicode.translate expects only one.
>
> A fix to django.http.CompatCookie could be:
>
> +def __setitem__(self, K, V):
> +# Cookie.Morsel does not handle unicode keys
> +return SimpleCookie.__setitem__(self, smart_str(K), V)
>
> But I'm not sure if you should try to use an unicode key in a cookie.
>
>
> Rolando Espinoza La fuente
> www.insophia.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<django-users%2bunsubscr...@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: HttpResponse.delete_cookie() gives me an error

2010-08-19 Thread Dane Larsen
Ahh. Problem solved.

I was calling:
response.delete_cookie(key=color_id)

color_id was a string.

When I did this:

for key in request.COOKIES.keys():
if key == color_id:
response.delete_cookie(key=key)

It worked.

It seems that passing a unicode string rather than a python string is what
causes the problem.
The only difference between key and color_id is this:

color_id u'colorcompare73936'
key 'colorcompare73936'

color_id has the u'...'

I then tried:

response.delete_cookie(key=str(color_id))

and it worked fine.

Should I report this as a bug?


On Wed, Aug 18, 2010 at 10:42 PM, Dane Larsen <dane.t.lar...@gmail.com>wrote:

> Environment:
>
> Request Method: GET
> Request URL: http://*.com/colors/delete/colorcompare89441/
> Django Version: 1.2.1
> Python Version: 2.6.5
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Traceback:
> File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py"
> in get_response
>   100. response = callback(request, *callback_args,
> **callback_kwargs)
> File "/home/dane/larsendt/../larsendt/colorcompare/views.py" in delete
>   86. response.delete_cookie(key=color_id, path='/')
> File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py" in
> delete_cookie
>   390. expires='Thu, 01-Jan-1970 00:00:00 GMT')
> File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py" in
> set_cookie
>   376. self.cookies[key] = value
> File "/usr/lib/python2.6/Cookie.py" in __setitem__
>   585. self.__set(key, rval, cval)
> File "/usr/lib/python2.6/Cookie.py" in __set
>   578. M.set(key, real_value, coded_value)
> File "/usr/lib/python2.6/Cookie.py" in set
>   454. if "" != translate(key, idmap, LegalChars):
> File "/usr/lib/python2.6/string.py" in translate
>   493. return s.translate(table, deletions)
>
> Exception Type: TypeError at /colors/delete/colorcompare89441/
> Exception Value: translate() takes exactly one argument (2 given)
>
>

-- 
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: HttpResponse.delete_cookie() gives me an error

2010-08-18 Thread Dane Larsen
Environment:

Request Method: GET
Request URL: http://*.com/colors/delete/colorcompare89441/
Django Version: 1.2.1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py"
in get_response
  100. response = callback(request, *callback_args,
**callback_kwargs)
File "/home/dane/larsendt/../larsendt/colorcompare/views.py" in delete
  86. response.delete_cookie(key=color_id, path='/')
File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py" in
delete_cookie
  390. expires='Thu, 01-Jan-1970 00:00:00 GMT')
File "/usr/local/lib/python2.6/dist-packages/django/http/__init__.py" in
set_cookie
  376. self.cookies[key] = value
File "/usr/lib/python2.6/Cookie.py" in __setitem__
  585. self.__set(key, rval, cval)
File "/usr/lib/python2.6/Cookie.py" in __set
  578. M.set(key, real_value, coded_value)
File "/usr/lib/python2.6/Cookie.py" in set
  454. if "" != translate(key, idmap, LegalChars):
File "/usr/lib/python2.6/string.py" in translate
  493. return s.translate(table, deletions)

Exception Type: TypeError at /colors/delete/colorcompare89441/
Exception Value: translate() takes exactly one argument (2 given)

-- 
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: Django Job in Austin and Seattle (Multiple positions available)

2010-06-06 Thread Dane
Any suggestions on where to post to find experience Django
developers?

On Jun 1, 5:39 pm, Dane <dkne...@gmail.com> wrote:
> Tippr.com is a fast growing venture funded internet company that
> provides technology that helps local merchants acquire new customers.
> Think of Groupon.com, livingsocial.com or buywithme.com on steroids
> and not sucking. We are hiring passionate, dedicated and brilliant
> engineers to join the core engineering team.  As part of the core
> engineering team you will work closely with the product team in a fast
> paced, challenging environment to help shape the technology landscape
> and culture of the core product.
>
> Requirements
> - Knowledge of Django
> - 2-3+ years of software engineering experience in Linux/Unix
> - Extensive knowledge of open source technologies
> - Experience writing software that communicates directly with 3rd
> party software (payment gateways, automation scripts, API’s)
> - Ability to work with technical and non-technical teams, in an
> extremely fast-paced environment
> - Self-motivated and reliable
> - Strong UI design sense with the ability to adapt, take critical
> feedback, and execute quickly on tasks
>
> Pluses
> - Experience or familiarity with cloud services (Amazon EC2 and S3,
> Rackspace, Linode)
> - Database experience a plus
> - Previous start-up experience
>
> Please send resume or questions to j...@tippr.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.



Django Job in Austin and Seattle (Multiple positions available)

2010-06-01 Thread Dane
Tippr.com is a fast growing venture funded internet company that
provides technology that helps local merchants acquire new customers.
Think of Groupon.com, livingsocial.com or buywithme.com on steroids
and not sucking. We are hiring passionate, dedicated and brilliant
engineers to join the core engineering team.  As part of the core
engineering team you will work closely with the product team in a fast
paced, challenging environment to help shape the technology landscape
and culture of the core product.

Requirements
- Knowledge of Django
- 2-3+ years of software engineering experience in Linux/Unix
- Extensive knowledge of open source technologies
- Experience writing software that communicates directly with 3rd
party software (payment gateways, automation scripts, API’s)
- Ability to work with technical and non-technical teams, in an
extremely fast-paced environment
- Self-motivated and reliable
- Strong UI design sense with the ability to adapt, take critical
feedback, and execute quickly on tasks

Pluses
- Experience or familiarity with cloud services (Amazon EC2 and S3,
Rackspace, Linode)
- Database experience a plus
- Previous start-up experience

Please send resume or questions to j...@tippr.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: Strange problem when starting project in Windows XP

2009-12-19 Thread Dane
Ok, figured this one out with google.

Idle had taken over .py files. It was as simple as going to My
Computer, Tools, Folder Options, File Types, scrolling down to .py,
and clicking Restore Default (which is python).

Thanks for the help all!

On Dec 19, 2:14 pm, Dane <dane.schnei...@gmail.com> wrote:
> C:\Python26\Scripts is where django-admin.py is, and it's in my PATH
> variable. It's strange because C:\Python26 (the path to python itself)
> is also in the same PATH variable, and that is working. If I just type
> 'python', I do get the shell.
>
> If idle.pyw has taken over .py associations, how would I check/change
> that?
>
> On Dec 18, 12:59 pm, OkaMthembo <zebr...@gmail.com> wrote:
>
> > Hi Dane,
>
> > Yes, when you have to specify an absolute path to get it working, it
> > definitely sounds like a PATH environ config. problem. When you check your
> > PATH variables, do you see the folder to django-admin.py listed?
>
> > Regards,
> > Lloyd
>
> > On Fri, Dec 18, 2009 at 7:27 PM, Dane <dane.schnei...@gmail.com> wrote:
> > > It worked with 'python c:\python26\scripts\django-admin.py
> > > startproject newsite'. Does that mean the PATH got messed up somehow?
>
> > > On Dec 18, 7:52 am, Shawn Milochik <sh...@milochik.com> wrote:
> > > > What happens when you type 'python django-admin.py'?
>
> > > > If that doesn't work, try replacing 'python' there with the full path to
> > > your Python executable in Windows. I've never heard of this problem, but 
> > > it
> > > sounds like it could be something odd in the environment.
>
> > > > Shawn
>
> > > --
>
> > > 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<django-users%2bunsubscr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> > --
> > Regards,
> > Sithembewena Lloyd Dubehttp://www.lloyddube.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: Strange problem when starting project in Windows XP

2009-12-19 Thread Dane
C:\Python26\Scripts is where django-admin.py is, and it's in my PATH
variable. It's strange because C:\Python26 (the path to python itself)
is also in the same PATH variable, and that is working. If I just type
'python', I do get the shell.

If idle.pyw has taken over .py associations, how would I check/change
that?

On Dec 18, 12:59 pm, OkaMthembo <zebr...@gmail.com> wrote:
> Hi Dane,
>
> Yes, when you have to specify an absolute path to get it working, it
> definitely sounds like a PATH environ config. problem. When you check your
> PATH variables, do you see the folder to django-admin.py listed?
>
> Regards,
> Lloyd
>
>
>
> On Fri, Dec 18, 2009 at 7:27 PM, Dane <dane.schnei...@gmail.com> wrote:
> > It worked with 'python c:\python26\scripts\django-admin.py
> > startproject newsite'. Does that mean the PATH got messed up somehow?
>
> > On Dec 18, 7:52 am, Shawn Milochik <sh...@milochik.com> wrote:
> > > What happens when you type 'python django-admin.py'?
>
> > > If that doesn't work, try replacing 'python' there with the full path to
> > your Python executable in Windows. I've never heard of this problem, but it
> > sounds like it could be something odd in the environment.
>
> > > Shawn
>
> > --
>
> > 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<django-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Regards,
> Sithembewena Lloyd Dubehttp://www.lloyddube.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: Strange problem when starting project in Windows XP

2009-12-18 Thread Dane
It worked with 'python c:\python26\scripts\django-admin.py
startproject newsite'. Does that mean the PATH got messed up somehow?

On Dec 18, 7:52 am, Shawn Milochik  wrote:
> What happens when you type 'python django-admin.py'?
>
> If that doesn't work, try replacing 'python' there with the full path to your 
> Python executable in Windows. I've never heard of this problem, but it sounds 
> like it could be something odd in the environment.
>
> Shawn

--

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.




Strange problem when starting project in Windows XP

2009-12-18 Thread Dane
Hi all,

I'm new to Django. I got through the beginner tutorial without much
trouble and I just finished the introductory chapters of The
Definitive Guide, so I decided to start work on a real project. I've
quickly run into a bizarre stumbling block however when I try to start
my new project.

I run cmd.exe to open the windows command prompt, then I navigate to
my django projects folder, then type 'django-admin.py startproject
newsite' and then I get this error in the command prompt:

'The system cannot find the file idle.pyw'.

I also get an error dialog in windows titled 'idle.pyw' that says
'Windows cannot find 'idle.pyw'. Make sure you typed the name
correctly, and then try again. To search for a file, click the Start
button, and then click Search.'

I get the same error if I simply type 'django-admin.py' into the
prompt as well.

I really have no clue what's going on here. What does idle.pyw have to
do with anything? Google has been no help. I did this exact same thing
when going through the tutorial with no problems whatsoever, and made
no changes to any of my PATH variables or anything of that kind.

Any ideas? I'm really eager to get going with Django but feeling quite
frustrated! Thanks for help.

-Dane

--

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: ImageFiled Uploads

2008-07-17 Thread Dane Hesseldahl
Just FYI - I ended up using the models save__file method like
this:

if 'avatar' in request.FILES:
 uf = request.FILES['avatar']
 os.remove(settings.MEDIA_ROOT + "/avatars/" + user.username + ".jpg")
 profile.save_profile_avatar_file("avatars/" + user.username + ".jpg",
uf)

On Wed, Jul 16, 2008 at 12:36 PM, Marty Alchin <[EMAIL PROTECTED]>
wrote:

>
> On Wed, Jul 16, 2008 at 2:50 PM, d3f3nd3r <[EMAIL PROTECTED]> wrote:
> > hello,
> > I have another problem with file upload.
> > request.FILES['file'] represents a dictionary in my view, not an object.
> >
> > Here is my code :
> >class UserPicForm(forms.Form):
> >userpic  = forms.FileField()
> >
> >form = UserPicForm(request.POST,request.FILES)
> >if form.is_valid() :
> >handle_userpic(request.FILES['userpic'])
> >
> >def handle_userpic(f):
> >destination = open('/home/d3f3nd3r/hackerspace-os/mos/media/tmp',
> 'wb+')
> >for chunk in f.chunks() : -> ERROR : 'FileDict' object has no
> attribute 'chunks'
> >destination.write(chunk)
> >
> > I think I followed the docs at
> > http://www.djangoproject.com/documentation/upload_handling/ but it didnt
> work.
> > Any ideas ?
>
> You probably need to update to a more recent SVN checkout of Django.
> That document is only valid as of revision 7814, which went in a
> couple weeks ago.
>
> -Gul
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ImageFiled Uploads

2008-07-16 Thread Dane Hesseldahl
Hey guys,
I can't seem to find a good resource for the best way to handle this, so I
thought I'd ask.

What is the best way to handle an upload through an ImageField in a custom
form?

For example:
class ProfileForm(forms.Form):
first_name = forms.CharField(label='First Name', required=True)
last_name = forms.CharField(label='Last Name', required=True)
email = forms.EmailField(label='Email Address',
required=True)
avatar = forms.ImageField(label='Change Profile Image',
required=False )

How do I get to the image when the avatar field has an image uploaded
through it?

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---