Monday, October 31, 2011

Re: Can't add superuser

On Mon, Oct 31, 2011 at 8:43 AM, rihad <rihad@mail.ru> wrote:
Hi, I'm unable to add superuser. Running latest development trunk of
Django, & Python 2.7


This has been reported: https://code.djangoproject.com/ticket/16017

One way to fix it would be to get a locale properly set on your machine. Another would be to read that ticket and try patching your Django with one of the patches attached there.

Karen
--
http://tracey.org/kmt/

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

Re: Django tutorial hasn't received an update for 1.3

On Mon, Oct 31, 2011 at 3:08 PM, Kevin <kveroneau@gmail.com> wrote:
> I keep checking the tutorial page for version 1.3 hoping to see some
> new content related to the class-based views or at least some of the
> promised future tutorials.  The tutorial still has the function-based
> views, and no new updates since I first went through it on the 1.2
> release.
>
> I know the function views work in 1.3, but shouldn't the tutorial be
> using the latest features included in 1.3 so that new users coming to
> Django begin learning the newest features, such as class-based views.
>
> I'm still a dinosaur and using Django 1.2 and haven't yet dived into
> class-based views, and when I do, I would love a great tutorial on how
> to proceed.  I plan on learning Django 1.3's newest features very soon
> to keep myself up to speed and see if my current apps are fully
> compatible.
>
> Are there any updates on when we will see the following new tutorial
> sections:

Unfortunately, we can't give you an estimate of when more tutorials
will land -- the only real answer is "when they're written".

One of the embarrasing things about Django's docs is that Tutorial 4
ends with "More tutorials coming soon". It said when *I* started using
Django -- 6 years ago.

This is definitely something that I would like to see addressed;
however, good tutorials are time consuming to write, and nobody has
volunteered to write one (there is a draft for a Tutorial 5 that has
been waiting for review for a couple of months, however).

All the topics you list, and many many more, would be excellent
candidates for tutorials. If *anyone* wants to get started with
contributing to Django, writing tutorials would be a great way to help
out.

Yours,
Russ Magee %-)

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

Re: I can't activate the admin site

Thank you all.
I'm using Django 1.3
I may need to rewrite the file sites.py
I'm sure I did not change anything in that file.

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

Re: new formwizard - how to pass data between forms

Hey Kurtis,

thanks for your answer.

I think hidden fields were used in the old implementation.
At least the release notes for 1.4 say:
"It features a pluggable storage API and doesn't require the wizard to
pass around hidden fields for every previous step."
But checking the example apps (https://github.com/stephrdev/django-
formwizard/blob/master/test_project/testapp2/views.py#L20
) i found
what i was looking for:
get_cleaned_data_for_step()

It does exactly what i need :-)

