On Jul 30, 11:17 pm, EricBrian wrote:
> Daniel, if I don't do that, I get the unicode error in the list of
> dashboards in the admin section.
>
You'd better post the traceback for that, then.
Just to be clear, your method should look like this:
def __unicode__(self):
return self.nam
I want to grab a single column in a model and use it to populate a
multi-select form field. Here's the code that I'm currently using:
areas = forms.ModelMultipleChoiceField(queryset=Area.objects.all(),
label='Preferred Areas', help_text='Select the areas that you\'d like
to serve.')
This code ret
I'm trying to get sitemaps configured properly for http://newsley.com,
but I'm having weird issues with the URLs that are being created for
the sitemaps.xml on my production server. e.g. http://newsley.com/sitemap.xml
When I run the code on my development server, using ./manage.py
runserver, the
On Jul 31, 10:07 am, strayhand wrote:
> I want to grab a single column in a model and use it to populate a
> multi-select form field. Here's the code that I'm currently using:
>
> areas = forms.ModelMultipleChoiceField(queryset=Area.objects.all(),
> label='Preferred Areas', help_text='Select the a
Hello,
If i do following, it works:
form = ContactForm(label_suffix=":")
print form
Your name:...
but here it is missing ':':
form['name'].label_tag()
u'Your name'
I need to customize form output, so I can not use print form or as_p(),
etc. and I am using following:
{% for field in f
On 30/07/10 tiemonster said:
> I cover some of the new changes in Django 1.2 in this article:
> http://www.tiemonster.info/a/24005/
>
> Most of this information comes straight from the changelist. Others
> were things that the core developers must have assumed were common
> sense, but that I didn
On Fri, Jul 30, 2010 at 8:14 PM, tiemonster wrote:
> I cover some of the new changes in Django 1.2 in this article:
> http://www.tiemonster.info/a/24005/
>
> Most of this information comes straight from the changelist. Others
> were things that the core developers must have assumed were common
> s
On Sat, Jul 31, 2010 at 9:45 PM, Michael P. Soulier
wrote:
> On 30/07/10 tiemonster said:
>
>> I cover some of the new changes in Django 1.2 in this article:
>> http://www.tiemonster.info/a/24005/
>>
>> Most of this information comes straight from the changelist. Others
>> were things that the cor
Hi all,
Is there any way of getting the request.path value without having the
request object that Django pass's around. Is there something similar
to os.environ for the web request where I can get the path?
I'm developing an app that needs to cache data on a page basis but the
data may come from
Ah... Well that's exactly what's happening. I'm getting "Area Object"
for each element in the select box. I've seen the __unicode__ method
on a few model examples, but my book and other resources never really
showed or explained it. I'll see if I can find some explanation of it.
Thanks for the clue
Sweet. That did the trick. I found an example here:
http://www.djangoproject.com/documentation/models/str/
# Areas Model UPDATED
from django.db import models
# Create your models here.
class Area(models.Model):
name = models.CharField(max_length=40)
city = models.CharField(max_le
I think perhaps I'll also put this problem another way. I need to
cache data against the current web request without having the Django
built request object.
On Jul 31, 4:56 pm, cootetom wrote:
> Hi all,
>
> Is there any way of getting the request.path value without having the
> request object t
Just add django.core.context_processors.request to your
TEMPLATE_CONTEXT_PROCESSORS, this way you can access the current
request object in your template, you will have to use however
RequestContext class with render_to_response,
>From docs:
django.core.context_processors.request
If TEMPLATE_CONT
http://docs.djangoproject.com/en/dev/topics/db/queries/#related-objects
On Jul 30, 12:29 pm, J wrote:
> I have a model, which has a related model, which then has a related
> m2m field (See defs below).
>
> I want to add a method to the m2m model (ie: "Button") which, when
> called in a template,
Thanks Carlos but I'm trying to achieve getting the path without
having to pass the request object.
On Jul 31, 7:11 pm, Carlos Daniel Ruvalcaba Valenzuela
wrote:
> Just add django.core.context_processors.request to your
> TEMPLATE_CONTEXT_PROCESSORS, this way you can access the current
> request
Hi everybody
I installed python and django in my Windows 7 home premium operating
system. But when I tried to execute "django-admin.py startproject
mysite" command in it, the Operating system is asking me to choose the
program to run this application. But this is not happened when I tried
this in
Hi,
I'm not a windows user but I'm guessing that you want to use the python
executable (see if you can find something called "python".
Alternatively, what if you run it with:
python django-admin.py startproject mysite
Hope this helps,
-- Casey
On 07/31/2010 03:12 PM, balu wrote:
Hi everybo
Yah... I tried it by adding python in the command line. But I couldn't
get the actual result. Could you people can give a gist of what
happens when we type "django-admin.py startproject mysite" i.e., which
program will run when we type that and press return key.
On Aug 1, 12:41 am, "Casey S. Gree
It runs django-admin.py using the python interpreter.
Maybe this webpage, or a windows user on this list, will have the answer:
http://docs.python.org/faq/windows.html
Hope this helps,
-- Casey
On 07/31/2010 03:57 PM, balu wrote:
Yah... I tried it by adding python in the command line. But I co
Area.objects.values('name','city')
On Jul 31, 5:07 pm, strayhand wrote:
> I want to grab a single column in a model and use it to populate a
> multi-select form field. Here's the code that I'm currently using:
>
> areas = forms.ModelMultipleChoiceField(queryset=Area.objects.all(),
> label='Prefer
Im using ubuntu
I managed to get through the poll project working on the django tut.
then tried another project
At the prompt i get
g...@gino-laptop:~/djangoDEV$ django-admin
The program 'django-admin' is currently not installed. You can
install it by typing:
sudo apt-get install python-django
I've been scratching my head over this for awhile now --
I have an app called "main" that has two models defined "entity"
"story" -- I am able to see a list of each via the following urls:
http://127.0.0.1:8000/admin/main/entity/
http://127.0.0.1:8000/admin/main/story/
However, I'm only able to
Hi,
I just migrated from Linux to Mac OS, and I'm getting an error message
when I try register a new user of my django site, (at my page)
I get the error: can't adapt type 'US/Eastern'
I'm using Postgresql and psycopg2, I tried to change the TIME_ZONE to
'America/Sao_Paulo'(I'm in Brazil), but the
Hi Djangonauts,
I've released a new version of django-forms-builder. It's a small Django
reusable app that allows admin users to build their own forms.
This release is a complete rewrite that addresses the fact that previously
the fields available for forms created by admin users were restricted
On Sat, Jul 31, 2010 at 12:37 PM, cootetom wrote:
> Thanks Carlos but I'm trying to achieve getting the path without
> having to pass the request object.
In a word: don't.
Instead, design your system to pass the information you need where and
when you need it. This doesn't mean everything always
25 matches
Mail list logo