Re: Djangoprojects tutorial

2010-06-27 Thread Sithembewena Lloyd Dube
Hi there, Please paste the code in your settings.py file's INSTALLED_APPS, and your Poll code from models.py. On Mon, Jun 28, 2010 at 8:50 AM, Eduan wrote: > Hi I am new at Django and was told to start at > http://docs.djangoproject.com/en/dev/intro/tutorial01/ this website > gives you a easy t

Djangoprojects tutorial

2010-06-27 Thread Eduan
Hi I am new at Django and was told to start at http://docs.djangoproject.com/en/dev/intro/tutorial01/ this website gives you a easy tutorial for beginners. I was following it exatly as it says and I got an error. I started over and got the same error again. I was running this command: python manage

Re: Tutorial problems

2010-06-27 Thread Kenneth Gonsalves
On Sunday 27 June 2010 20:59:14 Darren wrote: > If you are using apache on Debian Linux, /etc/init.d/apache restart. Other > Linux distros and Mac look for apachectrl. > apachectl on others and apache2ctl on debian -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You receiv

ModelChoiceField

2010-06-27 Thread Tran Cao Thai
hi all, i am trying to write auto populated select box by using jquery and ModelChoiceField. I have 2 variables cates and subcates, the first one take all the objects from the Category model, the second takes None object (Subcategory.objects.none ()). at first the html rendering is fine. When i sel

Autologin after activation in django-registration

2010-06-27 Thread Alexandre González
Hi! I like to autologin the user after they activate their account with the mail-link. I saw this snippet: http://djangosnippets.org/snippets/1960/ but I can't do it work. I saw the django-registration code and I don't see any emmited signals. I was reading the django registration documentation

Slides for mod_wsgi talk available.

2010-06-27 Thread Graham Dumpleton
At PyCon Sydney this past weekend I did a talk about getting started with Apache/mod_wsgi. For some of that I used Django as an example. More importantly, the talk didn't cover how mod_wsgi worked but configuring it. This included coverage of all the common errors that come up when people do this,

Django admin - Edit parent model and related models on the same page

2010-06-27 Thread DoubleD
I want to be able to edit all data on one page. How can i achieve this ? Should i modify my models? If so, then how should i modify them? class TextStyle(models.Model): color = models.CharField(_("color"), max_length=7) style = models.CharField(_("style"), max_length=30) typeface = m

Re: Problem with static files (MEDIA_URL and MEDIA_ROOT)

2010-06-27 Thread Graham Dumpleton
On Jun 27, 10:53 pm, Denis Ricardo wrote: > Hello people! I am having any problems with static files (images, CSS) > in Django. I configured the MEDIA_URL and MEDIA_ROOT in settings.py > and when I execute the server and I go see the webpage, the static > files doesn't are encountered (the page

Re: Tutorial problems

2010-06-27 Thread Gabriel Gayan
just rerun the server using python manage.py runserver Cheers On Sun, Jun 27, 2010 at 10:49 AM, zippzom wrote: > How does one go about restarting the server? > > Thanks in advance! > > On Jun 25, 10:37 pm, Michael Schade wrote: > > As Gabriel mentioned, make sure you reran the server after

Re: trouble with many to many form