On 31 Okt., 03:07, Kurtis Mullins <kurtis.mull...@gmail.com> wrote:
> I haven't read that particular back ports docs but when I looked at the dev docs for the new form wizard a little while back, I believe that it stores all previous data as hidden fields throughout the process. So I would think form.cleaned_data should contain everything. Hopefully that helps a little :)
>
> Sent from my iPad
>
> On Oct 29, 2011, at 11:19 AM, andreas <dal...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi all,
>
> > i am using the backport of django's new formwizard (https://github.com/
> > stephrdev/django-formwizard).
> > and i am looking for the recommended way to pass data between the
> > different forms/steps.
>
> > Basically i am using the formwizard to process a series of forms that
> > let the user (further) specify filter options from step to step.
> > For example in the first step you would choose from a list of
> > countries, the next form would give you the states form these
> > countries and the final result of the wizard (done()) renders a list
> > of the major cities in these states.
>
> > If i use get_form_kwargs (https://docs.djangoproject.com/en/dev/ref/
> > contrib/formtools/form-wizard/
> > #django.contrib.formtools.wizard.views.WizardView.get_form_kwargs) i
> > can access the data from the previous step via self.request.POST and
> > pass   the selected choices to the form constructor of the next form
> > where i then filter the choices of the relevant field.
>
> > But is it also possible to access the selected data fron step 1 in
> > step4?
> > Something like get_all_cleaned_data() but just for the processed
> > steps?
>
> > --
> > 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 athttp://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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: TabularInline "Add another" link not clickable

This CSS tweak fixed it:

div.inline-group {
display: inline-block;
}

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

Re: Django Standalone Template

Yeah. Tuples catch a lot of folks. Just because the empty tuple is
spelled () .

At the risk of telling you something that you already know:

The app_directories_ loader should pull this stuff in for you, so long as
django.contrib.admin is in INSTALLED_APPS. Usually TEMPLATE_DIRS
is used to include a "templates" directory in your project root.

On Mon, Oct 31, 2011 at 5:17 PM, Stefan Lisowski <s.lisowski@isti.com> wrote:
> On 10/31/2011 3:51 PM, Bill Freeman wrote:
>>
>> Try putting a comma at the end of the TEMPLATE_DIRS line.
>
> Hurrah, that did it. Thanks Mr. Freeman.
>
>> Parentheses do not the tuple make.  It's the comma.  An expression
>> surrounded by parentheses is just the expression, so you're trying to
>> use each letter of your setting as a directory, I believe.
>
> I assumed a single directory could be a case of a single element. Tuple
> lesson duly noted.
>
>> I take it you're not using the app directories loader?
>
> Not yet.
>
> - Stefan
>
>> On Mon, Oct 31, 2011 at 3:58 PM, Stefan Lisowski<s.lisowski@isti.com>
>>  wrote:
>>>
>>> On 10/31/2011 2:49 PM, Bill Freeman wrote:
>>>>
>>>> I think that you have too many "admin"s.  Try:
>>>>
>>>>
>>>>
>>>> TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates')
>>>
>>> Thanks for the suggestion. I don't see much difference on my system here
>>> though...
>>>
>>> C:\Program Files (x86)\Microsoft Visual Studio
>>> 8\VC>c:\Python26\python.exe
>>> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit
>>> (Intel)]
>>> on
>>> win32
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>>>>
>>>>>> import django.template
>>>>>>
>>>>>>
>>>>>> django.conf.settings.configure(TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates'),TEMPLATE_DEBUG=True,
>>>>>> DEBUG=True)
>>>>>> import django.template.loader as loader
>>>>>> loader.get_template("base.html")
>>>
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in<module>
>>>  File "c:\Python26\lib\site-packages\django\template\loader.py", line
>>> 157,
>>> in get_template
>>>    template, origin = find_template(template_name)
>>>  File "c:\Python26\lib\site-packages\django\template\loader.py", line
>>> 138,
>>> in find_template
>>>    raise TemplateDoesNotExist(name)
>>> django.template.base.TemplateDoesNotExist: base.html
>>>>>>
>>>>>> loader.get_template("admin/base.html")
>>>
>>> Traceback (most recent call last):
>>>  File "<stdin>", line 1, in<module>
>>>  File "c:\Python26\lib\site-packages\django\template\loader.py", line
>>> 157,
>>> in get_template
>>>    template, origin = find_template(template_name)
>>>  File "c:\Python26\lib\site-packages\django\template\loader.py", line
>>> 138,
>>> in find_template
>>>    raise TemplateDoesNotExist(name)
>>> django.template.base.TemplateDoesNotExist: admin/base.html
>>>
>>> Has anyone here used the template system successfully without using all
>>> of
>>> Django?
>>>
>>>>
>>>> On Mon, Oct 31, 2011 at 3:30 PM, Stefan Lisowski<s.lisowski@isti.com>
>>>>  wrote:
>>>>>
>>>>> I appreciate the reply SmileyChris -
>>>>>
>>>>> On 10/30/2011 12:41 PM, SmileyChris wrote:
>>>>>>
>>>>>> Take a read through this section of the docs:
>>>>>>
>>>>>>
>>>>>> https://docs.djangoproject.com/en/1.3/ref/templates/api/#loading-templates
>>>>>
>>>>> Yes, that's what I was reading.
>>>>>
>>>>>> Specifically, those templates are found via the
>>>>>> app_directories.Loader.
>>>>>> So you'd run loader.get_template('admin/base.html') to get that
>>>>>> template. The reason that it's in a subdirectory is to avoid conflicts
>>>>>> with other applications (since they may want to use their own
>>>>>> 'base.html' template.
>>>>>
>>>>> So, my setting TEMPLATE_DIRS here to the actual subdirectory would not
>>>>> work?
>>>>>
>>>>>
>>>>>
>>>>> TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates/admin')
>>>>>
>>>>> I used this as an example to point to some templates that are known to
>>>>> work,
>>>>> rather than point to my own templates that don't work either. If I go
>>>>> into
>>>>> the Django code and print out the directory that's being searched, I
>>>>> see
>>>>> the
>>>>> correct directory there, so I don't know why things are failing. Maybe
>>>>> I'm
>>>>> just not instantiating things correctly?
>>>>>
>>>>> In any case, I tried your suggestion, but still no luck:
>>>>>
>>>>>>>> loader.get_template('admin/base.html')
>>>>>
>>>>> Traceback (most recent call last):
>>>>>  File "<stdin>", line 1, in<module>
>>>>>  File "django/template/loader.py", line 164, in get_template
>>>>>    template, origin = find_template(template_name)
>>>>>  File "django/template/loader.py", line 145, in find_template
>>>>>    raise TemplateDoesNotExist(name)
>>>>> django.template.base.TemplateDoesNotExist: admin/base.html
>>>>>
>>>>> (I also tried without manually setting TEMPLATE_DIRS, but just ran
>>>>> django.conf.settings.configure(), still to no avail.)
>>>>>
>>>>> Anyone, any ideas? I'm completely new to Django, but I've not been
>>>>> working
>>>>> in Python lately either, so it could just be a Python mistake on my
>>>>> part.
>>>>>
>>>>> - Stefan
>>>>>
>>>>> -------- Original Message --------
>>>>> Subject: Django Standalone Template
>>>>> Date: Fri, 28 Oct 2011 19:54:20 -0700 (PDT)
>>>>> From: Stefan Lisowski<s.lisowski@isti.com>
>>>>> Reply-To: django-users@googlegroups.com
>>>>> To: Django users<django-users@googlegroups.com>
>>>>>
>>>>> Hi Django folks -
>>>>>
>>>>> I'm new to Django, and I just want to use the template system now,
>>>>> independent of the rest of Django. But I can't get it to see a
>>>>> template. Even the system templates as was suggested when I started
>>>>> Googling for my error.
>>>>>
>>>>>>>> import django.template
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> django.conf.settings.configure(TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates/admin'),TEMPLATE_DEBUG=True,
>>>>>>>> DEBUG=True)
>>>>>>>> import django.template.loader as loader
>>>>>>>> loader.get_template("base.html")
>>>>>
>>>>> Traceback (most recent call last):
>>>>>  File "<stdin>", line 1, in<module>
>>>>>  File "c:\python26\lib\site-packages\django\template\loader.py", line
>>>>> 157, in get_template
>>>>>    template, origin = find_template(template_name)
>>>>>  File "c:\python26\lib\site-packages\django\template\loader.py", line
>>>>> 138, in find_template
>>>>>    raise TemplateDoesNotExist(name)
>>>>> django.template.base.TemplateDoesNotExist: base.html
>>>>>>>>
>>>>>>>> exit()
>>>>>
>>>>> C:\Program Files (x86)\Microsoft Visual Studio 8\VC>ls C:/Python26/Lib/
>>>>> site-packages/django/contrib/admin/templates/admin | grep base
>>>>> base.html
>>>>> base_site.html
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> --
>>>>> 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+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+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+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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: Django Standalone Template

On 10/31/2011 3:51 PM, Bill Freeman wrote:
> Try putting a comma at the end of the TEMPLATE_DIRS line.

Hurrah, that did it. Thanks Mr. Freeman.

> Parentheses do not the tuple make. It's the comma. An expression
> surrounded by parentheses is just the expression, so you're trying to
> use each letter of your setting as a directory, I believe.

I assumed a single directory could be a case of a single element. Tuple
lesson duly noted.

> I take it you're not using the app directories loader?

Not yet.

- Stefan

> On Mon, Oct 31, 2011 at 3:58 PM, Stefan Lisowski<s.lisowski@isti.com> wrote:
>> On 10/31/2011 2:49 PM, Bill Freeman wrote:
>>> I think that you have too many "admin"s. Try:
>>>
>>>
>>> TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates')
>>
>> Thanks for the suggestion. I don't see much difference on my system here
>> though...
>>
>> C:\Program Files (x86)\Microsoft Visual Studio 8\VC>c:\Python26\python.exe
>> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)]
>> on
>> win32
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import django.template
>>>>>
>>>>> django.conf.settings.configure(TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates'),TEMPLATE_DEBUG=True,
>>>>> DEBUG=True)
>>>>> import django.template.loader as loader
>>>>> loader.get_template("base.html")
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in<module>
>> File "c:\Python26\lib\site-packages\django\template\loader.py", line 157,
>> in get_template
>> template, origin = find_template(template_name)
>> File "c:\Python26\lib\site-packages\django\template\loader.py", line 138,
>> in find_template
>> raise TemplateDoesNotExist(name)
>> django.template.base.TemplateDoesNotExist: base.html
>>>>> loader.get_template("admin/base.html")
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in<module>
>> File "c:\Python26\lib\site-packages\django\template\loader.py", line 157,
>> in get_template
>> template, origin = find_template(template_name)
>> File "c:\Python26\lib\site-packages\django\template\loader.py", line 138,
>> in find_template
>> raise TemplateDoesNotExist(name)
>> django.template.base.TemplateDoesNotExist: admin/base.html
>>
>> Has anyone here used the template system successfully without using all of
>> Django?
>>
>>>
>>> On Mon, Oct 31, 2011 at 3:30 PM, Stefan Lisowski<s.lisowski@isti.com>
>>> wrote:
>>>>
>>>> I appreciate the reply SmileyChris -
>>>>
>>>> On 10/30/2011 12:41 PM, SmileyChris wrote:
>>>>>
>>>>> Take a read through this section of the docs:
>>>>>
>>>>> https://docs.djangoproject.com/en/1.3/ref/templates/api/#loading-templates
>>>>
>>>> Yes, that's what I was reading.
>>>>
>>>>> Specifically, those templates are found via the app_directories.Loader.
>>>>> So you'd run loader.get_template('admin/base.html') to get that
>>>>> template. The reason that it's in a subdirectory is to avoid conflicts
>>>>> with other applications (since they may want to use their own
>>>>> 'base.html' template.
>>>>
>>>> So, my setting TEMPLATE_DIRS here to the actual subdirectory would not
>>>> work?
>>>>
>>>>
>>>> TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates/admin')
>>>>
>>>> I used this as an example to point to some templates that are known to
>>>> work,
>>>> rather than point to my own templates that don't work either. If I go
>>>> into
>>>> the Django code and print out the directory that's being searched, I see
>>>> the
>>>> correct directory there, so I don't know why things are failing. Maybe
>>>> I'm
>>>> just not instantiating things correctly?
>>>>
>>>> In any case, I tried your suggestion, but still no luck:
>>>>
>>>>>>> loader.get_template('admin/base.html')
>>>>
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in<module>
>>>> File "django/template/loader.py", line 164, in get_template
>>>> template, origin = find_template(template_name)
>>>> File "django/template/loader.py", line 145, in find_template
>>>> raise TemplateDoesNotExist(name)
>>>> django.template.base.TemplateDoesNotExist: admin/base.html
>>>>
>>>> (I also tried without manually setting TEMPLATE_DIRS, but just ran
>>>> django.conf.settings.configure(), still to no avail.)
>>>>
>>>> Anyone, any ideas? I'm completely new to Django, but I've not been
>>>> working
>>>> in Python lately either, so it could just be a Python mistake on my part.
>>>>
>>>> - Stefan
>>>>
>>>> -------- Original Message --------
>>>> Subject: Django Standalone Template
>>>> Date: Fri, 28 Oct 2011 19:54:20 -0700 (PDT)
>>>> From: Stefan Lisowski<s.lisowski@isti.com>
>>>> Reply-To: django-users@googlegroups.com
>>>> To: Django users<django-users@googlegroups.com>
>>>>
>>>> Hi Django folks -
>>>>
>>>> I'm new to Django, and I just want to use the template system now,
>>>> independent of the rest of Django. But I can't get it to see a
>>>> template. Even the system templates as was suggested when I started
>>>> Googling for my error.
>>>>
>>>>>>> import django.template
>>>>>>>
>>>>>>>
>>>>>>> django.conf.settings.configure(TEMPLATE_DIRS=('C:/Python26/Lib/site-packages/django/contrib/admin/templates/admin'),TEMPLATE_DEBUG=True,
>>>>>>> DEBUG=True)
>>>>>>> import django.template.loader as loader
>>>>>>> loader.get_template("base.html")
>>>>
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in<module>
>>>> File "c:\python26\lib\site-packages\django\template\loader.py", line
>>>> 157, in get_template
>>>> template, origin = find_template(template_name)
>>>> File "c:\python26\lib\site-packages\django\template\loader.py", line
>>>> 138, in find_template
>>>> raise TemplateDoesNotExist(name)
>>>> django.template.base.TemplateDoesNotExist: base.html
>>>>>>>
>>>>>>> exit()
>>>>
>>>> C:\Program Files (x86)\Microsoft Visual Studio 8\VC>ls C:/Python26/Lib/
>>>> site-packages/django/contrib/admin/templates/admin | grep base
>>>> base.html
>>>> base_site.html
>>>>
>>>> Any ideas?
>>>>
>>>> --
>>>> 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+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+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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.