from {% for key in form.errors.keys %}, key is the (k,v) for
form.errors dictionary.
key={{key}} shows what the key contains. In this case, it is something
like "__all__"
According to the dot notation, I should be able to use form.errors.key
to access the array of error messages associated since
you have to use the below code to print messages instead of keys
{% for key,message in form.errors %}
{{ message|striptags }}
{% endfor %}
On Jun 9, 11:21 am, Rama Vadakattu wrote:
> {% for message in form.errors.key %}
> {{message|striptags}}
> {% endfor %}
>
> The abov
well i had this html..
Feedback
Without using base.html, they rendered differently(in terms of
position) in browser.
On Jun 9, 11:26 am, Rama Vadakattu wrote:
> >> the layout has been altered? Why so?
>
> What do you mean by this?
>
> On Jun 9, 11:24 am, vishy wrote:
>
>
>
> > Hi,
>
> > For
>> the layout has been altered? Why so?
What do you mean by this?
On Jun 9, 11:24 am, vishy wrote:
> Hi,
>
> For my project, I decided to use base.html file.After including it in
> a couple of pages, the layout has been altered? Why so? How does
> blockcontent render?
> thks
--~--~-~--~-
Hi,
For my project, I decided to use base.html file.After including it in
a couple of pages, the layout has been altered? Why so? How does
blockcontent render?
thks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
{% for message in form.errors.key %}
{{message|striptags}}
{% endfor %}
The above will print keys instead of values as message is key not a
value.
On Jun 9, 11:06 am, Tom wrote:
> Hi all,
>
> Leveraging the default login view, I want to use my own login.html to
> show all th
Well thats what i was complaining about in the beginning that i could
use good example of how to do it. Its quite confusing how form
validation is on one page, errors on the others and views on third and
there is not single full example.
How should the else part be?
else:
message = "form was
Hi all,
Leveraging the default login view, I want to use my own login.html to
show all the errors in the login form:
{% if form.errors %}
Login Failed. Please try again.
{% for key in form.errors.keys %}
key={{key}},value=
{% for message in form.errors.key %}
{{message|
I ran into this same issue, you will need to recompile python with the
following (somewhat unintuitive option): --enable-unicode=ucs2, and
then recompile psycopg2. I've gotten that far with stackless on my
machine, and runserver, etc. works ok.
On May 30, 3:25 am, Chandrashekar Jayaraman wrote:
Hello,
I have a small issue in terms callable objects inside of contexts. I'm
having trouble figuring out how to have the call evaluated everytime
the context is used/rendered. An example:
some_context = {
'random': random(),
}
def some_view(request):
return render_to_response('some_tem
I have the four models ,
1. Patient has 2.doctors and 3.pills
the 3.Pills have 4.rders
In the aadmin screen the displays are in
Doctors Orders Patients Pills
I would like to be able add a pillto the file and then add all orders
for that pill
On my order screen, how can I display the title from
On Monday 08 June 2009 21:07:57 Necmettin Begiter wrote:
> Your best bet would be using a CMS like Joomla, because, don't get me
> wrong, but if you do not know the difference between a web application
> and a web framework, you better stick to already-mature web
> applications (since you are obvi
Hi group. I need to pull a directory listing and populate a dropbox.
I know how to do this with a queryset but how could i do it with
something like this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users
I go into the admin section of my site, click on Users, then on the
'Add User' button. It takes me to a screen that asks me to put in a
username and password and click 'Save'. At this point I get an error:
ValueError at /admin/auth/user/add/form_url
invalid literal for int() with base 10: 'add/f
On Jun 8, 3:54 pm, Alex Gaynor wrote:
> On Mon, Jun 8, 2009 at 3:42 PM, Don Spaulding wrote:
>
>
>
>
>
> > Hi there,
>
> > While playing around with the aggregation support in trunk, I came up
> > with the need for the following SQL query:
>
> > SELECT
> > DATE_TRUNC('day', datestamp) AS
Im developing a childcare app and I have a problem when I want to
relate an object of a table with a UserProfile field so for example:
user:some_parent
In a view, I want to see only the childs of that parent.
In python manage.py shell:
-Example: Parent case-
user.userprofile_set.create(tipo=
For simple input fields, I'm echoing back the data from database to
form like this:
Your Domain (example: JohnDoe.com)
If I don't put the "if" statement there, I get the value "None"
appearing, which is not desireable from a user's perspective. In this
case "session" is the name of database
Hello,
I'm getting going with the tutorial, it's so exciting to see the admin
panel, but I've got a problem with the breadcrumbs.
So I'm working from this page:
http://docs.djangoproject.com/en/dev/intro/tutorial02/#intro-tutorial02
and when I select my poll to change, it says:
Home › Polls › Poll
For those who have used django-authopenid [1], can you tell me if it
interferes with the built-in django user authentication system (users,
permissions, groups, etc). I am going to attempt to get it running on
a small project, but I won't bother if it interferes with auth.
Thank you in advance f
Template/Form looks like this:
English:
Spanish:
Portuguese:
Database model defines column:
languages = db.StringListProperty() #stores multiple
languages
I stored data into Google/BigTable like this:
session.languages = self.request.get_all('language')
That part wor
On Jun 4, 2:45 pm, Matt wrote:
> It looks like you're right and the login page isn't actually logging
> users in.
>
> Any idea why that might be? I'm using the auth.login view and a
> template that looks like this:
Your template code looks fine.
> Any thoughts on what might be going on here?
I use the admin.ModelAdmin with a list_display to display columns on
the edit list page.
I need another one , looking the same as the current edit list page
but with other columns taken from my model.
Is there a way to override easily the list_display in a new view to do
that ?
Thank you.
--~--~
On 08/06/09 11:37 AM, Necmettin Begiter wrote:
> On Mon, Jun 8, 2009 at 16:39, Olav wrote:
>> I am convinced that Django is a great framework, but I need to know
>> how much of the stuff I might need is available or can easily be
>> integrated?
>>
>> How much is available compared to Drupal, Joomla
On 08/06/09 11:30 AM, Masklinn wrote:
> On 8 Jun 2009, at 15:39 , Olav wrote:
>> I am convinced that Django is a great framework, but I need to know
>> how much of the stuff I might need is available or can easily be
>> integrated?
>>
>> How much is available compared to Drupal, Joomla or DotNetNuk
On Mon, Jun 8, 2009 at 3:19 PM, pingwin wrote:
>
> Hi,
>
> This is frustrating and against a true MVC methodology. I want to have
> something like this for the designer in the template.
>
> {% if user.is_authenticated %}
> {% extends "auth_base.html" %}
> {% else %}
> {% extends "base.html" %}
On Mon, Jun 8, 2009 at 3:57 PM, zayatzz wrote:
>
> Well now this is working just fine:
>
> [snip AccountForm]
>
> But this (code below) still does not return me any error messages from
> form validation.
>
>form = AccountForm(request.POST)
>user = request.user
>
Hi,
This is frustrating and against a true MVC methodology. I want to have
something like this for the designer in the template.
{% if user.is_authenticated %}
{% extends "auth_base.html" %}
{% else %}
{% extends "base.html" %}
{% endif %}
However this obviously fails. I do not think it mak
Thanks Karen - I think I will start doing that from now on.
Thanks everyone else - For now I'm just rolling back a bit before I
started getting the error and go from there. It seems that my project
scope has changed a bit midstream anyway so I guess this really isn't
the end of the world. If I do
On Mon, Jun 8, 2009 at 3:55 PM, Andy Dietler wrote:
>
> Thanks.
>
> How do I overwrite the definition of rating, like this?:
>
> class Rating(models.Model):
>rating = models.IntegerField()
>
>
> class ShowForm_Rate(forms.ModelForm):
>class Meta:
>model = Rating
>rating = f
Thanks.
How do I overwrite the definition of rating, like this?:
class Rating(models.Model):
rating = models.IntegerField()
class ShowForm_Rate(forms.ModelForm):
class Meta:
model = Rating
rating = forms.ChoiceField(widget=forms.RadioSelect
(choices=rating_choices),labe
On Mon, Jun 8, 2009 at 3:42 PM, Don Spaulding wrote:
>
> Hi there,
>
> While playing around with the aggregation support in trunk, I came up
> with the need for the following SQL query:
>
> SELECT
>DATE_TRUNC('day', datestamp) AS rec_day,
>COUNT(id) AS count
> FROM stats_record
> G
I'm trying to get into a better testing flow with Django. One of
things I'm trying to figure out how to test are templates. Using the
Django Test Client works fine, for instance, in detecting whether I
have a missing template tag (because it'll explode) or if I don't pass
a particular variable to
Hi there,
While playing around with the aggregation support in trunk, I came up
with the need for the following SQL query:
SELECT
DATE_TRUNC('day', datestamp) AS rec_day,
COUNT(id) AS count
FROM stats_record
GROUP BY rec_day
How would I construct this same query via the ORM? My
So I am implementing a couple custom admin interfaces for a project i
am working on. I wanted to limit the choices for a few of my models,
so i overrode the ModelAdmin.queryset method and that worked well. But
the one thing i noticed was that any other models (one being Study)
that have relationsh
On Jun 8, 6:12 pm, Bo Zhao wrote:
> sorry all, i find it..in the 1.0 version, the subcommand install is removed.
> but my question is how to automatically import a model without edit the
> INSTALLED_APPS?
>
> On Mon, Jun 8, 2009 at 1:08 PM, Bo Zhao wrote:
> > Hi all,
>
> > a quick and mightbe
On Jun 8, 8:23 pm, Andy Dietler wrote:
> I'm trying to make one of the fields in my model display radio buttons
> with the options 1-5. I can't find a way to do this with a model form
> and I can't get anything I find in documentation to work properly.
>
> What I have below results in me getting
Well now this is working just fine:
class AccountForm(forms.Form):
username = forms.CharField(max_length=100, help_text="Enter Username
of your account", label="Your username")
email = forms.EmailField(max_length=100, help_text="Enter your e-mail
address", label="Your e-mail addre
On 8 Cze, 17:31, grimmus wrote:
> Hi,
>
> I have a simple blog application
>
> I would like to be able to create a post and assign it to multiple
> categories
>
> category = models.ForeignKey(BlogCategory)
ForeignKey allows you to assign post only to one category,
I think you need to use
I'm trying to make one of the fields in my model display radio buttons
with the options 1-5. I can't find a way to do this with a model form
and I can't get anything I find in documentation to work properly.
What I have below results in me getting the following error:
TypeError: __init__() got an
Thanks Alex! Now I know where to start.
On Jun 8, 10:18 am, Alex Gaynor wrote:
> On Mon, Jun 8, 2009 at 12:14 PM, David wrote:
>
> > Hello,
>
> > Following the online tutorial I have created "mysite" project. After I
> > have logined into admin, I can see Auth --- Mysite Sites.
>
> > Now I
I'm getting an error using Django 1.0 when trying to log a new user
in. When I call
login(request)
On a new user I will occassionally (not very often) get an error (the
cache number values will be different):
Permission Denied: /tmp/python.cache_root/8/7/2
Which is an:
OSError in /usr/lib/p
On Mon, Jun 8, 2009 at 12:14 PM, David wrote:
>
> Hello,
>
> Following the online tutorial I have created "mysite" project. After I
> have logined into admin, I can see Auth --- Mysite Sites.
>
> Now I would like to use the same layout/template for my user home page
> as this admin page. I h
Hello,
Following the online tutorial I have created "mysite" project. After I
have logined into admin, I can see Auth --- Mysite Sites.
Now I would like to use the same layout/template for my user home page
as this admin page. I have read django/contrib/admin/sites.py but
could not find whi
sorry all, i find it..in the 1.0 version, the subcommand install is removed.
but my question is how to automatically import a model without edit the
INSTALLED_APPS?
On Mon, Jun 8, 2009 at 1:08 PM, Bo Zhao wrote:
> Hi all,
>
> a quick and mightbe stupid question, I want to use the subcommand in
Hi all,
a quick and mightbe stupid question, I want to use the subcommand install
within manage.py, but it seems not exist. Since I need to automatically
import model but not manually edit the INSTALLED_APPS.
anyone has some idea on this?
best,
Bo
--
Bo, Zhao
GIS Intern, Center for Geographic
Well, I guess a good nights sleep did me well
I discovered my error, the problem was within my loops...
I had to move one of my appends outside the inside for loop...
for a in range_list:
for b in used_number_list:
if str(b) == str(a):
try:
prod
I think i already tried that, Michael, and i got some error that had
something to do with nonetype... since there is no pwd in data, you
cant compare if its equal or not to ''
Alan.
On 8 juuni, 17:24, Michael wrote:
> On Mon, Jun 8, 2009 at 10:09 AM, zayatzz wrote:
>
> > So i change pwd and pw
Nice, thanks for the update, Russell and Alex !
-d
On Jun 5, 10:10 pm, Russell Keith-Magee
wrote:
> On Sat, Jun 6, 2009 at 7:55 AM, Alex Gaynor wrote:
>
> > On Fri, Jun 5, 2009 at 12:03 PM, Darren wrote:
>
> >> That's cool. You don't happen to have an updated estimate of the 1.1
> >> release d
On Mon, Jun 8, 2009 at 5:39 AM, Chris Stoyles wrote:
> Hi Thomas,
>
> The reason I want to be able to rollback (but still commit by log entries)
> is because it is sometimes valid for this particular view to throw an
> exception and fail. If this happens, I need to rollback any model objects
> th
On Mon, Jun 8, 2009 at 16:39, Olav wrote:
>
> I am convinced that Django is a great framework, but I need to know
> how much of the stuff I might need is available or can easily be
> integrated?
>
> How much is available compared to Drupal, Joomla or DotNetNuke for
> example?
It is not even compa
On Mon, Jun 8, 2009 at 3:46 AM, Chris Stoyles wrote:
> The problem is that there is no "number_list" key in your context, there is
> only a "range" and "range_list" key (take a look at where you call
> "render_to_response"). I think what you want to do is actually pass your
> "net" variable into t
Hi,
I have a simple blog application
I would like to be able to create a post and assign it to multiple
categories
Currently my model looks like below. I was thinking i could render the
categories in the admin as checkboxes and then check multiple ones, if
required, but i am not really sure how
On 8 Jun 2009, at 15:39 , Olav wrote:
> I am convinced that Django is a great framework, but I need to know
> how much of the stuff I might need is available or can easily be
> integrated?
>
> How much is available compared to Drupal, Joomla or DotNetNuke for
> example?
Drupal and Joomla are conte
Cool tip!
> You're allowed to do admin.site.register([Model1, Model2, Model3]) to
> register multiple models. Note the creation of the list there, not directly
> calling the method with the objects as argumne.ts
--~--~-~--~~~---~--~~
You received this message bec
On Mon, Jun 8, 2009 at 5:29 AM, phred78 wrote:
>
> I think you need separate admin registers, like so:
>
> admin.site.register (Patient)
> admin.site.register (Doctor)
> admin.site.register (Pills)
> admin.site.register (Orders)
>
> You'd only put two together if you created some special instruct
Chris Stoyles schrieb:
> Hi Thomas,
>
> The reason I want to be able to rollback (but still commit by log entries)
> is because it is sometimes valid for this particular view to throw an
> exception and fail. If this happens, I need to rollback any model objects
> that have been created and sav
On Mon, Jun 8, 2009 at 10:09 AM, zayatzz wrote:
>
> So i change pwd and pwdc to required=False and in clean i do
> if pwd in data (or if ["pwd"] not in data):
>if data.get("pwd") != data.get("pwdc"):
>raise forms.ValidationError("Passwords do not match")
> return data
>
> and i get
So i change pwd and pwdc to required=False and in clean i do
if pwd in data (or if ["pwd"] not in data):
if data.get("pwd") != data.get("pwdc"):
raise forms.ValidationError("Passwords do not match")
return data
and i get errorfree clean function?
Alan
On Jun 8, 4:29 pm, Michael w
I am convinced that Django is a great framework, but I need to know
how much of the stuff I might need is available or can easily be
integrated?
How much is available compared to Drupal, Joomla or DotNetNuke for
example?
If I want to use another framework and have it appear as the same
site, how
On Mon, Jun 8, 2009 at 2:05 AM, zayatzz wrote:
>
> Great :). Thanks...
>
> Wish i had read your post more thoroughly the first time.
>
> This takes care of my second problem, but what about the first one -
> why do password fields need to be filled? Because empty(or nonexisting
> data) fields can
the form is working fine now , actually my form was inside another
form , that was the problem
On May 22, 6:55 pm, watad wrote:
> hi karen , actually im runing this code , after submit i can see all
> the data inside the model ,only the filefield resume is empty , of
> course when i test this i
One more requirement..
4. The application must be self contained i.e contain its own django
installation (which has the quick start web server) and sqlite db
module.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
I need to write a small application and considering django but am
wondering how the model backend copes with the following scenario..
The admin user needs to be able to upload/download new dbs and switch
the current backend database file and run the app portably on
different machines. The concurr
I would have your internal model how you like for the best application
design and then write cron scripts that import into your main db from
the other disparate format databases. Have a field in your internal
model so you know the original source of each entry. Reimport when the
third party DBs du
Thanks for the link. The description sounds like just what I need.
On Fri, 2009-06-05 at 20:46 -0700, Graham Dumpleton wrote:
> Have a look at:
>
> http://www.openfusion.com.au/labs/mod_auth_tkt/
>
> Graham
>
> On Jun 6, 6:26 am, Adam Stein wrote:
> > I'm trying to figure out a way to use
Thanks for responding and for the idea. I'm also migrating, but
security seems to be a bigger deal than getting the rest migrated at the
moment, hence the need to authenticate for the old stuff.
On Fri, 2009-06-05 at 16:43 -0700, BenW wrote:
> I did something similar while migrating an old app t
Solved it, replace get_fieldsets with my custom function, returning:
[(None,
{'fields': [('field1','field2),]})]
On Jun 5, 5:23 pm, Denis Cheremisov
wrote:
> I saw the method using fieldsets, by grouping several fields in a
> tuple. But this method didn't suit my needs, because I use slig
I think you need separate admin registers, like so:
admin.site.register (Patient)
admin.site.register (Doctor)
admin.site.register (Pills)
admin.site.register (Orders)
You'd only put two together if you created some special instructions
for the admin. Then you'd have something like:
admin.site.
On Mon, Jun 8, 2009 at 1:45 PM, jayvandal wrote:
>
> I have four tables
> 1 Patient
> 2 has many doctors
> 3 doctor issues pills
> 4 order many pills
> when I run syncdb I get the 3 levels showing in adminstrative screen.
> I can't get it to show the order scre
Hi all ,
I am trying to develop a web app that searches products on some
local stores and give the price.Now I can obviously have a format for stores
to feed my database but rather than that .What I want is that the local
stores be able to dump their database/feeds on my Server . It woul
Hi Mitch,
I haven't read through your example in detail, but just glancing over it I
think that I can see the mistake you're making
The problem is that there is no "number_list" key in your context, there is
only a "range" and "range_list" key (take a look at where you call
"render_to_response").
Hello everyone,
Besides django-mailer, has anyone had experience on how to queue e-
mail? I'm writing an application that sends newsletters to roughly
around 3000 subscribers and I don't want the hosting company -
mediatemple - complaining about reaching their 500 e-mail per hour
limit. Are there
Hi Thomas,
The reason I want to be able to rollback (but still commit by log entries)
is because it is sometimes valid for this particular view to throw an
exception and fail. If this happens, I need to rollback any model objects
that have been created and saved up to the point at which the view f
Thanks to a comment on my blog: the below is null and void: the
request object can be retrieved directly from context: context
['request'].
On Jun 2, 2:55 pm, BluMarble wrote:
> On Jun 1, 7:53 pm, "bax...@gretschpages.com"
> wrote:
>
> > I'm trying to write a template tag that accesses the us
if I'm not mistaken then the default ordering is used, that is given
by your model's Meta class [1]
otherwise, if you need a special ordering you might want to define
your own model manager with a method that does just what you want, and
call that method for the queryset
[1]: http://docs.djangopr
you can run ./manage.py test yourapp with --settings=mysetting
so, I would recommend to create a settings file with the given setting
left out
V
On Jun 7, 1:51 pm, Julien Phalip wrote:
> Hi,
>
> In a unit test, I'd like to test the behaviour of a middleware in the
> absence of a setting. To ma
Hi Chris,
please explain in more depth what you want to do. If you
do rollback, all changes won't be written to the database. Even
all savepoints won't be stored.
Why do you want to rollback? If you want your changes
to get saved, you need to call transaction.commit() at the end.
ChrisStoyles s
77 matches
Mail list logo