2010-06-27 Thread Василий Паньшин
Nobody can help me with this :( ? 23 июня 2010 г. 17:43 пользователь Василий Паньшин написал: > It's not casual form > > 2010/6/23 Casey S. Greene > > I am also pretty new to django but I think that what you are looking for is >> the many to many through relationship: >> >> >> http://docs.dj

Re: Just one action on all the objects

2010-06-27 Thread Karen Tracey
On Sun, Jun 27, 2010 at 7:43 AM, tom wrote: > In the same manner - 'check all' only check the currently visible > results (100 by default) in the change list page. > I want that check all will actually check all the results, even the > tuples in the next pages... > > anyone? > 1.2 has this funct

Re: Just one action on all the objects

2010-06-27 Thread rahul jain
Hi Tom, One possible solution could be you can increase the number of objects shown on change list page and set it to your max objects. Only problem is your page becomes super long. Which is not a good solution. Secondly, before doing any action on admin objects, you can select "show all". Thirdl

Re: list_editable and save changes to individual row/cell

2010-06-27 Thread rahul jain
Good question. Anyone on this ? On Fri, Jun 25, 2010 at 9:48 AM, Jason Wang wrote: > Hi all, > > Does anyone know if there is a way to save changes on a per row/cell > basis for forms with list_editable in django admin? I would like to > have a button for each row and each cell to do that. > > Th

Re: formfield_for_foreignkey: how to know if we are modifyng an entry

2010-06-27 Thread drakkan
On 27 Giu, 18:00, Walt wrote: > I'm not sure if it works in this context but have you tried > self.instance.id? No it doesn't work in my context, other ideas? > > Walt > > -~ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Error using inline displays with a user profile

2010-06-27 Thread Karen Tracey
On Sun, Jun 27, 2010 at 1:54 PM, derek wrote: > File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/ > options.py" in change_view > 900. change_message = > self.construct_change_message(request, form, formsets) > File "/usr/local/lib/python2.6/dist-packages/django/c

Re: Rendering the Admin app list?

2010-06-27 Thread derek
On Jun 26, 6:14 pm, "euan.godd...@googlemail.com" wrote: > There is no reason why all views should pass that variable to the > template. It is more efficient to only pass the minimal variable > necessary to render the template Even the list is lazily evaluated > there is still unnecessary overhead

Re: Error using inline displays with a user profile

2010-06-27 Thread derek
On Jun 26, 3:39 pm, Karen Tracey wrote: > On Sat, Jun 26, 2010 at 3:48 AM, derek wrote: > >   Caught TypeError while rendering: coercing to Unicode: need string > > or buffer, NoneType found > > The typical reason for this message is a __unicode__ method for a model that > is not returning unicod

Re: formfield_for_foreignkey: how to know if we are modifyng an entry

2010-06-27 Thread Walt
I'm not sure if it works in this context but have you tried self.instance.id? Walt -~ -- 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 ema

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-27 Thread Federico Capoano
Thanks for your help. I've been able to fix the problem thanks also to the Rackspace technical support. This is the answer, i post it cos it might be useful to someone else: "Greetings, I've added the two lines you provided to /etc/sysconfig/httpd - a file which is 'sourced' by the apache startu

Re: Tutorial problems

2010-06-27 Thread Darren
If you are using apache on Debian Linux, /etc/init.d/apache restart. Other Linux distros and Mac look for apachectrl. Darren On Jun 27, 2010, at 9:49 AM, zippzom wrote: > How does one go about restarting the server? > > Thanks in advance! > > On Jun 25, 10:37 pm, Michael Schade wrote: >> A

Re: Custom widgets in Model Formsets

2010-06-27 Thread ses1984
Thanks for spotting this! I can't believe I let myself make such a basic error. On Jun 27, 5:51 am, Daniel Roseman wrote: > On Jun 27, 7:47 am, ses1984 wrote: > > > I am trying to use custom widgets in a model formset. I have tried to > > achieve this by first defining the custom widget, then a

Associate a method with a model instance?

2010-06-27 Thread jimbocooper
Hi, I am a little bit stuck. I have been commanded to do an exersice which states in one of the steps to associate a method with an instance (as I understood), here a closer explanation: I have a model, wich have different methods, each of them execute some tests given that model's instance field

Re: Tutorial problems

2010-06-27 Thread zippzom
How does one go about restarting the server? Thanks in advance! On Jun 25, 10:37 pm, Michael Schade wrote: > As Gabriel mentioned, make sure you reran the server after making the > changes (though if using runserver, it should handle that for you). Also > make sure you did not miss this bit in t

Problem with static files (MEDIA_URL and MEDIA_ROOT)

2010-06-27 Thread Denis Ricardo
Hello people! I am having any problems with static files (images, CSS) in Django. I configured the MEDIA_URL and MEDIA_ROOT in settings.py and when I execute the server and I go see the webpage, the static files doesn't are encountered (the page stay without anything). Screen Shot of my page: http

Deployment Permissions

2010-06-27 Thread Rusty Shackleford
Hi, I'm about to deploy my first Django app, but I have a few questions about permissions. The project container is at '/usr/local/sites' with '775 root www- data'. I have the project stored at '/usr/local/sites/project' with '755 www- data www-data'. I have NGINX aliased to '/usr/local/sites/

Caught ViewDoesNotExist while rendering: Could not import smsnotifications.views. Error was: No module named forms

2010-06-27 Thread Allen Machary
Hi All, i have a problem in import problem. in importing forms.py in views.py here are my files both located in smsnotifications app -- smsnotifications/forms.py from django.forms import ModelForm from smsnotifications.models import SmsNotification class SmsNotificationForm(ModelForm): class M

Re: Just one action on all the objects

2010-06-27 Thread tom
In the same manner - 'check all' only check the currently visible results (100 by default) in the change list page. I want that check all will actually check all the results, even the tuples in the next pages... anyone? thanks! tom On May 26, 9:46 am, rahul jain wrote: > Hi Django, > > Can i ru

Re: Custom widgets in Model Formsets

2010-06-27 Thread Daniel Roseman
On Jun 27, 7:47 am, ses1984 wrote: > I am trying to use custom widgets in a model formset. I have tried to > achieve this by first defining the custom widget, then a form that > uses this widget, then passing this form as an argument to > modelformset_factory(). > > I don't think something is work

Re: generate localized message on Mac OS-X

2010-06-27 Thread tsmets
Well Yes & No Apparently gettext is missing but xegettext is present but Django complains on xgettext returning an Error... so it seems that it did the switch to xgettext correctly :) \T, ps : I altered the subject to hint Mac User into this post (?) On Jun 25, 6:26 pm, Felippe Bueno wrote: T