dear Law,
The admin css worked nicely. But my work is not fullfilled yet.
Actually i have a Model Candidate.
class Candidate(models.Model):
site=models.ForeignKey(Site)
first_name=models.CharField('First Name',max_length=30)
last_name=models.CharField('Last Name',max_leng
Awesome! This is INCREDIBLY helpful.
In terms of using it (I'm not too familiar with server stuff), I have
a few questions (which have to do with Apache, not lighttpd, so you
might not know). Basically, once I create that handler file and view,
how do I use them? Do I modify the .fcgi file (from
No. Look at the css of the admin that says fieldsets and put your
fields in the tags to let the css definitions
take effect.
On Wed, Nov 5, 2008 at 1:37 PM, limas <[EMAIL PROTECTED]> wrote:
>
>
>
>
>> I have done something similar and I generated my form automatically
>> using 'forms.as_p' then
> I have done something similar and I generated my form automatically
> using 'forms.as_p' then I put in some sections of the css from admin
> interface's css and it works. The section you want to look at is the
> fieldset section.
hello Low,
I can't understand what you mentioned clearly. Is
I have done something similar and I generated my form automatically
using 'forms.as_p' then I put in some sections of the css from admin
interface's css and it works. The section you want to look at is the
fieldset section.
Thanks.
On Tue, Nov 4, 2008 at 8:21 PM, limas <[EMAIL PROTECTED]> wrote:
Dear all,
I am using django to write an a web based sales inventory system for
my client. To this end, I have created two objects in my models which
is :
Sales and Stock. Everytime a sales is associated with a particular
stock is created, I want to update the Stock object's status field as
'Sold
Sure thought I had. Dumb mistake, thanks!
--~--~-~--~~~---~--~~
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 e
On Tue, Nov 4, 2008 at 3:00 PM, joshuajenkins <[EMAIL PROTECTED]> wrote:
>
> I'm running into an issue when just starting with Django 1.0 where the
> following exception is caught:
> Caught an exception while rendering: no such table: django_admin_log
>
> I've done some searching and it appears th
I'm running into an issue when just starting with Django 1.0 where the
following exception is caught:
Caught an exception while rendering: no such table: django_admin_log
I've done some searching and it appears that this is common if you're
not running Django 1.0, but 0.96 or lower.
I've verifie
i have a model for status reports:http://dpaste.com/88760/
The report has 1-N bullet Points, each bullet Point has a category.
What I want to figure out, whats my best way to display this in a
template, given that the category list is flexible. I mean, a report
might have 1 or more categories.
Thanks for the info.
Turns out that I was looking at the wrong bit of code (gr), and
wasted 2hrs of my day.
John
On Nov 4, 2:36 pm, "Matías Costa" <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 4, 2008 at 8:37 PM, John M <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to figure out how I can use more
On Tue, Nov 4, 2008 at 8:37 PM, John M <[EMAIL PROTECTED]> wrote:
>
> I'm trying to figure out how I can use more than one model with a call
> to object_list generic view.
>
http://www.djangosnippets.org/snippets/1103/
--~--~-~--~~~---~--~~
You received this messa
On Tue, Nov 4, 2008 at 9:58 PM, Antonio Volpon <[EMAIL PROTECTED]>wrote:
>
> Hello.
>
> I am very new to Django and I'm having some problems in overriding the
> save method for a simple class. In particular, the following code
> (models.py) used against a Mysql database doesn't change the value of
On Tue, 4 Nov 2008 13:12:46 -0800 (PST), bizcuit wrote:
>
> I have been using Django with Python 2.5 the past few months.
>
> Today I removed Python 2.5 installed Python 2.6 and downloaded
> Django.
>
> when I try to create a project from the command line in Windows
> Vista:
>
> django-admin.py st
Thanks both.
Horrible typo. I noticed, however, that the time update isn't the
current one. Have to look at some locale?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
Instead of manually setting the update time and created date, as it
seems like you mean to do here, I highly recommend auto_now and now
auto_now_add attributes that you can add to your date fields, to get
this functionality for free. See
http://docs.djangoproject.com/en/dev/ref/models/fiel
On Tue, Nov 4, 2008 at 4:12 PM, bizcuit <[EMAIL PROTECTED]> wrote:
>
> I have been using Django with Python 2.5 the past few months.
>
> Today I removed Python 2.5 installed Python 2.6 and downloaded Django.
>
> when I try to create a project from the command line in Windows Vista:
>
> django-admi
Ciao Antonio,
On Nov 4, 2008, at 8:58 PM, Antonio Volpon wrote:
> import datetime
> from django.db import models
>
> class Object(models.Model):
>description = models.CharField(max_length=255)
>insert_date = models.DateTimeField(editable=False)
>update_date = models.DateTimeField(edit
Alex, thanks a lot for the suggestion, but it doesn't work.
Antonio
--~--~-~--~~~---~--~~
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 unsubsc
I have been using Django with Python 2.5 the past few months.
Today I removed Python 2.5 installed Python 2.6 and downloaded Django.
when I try to create a project from the command line in Windows Vista:
django-admin.py startproject myProject
I get "Type 'django-admin.py help' for usage." retu
On Nov 4, 2008, at 1:00 PM, Karen Tracey wrote:
> [...snip...]
> The order of things during validation is specified clearly in the
> docs:
>
> http://docs.djangoproject.com/en/dev/ref/forms/validation/
This was useful, thanks.
>
>
> This page has a subsection on cleaning fields that depend on
Hi, Antonio.
Try to replace `datetime.date.today()` with `datetime.datetime.now()` calls.
On Tue, Nov 4, 2008 at 23:58, Antonio Volpon <[EMAIL PROTECTED]>wrote:
>
> Hello.
>
> I am very new to Django and I'm having some problems in overriding the
> save method for a simple class. In particular,
Thanks but I'd already tried it. I don't understand why in the
production server is not added the preceeding slash to the url. My
urls.py is as follows:
urlpatterns = patterns('candidateTool.assessmentSystem.views',
(r'^$', 'index'),
(r'^enter/$', 'enter'),
(r'^main/$', 'main'),
(r
Hello.
I am very new to Django and I'm having some problems in overriding the
save method for a simple class. In particular, the following code
(models.py) used against a Mysql database doesn't change the value of
the two date fields when i save the page in admin, while it correctly
changes the v
On Tue, Nov 4, 2008 at 2:06 PM, Rick Kitts <[EMAIL PROTECTED]> wrote:
> Well, I think it's clear what I see. I sort of disagree about the impl,
> design, call it what you will.
>
It wasn't clear to me what you had seen nor what you wanted to argue about
though you have clarified that some in this
I'm trying to figure out how I can use more than one model with a call
to object_list generic view.
currently I have this..
objectlist_dict = {'queryset' : Report.reports.all(),
'extra_context' : {'category_list' :
Category.objects.all() },
Actually, extra by itself does exactly what I want. For some reason I
couldn't see it - I guess I just got caught up in the specific name.
Thanks.
On Nov 4, 10:32 am, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Nov 4, 5:57 pm, Xiong Chiamiov <[EMAIL PROTECTED]> wrote:
>
> > I'm in the process
Well, I think it's clear what I see. I sort of disagree about the
impl, design, call it what you will.
Specifically, the current impl makes testing harder than it needs to
be, or at least the testing that I'd like to do. That is, I have a
field, that field has validation rules and I'd like t
So, I added this to the urlpatterns var:
(r'^$', 'mysite.polls.views.current_datetime'),
...and this to views.py located in the polls directory
from django.http import HttpResponse
import datetime
def current_datetime(request):
now = datetime.datetime.now()
html = "It is now %s." % now
hello, sorry i'm newb so that's y i need your help.
i made a model... and thanks django, it's very simple... but my
problem
is that i want 1 specific field from this model to be split in 3
choiceFields.
ah, in the database's table the same field is stored as varchar (i''m
working with mysql).
i t
The point of decoupling the apps is so that you can share them with
others without having to give them all of your site, and it make it
ALOT easier to maintain since if you want to make changes to the way
the menu works you dont have to read though hundred of lines of code
dealing with the rest of
Here's the changelist:
http://docs.djangoproject.com/en/dev/releases/1.0/
On Nov 4, 7:04 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Where can I find the "What's new" in detail in django's doc 1.0?
--~--~-~--~~~---~--~~
You received this message because y
On Nov 4, 5:57 pm, Xiong Chiamiov <[EMAIL PROTECTED]> wrote:
> I'm in the process of converting a bunch of sites from pre-nfa to
> 1.0. One of the things I've run across is the change in inlines in
> the admin interface. Previously, there was
> (http://www.djangoproject.com/documentation/0.96/m
On Tue, Nov 4, 2008 at 12:07 PM, Rick <[EMAIL PROTECTED]> wrote:
>
> Give a man a fish...
>
> Right, so I see now what's going on. Is this the right place to argue
> about how this works?
>
It isn't clear what you see or what you want to argue about?
cleaned_data is established when the form is
On Tue, Nov 4, 2008 at 11:39 AM, Gabriel Rossetti <
[EMAIL PROTECTED]> wrote:
>
> Gabriel Rossetti wrote:
> > Hello everyone,
> >
> > I'm trying to get a custom auth handler to work but I keep on getting
> > this error when accessing request.user.get_profile() :
> >
> > DoesNotExist: User matching
If it works in one environment, but not another, then it might have
something to do with your settings files. When you create your links,
are you having the href be "/enter" or "/enter/"? I think the
middleware class you're reading about is for trailing slashes, not
preceeding ones.
On Nov 4, 9
Hi all,
I'm having a weird problem when using inlineformset_factory, he can
only register up to 2 records, after that causes a validation error
"(Hidden field id) User phone with this None already exists."
Here is my forms [1], models [2] and views [3]
[1] http://dpaste.com/88598/
[2] http://d
I'm in the process of converting a bunch of sites from pre-nfa to
1.0. One of the things I've run across is the change in inlines in
the admin interface. Previously, there was (http://
www.djangoproject.com/documentation/0.96/model-api/#many-to-one-relationships)
a parameter called num_in_admin
Hi Brian,
Thanks for your comment. I completely understand what you are saying,
and anyone trying to match the "?" character should take note, but in
this situation I am using it to try to tell Django that that named
group in the regular expression may, or may not, be included.
RM
On Nov 4, 5:3
I have to admit, the missing ) is a typo. I made up the ice cream
example to try to simplify my problem, and accidentally missed it off.
Perhaps my example is too simple.
> I have a small form on a page that is mostly optional fields with the
> exception of some drop down boxes.
My actual form h
Hello everybody!
I'm using django 1.0-1 version and Apache as a server web. In the dev
server everything works fine but in the production server I get the
following error when I ask for a url:
NoneType' object is not iterable
Request Method: POST
Request URL:http://localhostenter/
Ex
On Nov 4, 10:50 am, redmonkey <[EMAIL PROTECTED]> wrote:
>
> My problem is with the URL writing. I first wrote some unit tests to
> find the regular expressions that worked but Django doesn't seem to
> like the '?' in URL configurations.
? is a special character in regular expressions, just like
redmonkey wrote:
> Hi,
>
> I have a small form on a page that is mostly optional fields with the
> exception of some drop down boxes. I want to take the data submitted
> through this form and use them to form a URL.
>
> My problem is with the URL writing. I first wrote some unit tests to
> find
>
> Here, I collect the parameters from the form and try to turn them into
> a pretty URL that redirects to the filter view to do something with
> the data. It's the URL writing I'm having problems with. I want to
> write things like:
Why not do it in the process view immediatly?
> urlpatterns
Give a man a fish...
Right, so I see now what's going on. Is this the right place to argue
about how this works?
---Rick
On Nov 4, 8:46 am, Rick Kitts <[EMAIL PROTECTED]> wrote:
> Thanks, it does but this is a bad test methodology. is_valid()
> verifies the entire form and there is no way of
Hi,
I have a small form on a page that is mostly optional fields with the
exception of some drop down boxes. I want to take the data submitted
through this form and use them to form a URL.
My problem is with the URL writing. I first wrote some unit tests to
find the regular expressions that work
Thanks, it does but this is a bad test methodology. is_valid()
verifies the entire form and there is no way of knowing in the test if
the validation is failing because of other reasons or the specific one
I (think) I'm testing.
I guess the broader question then is when is cleaned_data estab
Gabriel Rossetti wrote:
> Hello everyone,
>
> I'm trying to get a custom auth handler to work but I keep on getting
> this error when accessing request.user.get_profile() :
>
> DoesNotExist: User matching query does not exist.
>
> I followed the following tutorials :
>
> http://garage.pimentech.n
On 04.11.2008 17:19 Uhr, webcomm wrote:
> How do I get the instance id from within an admin template? I want to
> add a link to view the instance, and I need the id to create that
> link. Like so...
>
> View this item
>
>
if your Model supplies a get_absolute_url method, then the Admin will
How do I get the instance id from within an admin template? I want to
add a link to view the instance, and I need the id to create that
link. Like so...
View this item
Thanks,
Ryan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Nov 4, 2:33 am, Chris Amico <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I'm trying to turn one uploaded image into several: a full-size and
> thumbnail (and more, eventually). Here's the model I'm playing with,
> just for testing:
>
> class TestPhoto(models.Model):
> "This is only for test
> 26. username=self.clean_data['username']
clean_data was renamed to cleaned_data. See
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Newforms:clean_datachangedtocleaned_data
Regards,
Daniel Hepper
--~--~-~--~~~---~--~~
You received thi
Environment:
Request Method: POSTRequest URL: http://127.0.0.1:8080/register/Django
Version: 1.0-final-SVN-unknownPython Version: 2.5.2Installed
Applications:['django.contrib.auth', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sites',
'django_bookmarks.bookmarks']Insta
I had cleared the cookies, I also tried in another browser as well -
same result.
On Nov 3, 10:50 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Nov 4, 5:08 pm, Dave Dash <[EMAIL PROTECTED]> wrote:
>
> > I am witnessing this issue using manage.py runserver.
>
> > The only useful informatio
On Tue, Nov 4, 2008 at 10:19 AM, 为爱而生 <[EMAIL PROTECTED]> wrote:
> Environment:
> [snipped]
>
> File "C:\Python25\Lib\site-packages\django\forms\forms.py" in full_clean
> 227. value = getattr(self, 'clean_%s' % name)()
> File "D:\django\django_bookmarks\bookmarks\forms.py" in clean_username
> 26. u
Where can I find the "What's new" in detail in django's doc 1.0?
--~--~-~--~~~---~--~~
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
I was just asking myself a similar question. I want to know the total
result count of a query but only return a subset of the query.
Articles.objects.filter(somefield__contains='some
query')[start:start+num_rows]
I understand the slice creates a LIMIT in the database query. But I
also need the
On 4 nov, 03:02, "DULMANDAKH Sukhbaatar" <[EMAIL PROTECTED]> wrote:
> > Hello folks, I have aready used python only in desktop. About 1 a week
> > ago I installed the Django 1.0 on Fedora 9. I wonder about the
> > djangobook, its version is 0.96 or 1.0?
>
> book's version is 1.0, but written for
On Mon, Nov 3, 2008 at 7:01 PM, pk <[EMAIL PROTECTED]> wrote:
> James is right that for any of my own app, I can just tell the user
> to put in some settings in the project level settings.py file. In fact
> that is exactly what I do now.
And that is what quite a number of popular third-party Djan
On Monday, 03 November 2008 10:50:34 Bülent Aldemir wrote:
> I want to have a nice representation for the other MyModel() fields. Must I
> define for each field a method to accomplish my task?
Seems the best way. There's only one 'repr' for any object and if you want
specific ones then either mak
> Running the test causes a splash of barf that says:
>
> AttributeError: 'TheFormClass' object has no attribute 'cleaned_data'
>
Try calling form.is_valid() (which should in addition return whether
the validation framework as a whole thought the form was valid). This
should invoke your clean
Hi,
Maybe some LANG entries in os.environ are different.
Or the datetime module is loaded from a different location.
is datetime.__file__ equal?
HTH,
Thomas
mpobrien schrieb:
> I'm working on something that involves parsing out a date from a
> string, so i'm using the datetime.strptime()
On Tue, Nov 4, 2008 at 7:36 AM, nazar <[EMAIL PROTECTED]> wrote:
>
> Now I got it!!!
>
> I had TEMPLATE_STRING_IF_INVALID = 'TEMPLATE_STRING_IF_INVALID'
>
> So that 'items' was rendered as 'TEMPLATE_STRING_IF_INVALID' (and I
> saw it clearly). And I met the bug, bacause gettext was unable to use
>
Now I got it!!!
I had TEMPLATE_STRING_IF_INVALID = 'TEMPLATE_STRING_IF_INVALID'
So that 'items' was rendered as 'TEMPLATE_STRING_IF_INVALID' (and I
saw it clearly). And I met the bug, bacause gettext was unable to use
it as int parameter.
Now I cleared this: TEMPLATE_STRING_IF_INVALID = '' and
On Tue, Nov 4, 2008 at 3:24 AM, chris <[EMAIL PROTECTED]> wrote:
>
> Dear Fabio,
>
> That did the trick! I have searched all over the manuals, but must
> have overlooked this. It is a bit confusing that this seems to be
> different from is_safe and mark_safe, but for the moment I am happy
> that
I must have read that section ten times, but not seen the wood for the
trees in my haste to find the right approach. It's making more sense
to me now.
Thanks again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
hello Thomas,
i tried with ModelAdmin, but it is not working properly in my own
views.
i got this error "__init__() got an unexpected keyword argument
'instance'"
hop u understand what my problem is.
Actually i want to customize my page with a look and feel of django
admin page. Some modification
On Nov 4, 9:50 am, Tonne <[EMAIL PROTECTED]> wrote:
> Daniel, thank you (x100)! That was exactly what I was looking for.
>
> > {% for entry in entries %}
> > {{ entry.title }}
> > {% for image in entry.image_set.all %}
> >
> > {% endfor %}
> > {% endfor %}
>
> Now, could I ask what th
Hi Guys
Got Surftrackr up and running on Apache using Django and all the
necessary packages needed as describe in the How-To-Install manual.
I'm getting this error when wanting to graph the user statistics:
AssertionError at /graphs/group/1/bytes/pie3d/ Request Method: GET
Request URL: http://1
On Tue, Nov 4, 2008 at 9:59 AM, Håkan Waara <[EMAIL PROTECTED]> wrote:
>
> I would love any ideas or feedback around this area, and to hear of
> how others in the community do it.
>
> /Håkan
I would just use two Forms.
Forms:
class EditUserForm(forms.ModelForm):
class Meta:
Hello all,
A situation that I'm encountering all the more often is something like
this: You create a form that has some fields that belong to one model,
and some fields from another model. Because it's a mix, you can't make
it as easy as a ModelForm. I love ModelForms. :-)
One common examp
Daniel, thank you (x100)! That was exactly what I was looking for.
> {% for entry in entries %}
> {{ entry.title }}
> {% for image in entry.image_set.all %}
>
> {% endfor %}
> {% endfor %}
Now, could I ask what the name of the concept is that allows
"image_set" to spontaneously exis
Thank you for all your elaborated answers
However I still don't see the point to have decouped apps in my
project. Web page mainly is a program for serving some text or media
or for saving some user data under the hood. Having an app for
particular business logic AND another pool of views, tags a
On Nov 4, 7:45 am, Tonne <[EMAIL PROTECTED]> wrote:
> I think I may be barking up the wrong tree, and if so please excuse
> the above. I now suspect that I should be associating the images with
> their relevant entries with template tags.
You don't even need to do that. Assuming you have a querys
Hi folks,
I'm trying to turn one uploaded image into several: a full-size and
thumbnail (and more, eventually). Here's the model I'm playing with,
just for testing:
class TestPhoto(models.Model):
"This is only for testing. Delete it later and make a real photo
model"
title = models.CharF
Dear Fabio,
That did the trick! I have searched all over the manuals, but must
have overlooked this. It is a bit confusing that this seems to be
different from is_safe and mark_safe, but for the moment I am happy
that its working now. Thanks a lot for pointing it out!
Chris
On Nov 4, 4:06 pm
76 matches
Mail list logo