On Feb 8, 2008 1:06 AM, Julien <[EMAIL PROTECTED]> wrote:
> Doesn't anybody really have an idea how to do this? :)
Yes: sit down and take a look at how the admin templates display the
list, then think about how you'd change it to produce a
element with individual elements for each value. In al
I have this question as well but from what I've seen the only
customizing available is to use strftime formatting.
josh
On Feb 6, 2008, at 11:16 AM, shabda wrote:
>
> I have a model like
>
> class ProjectFile(models.Model):
>project = models.ForeignKey(Project)
>file = models.FileField
Hello again,
Doesn't anybody really have an idea how to do this? :)
On Feb 1, 8:55 pm, Julien <[EMAIL PROTECTED]> wrote:
> Hello there,
>
> The list_filter meta attribute lets you add filters in the admin
> interface. It's great, but the problem is that the field I'm filtering
> (a ForeignKey)
Thanks
On Feb 7, 6:52 pm, Reed Bailey <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-02-07 at 02:36 -0800, django wrote:
> > hi,
> > I wanted to know how can I change the add user interface for admin
> > site.
>
> I suggest you begin here at this
> link:http://www.djangobook.com/en/1.0/chapter06/#s-c
I found the answer,
By the time super.__init__ completes, it creates the default widget
for that field. If you want to sepcify a different default widget, do
class DojoCharField(forms.CharField):
def __init__(self, *args, **kwargs):
if not kwargs.has_key('widget'):
kwargs
The join table is created by django when you do a syncdb, however if
the table with the M2M relation in it is already present (as in your
case) the join table will not be created. This appears to me to be
your problem. If you want it to be a m2m relation, you can create
the join table yo
Yes, I specified db_table in Meta because I created the database
beforehand. I believe the problem was caused by using
ManyToManyFields. I switched it to ForeignKey fields and now I don't
receive the error. But maybe I should ask you a question about which I
should be using:
(Table1)--(Table2
On Feb 7, 3:06 pm, [EMAIL PROTECTED] wrote:
> Can you please give an example of what the list_filter be
> in the model, to get the filterting to work?
Is it just not showing up after the existing list_filter options?
Assuming your current list_filter looks like:
list_filter = ('affiliation', 'pu
If I have:
class Task(models.Model):
subtasks = models.ManyToManyField('Task', null=True, blank=True,
related_name='part_of', symmetrical=False)
how can I check for instances of Task where subtasks or part_of sets
are empty? E.g something like (syntactically incorrect):
tasks = Task.object
Thanks for the tip--APN.zip was a ForeignKey with null=True. The SQL queries
helped me verify. Appreciate it!
-Original Message-
From: django-users@googlegroups.com
[mailto:[EMAIL PROTECTED] Behalf Of Rajesh Dhawan
Sent: Wednesday, February 06, 2008 1:56 PM
To: Django users
Subject: Re:
On Feb 7, 2008 7:48 PM, SeanFromIT <[EMAIL PROTECTED]> wrote:
>
> I'm trying a very simple filter.
>
> views.py:
> from django.shortcuts import render_to_response
> from project.app.models import Table_Name
> def browse(request, Field_Name):
>result = Table_Name.objects.filter(Field_Name=Field
I'm trying a very simple filter.
views.py:
from django.shortcuts import render_to_response
from project.app.models import Table_Name
def browse(request, Field_Name):
result = Table_Name.objects.filter(Field_Name=Field_Name)
return render_to_response('template/file.html', {'result':
result
On Feb 8, 2008 5:11 AM, bobhaugen <[EMAIL PROTECTED]> wrote:
>
> To summarize, it is possible (altho I don't know how well-recommended)
> to dumpdata, change models, delete and recreate the database using
> syncdb, and then loaddata, without touching SQL.
This approach is database intensive if yo
> I was wondering if anyone had any experience with creating a search
> box in Django that would make suggestions (such as a drop down right
> below the search box) about what they may be looking for. For example
> if a database was being searched, it could recommend the names of
> database entri
The best I've been able to come up with is:
qs1 = Blog.objects.all()
qs2 = qs1.filter(entry__blog__isnull=False)
qs3 = filter(lambda x: x not in qs2, qs1)
Surely there is a better method.
On Feb 7, 1:02 pm, grahamu <[EMAIL PROTECTED]> wrote:
> Using the conventional Blog and Entry models from
I was wondering if anyone had any experience with creating a search
box in Django that would make suggestions (such as a drop down right
below the search box) about what they may be looking for. For example
if a database was being searched, it could recommend the names of
database entries. If an
Hi whiteinge,
I downloaded the example you have posted on djangosnippets and
put it in the "suggested" place. However, I could not get it to work.
(I am very novice regarding jQuery).
Can you please give an example of what the list_filter be
in the model, to get the filterting to work?
Thanks,
I run the www.pyweek.org site and recently upgraded to the latest
release of Django (0.96.1)
I'm running under Apache + mod_python. Configuration appended to this
email.
I've observed a bunch of transient errors (perhaps 1% of page views)
that take the form:
ViewDoesNotExist: Tried diary_displa
On Feb 7, 3:55 am, Ned Batchelder <[EMAIL PROTECTED]> wrote:
> The nth tag doesn't exist yet, but does it look like what you are asking
> for?
Yes, this would be a pretty good solution to the problem.
Thank you everyone for your help.
--~--~-~--~~~---~--~~
You rec
On 2/7/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> User.objects.filter(first_name__sounds_like="John")
>
> which would produce and SQL statement like:
>
> WHERE DIFF(SOUNDEX(first_name), SOUNDEX("John")) >= 3
>
> Any plans for it?
As a built-in, probably not -- it is indeed somewhat db-spe
Thanks for pointing out isnull()!
I did try with None and 'None'... For part_of=None, both .filter()
and .exclude() return empty sets, which could signal to a newbie that
somethings wrong with the approach.
For 'None', .exclude(part_of='None') returns the correct subset (!),
whereas .filter(p
I ran into the same problem. I also wanted to add for any other users
out there that Django caches the value of the current site so if you
make a change you'll need to restart your server/python instance.
On Jan 7, 10:33 am, RevMatt <[EMAIL PROTECTED]> wrote:
> Figured it out myself. In my djan
I use windows to develop and linux in production , in a year of work ,
only missed a signal that exists
in linux but not in windows , for IDE I use Pyscripter (
http://www.mmm-experts.com/) a very nice
tool with a small foot print , use apache as my local web server and
production server .
Prob
On Feb 7, 11:37 pm, Tony Winslow <[EMAIL PROTECTED]> wrote:
> Kenneth Gonsalves wrote:
> > On 06-Feb-08, at 7:41 PM, Tony Winslow wrote:
>
> >> I installed mod_python and do the configurations as the tutorial on
> >> the
> >> official site. But mod_python still can not find the mysite.settings
Ok, I figured out the problems:
1. I turned on the verbose option to get some error messages: python
manage.py loaddata mytest1.json --verbosity=2
2. I had my fixtures directory under my project, and not the app.
When I moved it to be under the app, loaddata found it.
3. When I did dumpdata, i
On Feb 7, 2:53 am, Pigletto <[EMAIL PROTECTED]> wrote:
> On 7 Lut, 09:58, Mackenzie Kearl <[EMAIL PROTECTED]>
> wrote:> I am having trouble finding documentation on how to add custom
> > validation to a custom model field.
>
> > example:
>
> > class PostalField(models.CharField):
> > def _
Using the conventional Blog and Entry models from the Django database
API docs:
class Blog(models.Model):
name = models.CharField(max_length=100)
...
class Entry(models.Model):
blog = models.ForeignKey(Blog)
headline = models.CharField(max_length=255)
Thanks Nathaniel, that seems like it will work.
On Feb 7, 8:57 am, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> On Feb 7, 2:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > I know I can't do what I am trying to do in the Media class, but how
> > can I do this? How can I name that
> subtasks = tasks.exclude(part_of__exact='None')
> returns the correct subset, with the "top" tasks omitted. Why?
'None' is a string, so if anything, you'd have to use: part_of__exact=None
However, what you're looking for is probably:
subtasks = Task.objects.filter(part_of__isnull=True)
Mic
Will we be able to use both ends of the relationship in filter() calls
and such, or only the end that declares the relationship?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
I want to subclass CharField so that, its has a widget, and I do not
always need to set it. So I do
class DojoCharField(forms.CharField):
def __init__(self, *args, **kwargs):
super(DojoCharField, self).__init__(*args, **kwargs)
if self.widget == None:
self.widget =
Hi,
I use to develop on all these platform. I'm somehow surprise that you
find font rendering superb in windows, I'm always annoyed at how ugly
they look in general compared to their Mac and Linux (new Distro)
counterpart.
I switch sometime from Linux to OS X for my development needs. I use
wind
I'm doing the vmware situation for my local machine (Mac OS X).
I built a vmware image for my dev environment to mirror my production
environment (apache / mod_python backend with nginx serving the static
content). The only difference between the two machines is that the
dev machine is running n
See schema migration tools for django:
http://code.djangoproject.com/wiki/SchemaEvolution
On 7 фев, 20:40, bobhaugen <[EMAIL PROTECTED]> wrote:
> I am trying to evolve a Django project in piecemeal-growth fashion.
>
> I was happy to learn that I cd easily add tables to an existing model
> using s
On Feb 7, 2008 12:15 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> If he's trying to get the logged in user instance in, say, his models
> save() *and* he needs this to work from the Admin interface, he
> doesn't have request.user available.
That's what newforms-admin is for.
--
"Bureaucrat C
Hi James,
On Feb 7, 1:09 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Feb 7, 2008 11:44 AM, Henhiskan <[EMAIL PROTECTED]> wrote:
>
> > > See:http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
>
> > Thanks a lot, is exactly that I was looking for
>
> This is a really bad idea; i
On Feb 7, 2008 11:44 AM, Henhiskan <[EMAIL PROTECTED]> wrote:
> > See:http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
>
> Thanks a lot, is exactly that I was looking for
This is a really bad idea; in almost 100% of cases, it's better to be
writing something in your view which reads
I know it may be database specific, but having a Soundex ... eh...
"clause" for searching would be a really great idea.
such as:
User.objects.filter(first_name__sounds_like="John")
which would produce and SQL statement like:
WHERE DIFF(SOUNDEX(first_name), SOUNDEX("John")) >= 3
Any plans for
On 7 feb, 12:22, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> See:http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser
Thanks a lot, is exactly that I was looking for
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
I am trying to evolve a Django project in piecemeal-growth fashion.
I was happy to learn that I cd easily add tables to an existing model
using syncdb, but now I want to add a field.
I read Django Fett's post about how to do it in this group, but I
cheated a little (see below excerpt). He wrote
[EMAIL PROTECTED] написав(ла):
> > I have a Sale model that foreign keys into an APN model, which
> > foreign keys into a Zip model. I'd like to sort my Sale objects by
> > the 'zip' field on the Zip model, but
> >
> > Sale.objects.select_related().order_by('sales_zip.zip')
> >
> > doesn't work (1
I'm trying to make a change to my templates here..
/django_trunk/mysite/templates/admin/base_site.html
But the templates being used are sitting here..
/django_trunk/django/contrib/admin/templates/admin/base_site.html
How do I get my site sitting at http://127.0.0.1:8000/admin/ to use my
applic
Why does hitting TAB (nervous emacs autoindent twitch) complete a post
being edited??? Anyhow, here's the full question
This could be elementary... In a model:
class Task(models.Model):
...
part_of = models.ForeignKey('Task', null=True, blank=True,
related_name='subtasks')
...
I am
This could be elementary... In a model:
class Task(models.Model):
--~--~-~--~~~---~--~~
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 unsubscr
On Feb 7, 2:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I know I can't do what I am trying to do in the Media class, but how
> can I do this? How can I name that folder from the media_type
> fieldname?
You have to override the _save_FIELD_file method in your model. Marty
Alchin has a
Thank-you, Thank-you Curtis !! That is exactly the problem. I had
put these urls in urls.py and referenced view functions that have not
been implemented yet. It had not caused a problem up until now, and I
never thought to check the 'viewer' error message clue with my
defined, but unimplemented
On Feb 7, 2008 1:19 AM, slartiblartfast <[EMAIL PROTECTED]> wrote:
>
> hey guys - im about to formally launch a new site done with django
> called TSA Complaints (http://www.tsacomplaints.com)
>
> the site is a response to the hundreds of comments taking the TSA to
> task for their well-deserved r
Another alternative is a virtual server via vmware running a small
barebones/server install of your favorite distro. There are a number
of pre-built vmware images online, and vmware player is free now. It
worked out really well for me.
--~--~-~--~~~---~--~~
You re
Aleandro wrote:
> In fact, running on the development computer the same exact software
> environment present on the production server is the strongest pro-
> Linux argument, especially if you have a VPS and not a shared server.
> To be honest, I think neither with Windows or Mac OS X you can obtai
Hi Jacob,
>
> Under Sqlite tests run in an in-memory database, so this is perfectly
> normal. Like you, I see about a 10x speedup running tests against
> Sqlite.
>
Not surprisingly the tests slowed down once I added the
TEST_DATABASE_NAME parameter to settings. It made debugging easier
though.
>
> The idea is save on the ModelChangelog the name of the user that did a
> change on Region class.
> I try with User() but this is an object without intance. The object
> that I need is exactly like a request.user that is used in view.py
> when some user make a request.
> Any idea how can do tha
I'm slaying the configuration bugs, slowly but surely, with your help.
The latest one is a TemplateDoesNotExist error. This is what the stack
shows:
...
File "C:\progra~1\Python25\lib\site-packages\django\template
\loader.py", line 79, in get_template
source, origin = find_template_source(
Yes -- that does resolve the problem -- adding the directory
containing mysite to the PYTHONPATH. Wonderful, Jarek.
On Feb 7, 4:38 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Schmoopie napisał(a):
>
> > DJANGO_SETTINGS_MODULE issues are driving me crazy. So any assistance
> > appreciated.
>
> >
Hi fellows,
I have running django 0.96 and I try to get the name of the current
user (logged in admin interface) to use in the models.py.
The model is like:
class Region(models.Model):
name = models.CharField(maxlength=60)
def save(self):
changelog =
ModelChangelog(username=User().use
Schmoopie napisał(a):
> DJANGO_SETTINGS_MODULE issues are driving me crazy. So any assistance
> appreciated.
>
> I set the environ variable to mysite.settings, as recommended in the
> documentation, but then I get: ImportError could not import settings
> 'mysite.settings', no module named mysite.
DJANGO_SETTINGS_MODULE issues are driving me crazy. So any assistance
appreciated.
I set the environ variable to mysite.settings, as recommended in the
documentation, but then I get: ImportError could not import settings
'mysite.settings', no module named mysite.settings
Should the variable not
Great idea and great site! I especially like the clean design.
>From the footer I see that the site is hosted on Slicehost. Are you
using a basic 256slice? I'm interested in buying a slice too but I
fear 256 MB RAM (shared by os, apache, svn, django, etc.) is not
enough.
Another deployment quest
In fact, running on the development computer the same exact software
environment present on the production server is the strongest pro-
Linux argument, especially if you have a VPS and not a shared server.
To be honest, I think neither with Windows or Mac OS X you can obtain
this ideal condition.
Is there a working version of this in trunk or a branch?
On Feb 6, 12:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-02-05 at 17:51 -0800, Vance Dubberly wrote:
> > The Documentation has said for as long as I can remember (a year+)
> > that the semantics of a the OneToOne rel
Looking good.
- If you type in an incident and perform the captcha correctly, but
have validation errors, you have to redo the captcha. This may be by
design.
- The airport isn't filled in automatically for URLs such as
http://www.tsacomplaints.com/complain/?code=291 (if you click through
from h
On Thu, 2008-02-07 at 02:36 -0800, django wrote:
> hi,
> I wanted to know how can I change the add user interface for admin
> site.
I suggest you begin here at this link:
http://www.djangobook.com/en/1.0/chapter06/#s-customizing-the-admin-interface
> I dont want to use admin add user interface
On Feb 7, 2008 7:28 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Found a debug error here: http://www.tsacomplaints.com/airports/PDX/
>
It needs a 404.html.
--
http://www.advogato.org/person/eopadoan/
Bookmarks: http://del.icio.us/edcrypt
--~--~-~--~~~---~--
How about putting the separator before the link?
if first, put nothing
else
if last put 'and'
else put a ', '
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Kenneth Gonsalves wrote:
> On 06-Feb-08, at 7:41 PM, Tony Winslow wrote:
>
>
>> I installed mod_python and do the configurations as the tutorial on
>> the
>> official site. But mod_python still can not find the mysite.settings
>> module. What might be the problem?
>>
>
> paste the relevan
It sounds like you are looking for a tag that would let you be more
concise about this. Something like:
{% for pa in pub.pubauthor_set.all %}
{{ pa.author }}{% nth
forloop.revcounter "" "and" "," %}
{% endfor %}
Where the nth tag works like this: its first argument is an integer
Which gadgets u r using?
Mobile
Laptop
Computer
Printer
Open This url and give me vote.
http://gadgetsinformationnews.blogspot.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Do You Know About ERP Software, please open this url
http://enterprisesoftwaresolution.blogspot.com. this blog provide u a
knowledge of ERP Software & News
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
On 07 Feb 2008 Thu 13:20:47 pgb wrote:
> Eren,
>
> I don't have big experience but I think
> there is no way that you can use frameworks and have small amount of
> memory and slow processor, especially if your application is big.
>
> One of my colleagues spend about 4 months writing quite big proj
Eren,
I don't have big experience but I think
there is no way that you can use frameworks and have small amount of
memory and slow processor, especially if your application is big.
One of my colleagues spend about 4 months writing quite big project in
django.
It was installed on a small box with
hi,
I wanted to know how can I change the add user interface for admin
site. I dont want to use admin add user interface instead of that I
want to use my template for adding user.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
On 7 Lut, 09:58, Mackenzie Kearl <[EMAIL PROTECTED]>
wrote:
> I am having trouble finding documentation on how to add custom
> validation to a custom model field.
>
> example:
>
> class PostalField(models.CharField):
> def __init__(self,*args,**kwargs):
> kwargs['max_length
On 07 Feb 2008 Thu 03:55:22 Michael Newman wrote:
> Reality is 19 apache processes isn't that much. That means there are
> only about 19 requests on your server at one time. So what that means
> is that either your server is whoafully unprepared for the real world,
> or what is being done with you
Hi,
I _would_ have said that installing stuff and setting up the dev.
environment was the biggest disadvantage of Windows, but you seem to
have that part covered.
Other than that, if your production runs Linux, then you will, in
theory, have an easier time with deployment, and testing of
deploym
James Bennett helped me with a problem similar to this a few months
ago; you may find his solution useful:
http://groups.google.com/group/django-users/browse_thread/thread/87b915a44fc8cde1/a30af6ce6eaf33c1
Yrs,
Eric
--~--~-~--~~~---~--~~
You received this message b
Found a debug error here: http://www.tsacomplaints.com/airports/PDX/
--~--~-~--~~~---~--~~
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 unsubscr
This is a great idea. I like that you are using blueprintcss as well.
Pretty cool. Great concept, simple execution.
Dave Merwin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
On Feb 7, 8:30 am, toomim <[EMAIL PROTECTED]> wrote:
> On Feb 6, 11:05 pm, toomim <[EMAIL PROTECTED]> wrote:
>
> > I don't understand, how do I get {{sep}} to change from ',' to 'and'
> > and then to the empty string in the last 2 iterations of the loop,
> > without using a bunch of if statements
Here is my basic model:
class Type(models.Model):
name = models.CharField()
description = models.TextField(blank=True)
created = models.DateTimeField(auto_now_add)
modified = models.DateTimeField(auto_now)
class Media(models.Model):
name = models.CharField()
description =
I am having trouble finding documentation on how to add custom
validation to a custom model field.
example:
class PostalField(models.CharField):
def __init__(self,*args,**kwargs):
kwargs['max_length']= 6
super(PostalField, self).__init__(*args, **kwargs)
Hi, I'm a Windows XP longtime user but I have also Ubuntu Linux 7.10
on my dual-boot computer. I've just discovered Python and Django and I
have to decide what os to use for web development with Django.
In fact, while I use Ubuntu Linux on my production server, I'm really
satisfied with my Window
> Probably, but I always include that in the time scale just in case.
> You know how tricky it is to estimate software development.
I understand; nevertheless your estimates are highly appreciated.
Hopefully Jacob is right about it being closer to now... :)
Untill that time, I guess I'll just sta
81 matches
Mail list logo