Russell Keith-Magee | 1 Nov 2011 01:42
Gravatar

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

On Mon, Oct 31, 2011 at 3:08 PM, Kevin <kveroneau <at> 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
(Continue reading)

Karen Tracey | 1 Nov 2011 01:43
Picon
Gravatar

Re: Can't add superuser

On Mon, Oct 31, 2011 at 8:43 AM, rihad <rihad <at> 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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
kenneth gonsalves | 1 Nov 2011 02:36

Re: I can't activate the admin site

On Mon, 2011-10-31 at 17:31 +0200, Nick Apostolakis wrote:
> On 31/10/2011 02:12 μμ, kenneth gonsalves wrote:
> >
> > but the indentation error seems to be in the django source code?
> > Normally one does not fiddle with that.
> >    
> 
> no I wouldn't expect the indentation problem to be located in django
> code.
> unless you are using an unstable version or something....
> 
> 

the source might have got corrupted. A reinstall may solve the problem.
-- 
regards
Kenneth Gonsalves

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

BillB1951 | 1 Nov 2011 02:30
Picon

Django - tutorial part 2 problem - Permission denied when attempting to save file

Got this error
Ran into this as part of the Django tutorial (part 2)  very close to
the bottom ....  an attempt to change the page header/title.

"There was an error attempting to save 'base_site.html':Permission
denied"

when trying to save the file below (copied from django source code)

{% extends "admin/base.html" %}
{% load i18n %}

{% block title %}{{ title }} | {% trans 'Django site admin' %}{%
endblock %}

{% block branding %}
<h1 id="site-name">{% trans 'Django administration' %}</h1>
{% endblock %}

{% block nav-global %}{% endblock %}

any thoughts?

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Nikolas Stevenson-Molnar | 1 Nov 2011 03:12
Gravatar

Re: Django - tutorial part 2 problem - Permission denied when attempting to save file

It looks like you don't have write permissions to the "base_site.html"
file, or if the file doesn't exist, than you likely don't have proper
permissions for the enclosing folder. What is the full path of the file
you're attempting to edit?

On 10/31/2011 6:30 PM, BillB1951 wrote:
> Got this error
> Ran into this as part of the Django tutorial (part 2)  very close to
> the bottom ....  an attempt to change the page header/title.
>
>
> "There was an error attempting to save 'base_site.html':Permission
> denied"
>
> when trying to save the file below (copied from django source code)
>
>
>
> {% extends "admin/base.html" %}
> {% load i18n %}
>
> {% block title %}{{ title }} | {% trans 'Django site admin' %}{%
> endblock %}
>
> {% block branding %}
> <h1 id="site-name">{% trans 'Django administration' %}</h1>
> {% endblock %}
>
> {% block nav-global %}{% endblock %}
>
>
> any thoughts?
>

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Gath | 1 Nov 2011 04:59
Picon
Gravatar

Re: Why are my two django objects of the same type behaving differently?

Somebody answered this
http://stackoverflow.com/questions/7954474/why-are-my-two-django-objects-of-the-same-type-behaving-differently

 ...
>>> s = '%build%'
>>> content_query = content_class.objects.raw("Select * from pms_building where name like %s",[s])
>>> type(content_query)
<Building: Building A>

Works well.

Thanks

On Oct 31, 5:30 pm, Gath <pgath... <at> gmail.com> wrote:
> Help!
>
> I have two objects that i have created using different techniques in
> django;
>
> >>> from django.contrib.contenttypes.models import ContentType
> >>> from myproject.models import Building
>
> Method A
>
> >>> content_type = ContentType.objects.get(app_label='myproject', model='Building')
> >>> content_class = content_type.model_class()
> >>> content_query = content_class.objects.raw("Select * from pms_building where name like '%build%' ")
> >>> type(content_query)
>
> <class 'django.db.models.query.RawQuerySet'>>>> content_query[0]
>
> # error ....
> # Attribute: 'str' object has no attribute 'items'
>
> Method B
>
> >>> bld = Building.objects.raw("Select * from pms_building where name like '%build%' ")
> >>> type(bld)
>
> <class 'django.db.models.query.RawQuerySet'>
>
> >>>bld[0]
>
> <Building: Building A>
>
> My question is why are the two objects of the same type behaving
> differently?
>
> Gath

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

rihad | 1 Nov 2011 06:08
Picon

Re: Can't add superuser

On Nov 1, 4:43 am, Karen Tracey <kmtra... <at> gmail.com> wrote:
> On Mon, Oct 31, 2011 at 8:43 AM, rihad <ri... <at> 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.

Thanks. I just set LANG=en_US.UTF-8 (from empty), dropped the
auth_user & django_site tables for them to be recreated, ran "manage
syncdb", and now everything works. Apparently it's a new quirk of
Django, earlier releases didn't care if LANG was set.

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Kurtis Mullins | 1 Nov 2011 07:15
Picon
Gravatar

Re: new formwizard - how to pass data between forms

Awesome! Let me know how it works out for you. I'll probably be giving it a try shortly as well. Thanks for sharing the good information.

On Mon, Oct 31, 2011 at 6:43 PM, andreas <dalebc <at> gmail.com> wrote:
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... <at> 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... <at> 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 <at> googlegroups.com.
> > To unsubscribe from this group, send email to django-users+unsubscribe <at> 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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> 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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Jaroslav Dobrek | 1 Nov 2011 12:07
Picon

Set of choices of which several can be chosen without using a ManyToManyField

Hello,

what is the most straightforward way to use a set of choices of which
several can be chosen without using a ManyToManyField?

Using a ManyToManyField would make my program unnecessarily
complicated.

Example:

class Candidate(models.Model):

    programming_languages = models.MultipleChoiceField(max_length=50,
choices=( # replace MultipleChoiceField with existing possibility

            (u'Python)', u'Python'),
            (u'C++', u'C++'),
            (u'Java', u'Java'),
            # ...
            ), blank=True)

Jaroslav

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Nicole Button | 1 Nov 2011 07:23
Picon

Disk I/O Error

I'm getting a DatabaseError, looking like this:

Django Version: 	1.3
Exception Type: 	DatabaseError
Exception Value: 	disk I/O error
Exception Location: 	/usr/local/lib/python2.6/dist-packages/django/db/
backends/sqlite3/base.py in execute, line 234

whenever I try to read or write to any of the databases associated
with any of the websites on one of our servers. The fact that all
these websites work locally, but not in their live versions seems to
suggest to me that something has gone wrong on the server, rather than
with django, but I thought I'd better ask and see if any one has had
any similar issues. I'm running python 2.6.6, django 1.3 and they're
on a Linux server.

--

-- 
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 <at> googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Gmane