Hi all!
I'm making an app which has some custom views to extend the admin back
end. So I've also made some templates which are stored in "admin/
myapp/" in my project template folder.
I've made that app generic, so now I'd like to take everything out of
my project, including the admin templates.
http://pickthedollors.blogspot.com
open the site and get free dollors without any hardworking and without
wait just open it and find a form in this site behind web links on
this site and get free dollrs and bank account
--~--~-~--~~~---~--~~
You received this messag
I have also written a patch for django to include a profanity template
filter. It replaces words with asterisks or random symbols.
http://code.djangoproject.com/ticket/6290
globophobe wrote:
I'm preparing my site for general consumption and would prefer that
naughty words not be presented in u
I have a model with a decimal field.
When accessing that field, it is showing up as a float which seemed
wrong. It was causing errors where += wasn't defined for floats &
decimals.
The problem turned out to be that I initialized the decimal values to
0.0, not Decimal("0.0"). This was on the same
ah so the idea is to us a url something like this
for form
/module/item_id/edit
and save to
/module/item_id/save
feels queer but i'll try and get used to it. thanks i guess i
couldn't get my head outa the rut..
Vance
On Jan 25, 2008 7:07 PM, Brian Rosner <[EMAIL PROTECTED]> wrote:
>
> O
On Jan 25, 2008 11:55 AM, Martin Ostrovsky <[EMAIL PROTECTED]> wrote:
>
> I'm trying to run syncdb on a clean database (no other tables etc.) in
> postgres. It produces the standard Postgres error:
...
> I know there's nothing wrong with my settings file and/or models code
> because I'm just tryi
On Jan 26, 2:29 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> Django comes with a naughty-word filter/validator,
> hasNoProfanities. Just set the PROFANITIES_LIST in your
> settings.py to be the list of words you don't want to include. I
> believe there's already a modest default list detailed in
>
> I'm preparing my site for general consumption and would prefer that
> naughty words not be presented in usernames or on public pages. Is
> there a recommended way of filtering out the uncouth?
Django comes with a naughty-word filter/validator,
hasNoProfanities. Just set the PROFANITIES_LIST in
I'm preparing my site for general consumption and would prefer that
naughty words not be presented in usernames or on public pages. Is
there a recommended way of filtering out the uncouth?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
On Jan 26, 2008 8:11 AM, Chris <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am seeking to do something like this:
>
> def dynamic_model_call(model_name):
> test = model_name.objects.all()
> return test
>
This will work fine as long as you pass an actual model into the method:
>>> dynamic_
On Jan 26, 2008 6:03 AM, Piotr Majewski <[EMAIL PROTECTED]> wrote:
>
> I would love to have the (native) feature that django-multilingual
> gives. For me an many developers i know this is vital. Is it any way
> that django 1.0 will support multilingual models (content) ?
Hi Piotr,
Unlikely. The
On 2008-01-25 19:18:22 -0700, "Vance Dubberly" <[EMAIL PROTECTED]> said:
>
> ok so this ones got to be really simple and I've go to be really stupid.
>
> I want to update a model of something I already have in the database
> so I made a ModelForm that doesn't do anything special for it and I
>
ok so this ones got to be really simple and I've go to be really stupid.
I want to update a model of something I already have in the database
so I made a ModelForm that doesn't do anything special for it and I
use that form to generate a form in a template using the normal
form.as_table method.
> Try changing that to:
> entries = self.filter(dispDate__lte=now).filter(isOpen=True)
Perfect, thanks a lot Rajesh. I guess I hadn't picked up that the
super() call was only being used when extending the original
get_query_set() method.
Eric
--~--~-~--~~~---~--~~
Thanks - I'll check that out.
On Jan 20, 3:41 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> The mod_wsgi package gets affected by a lot of similar issues to
> mod_python. The documentation for mod_wsgi covers various shared
> library and name space conflicts including that of MySQL, PHP etc i
Thanks - I'll check that out.
On Jan 20, 3:41 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> The mod_wsgi package gets affected by a lot of similar issues to
> mod_python. The documentation for mod_wsgi covers various shared
> library and name space conflicts including that of MySQL, PHP etc i
We just ran into this problem also. It's reported in ticket 6027:
http://code.djangoproject.com/ticket/6027
GzipMiddleware and responses with files for content (rather than
strings) don't get along...
--Ned.
[EMAIL PROTECTED] wrote:
> I've been tearing my hair out for a little while trying t
I am on the gridserver as well.Did you try America/Los_Angeles. I live
in Barcelona , so, for me I set it to Europe/Madrid. And it works.
Hope this helps.
Patrick
On Jan 25, 10:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm on MediaTemple's new gridserver for Django and I can't seem
Hi Doug --
On 1/24/08, Doug Van Horn <[EMAIL PROTECTED]> wrote:
> OperationalError: could not connect to server: No such file or
> directory
>Is the server running locally and accepting
>connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.
> 5432"?
This means that, fo
Hello,
I am seeking to do something like this:
def dynamic_model_call(model_name):
test = model_name.objects.all()
return test
I saw where I could do something like this:
def dynamic_model_call(model_name):
exec("test = %s.objects.all()" % model_name)
return test
But this doesn
I'm on MediaTemple's new gridserver for Django and I can't seem to get
the time to be set correctly. I'm in the PST timezone, but when Iset
it to any of the options I thought should work (Etc/GMT+8 for example)
it still posts all my comments as 8 hours ahead of the actual time.
Has anyone had a si
I would love to have the (native) feature that django-multilingual
gives. For me an many developers i know this is vital. Is it any way
that django 1.0 will support multilingual models (content) ?
--~--~-~--~~~---~--~~
You received this message because you are subsc
I've been tearing my hair out for a little while trying to figure out
why I can't display pdfs from Django in Firefox. I'm getting blank
windows and I know it used to work ;-)
I'm using the code from the documentation (http://
www.djangoproject.com/documentation/outputting_pdf/), removing
"attac
Cool. I tried that early and it didn't work. I just tried it again and
it seems to work. must of keyed something in wrong.
>>> Weblog.objects.filter(category__id='1').count()
3L
Thanks for your help.
On Jan 25, 2:08 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Jan 25, 2:01 pm, Chris <[EMA
Thanks, I'll try the print statements. This is my first pass at the
save() routine, and your idea is good, although I may try other
methods.
Thanks for the help.
John
On Jan 25, 11:01 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Jan 25, 1:39 pm, John M <[EMAIL PROTECTED]> wrote:
>
> > Wel
On Jan 25, 1:39 pm, John M <[EMAIL PROTECTED]> wrote:
> Well, it is in my file, and I can thank Windows for the bad paste :).
Ah..
> Assume the indenting is right, any other thoughts?
How are you saving the Trade object when you say it doesn't work? Is
that through the Admin or through your o
On Jan 25, 2:01 pm, Chris <[EMAIL PROTECTED]> wrote:
> Cool here is my models and I posted an sql query to:
>
> Modelshttp://dpaste.com/32548/
>
> SQL Queries (posted a question in this one)http://dpaste.com/32552/
>
> Hope this helps. maybe there is a better way of doing what I am trying
> to d
That would be User_Friend.objects.filter(from_user=user, active=True,
to_user__name__startswith=q)
On Jan 25, 12:44 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I need help making a query with django with I'm not sure it's
> possible.
>
> I have
>
> model:
> class User_Friend(m
Cool here is my models and I posted an sql query to:
Models
http://dpaste.com/32548/
SQL Queries (posted a question in this one)
http://dpaste.com/32552/
Hope this helps. maybe there is a better way of doing what I am trying
to do.
Thanks for helping.
On Jan 25, 12:59 pm, Rajesh Dhawan <[EMA
Well, it is in my file, and I can thank Windows for the bad paste :).
Assume the indenting is right, any other thoughts?
John
On Jan 25, 10:29 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> On Jan 25, 1:21 pm, John M <[EMAIL PROTECTED]> wrote:
>
> > I have a OneToMany Model where in the save()
Hello,
I need help making a query with django with I'm not sure it's
possible.
I have
model:
class User_Friend(models.Model):
from_user = models.ForeignKey(User, related_name='from_user')
to_user = models.ForeignKey(User, null=True,
related_name='to_user')
active = models.BooleanFie
On Jan 25, 1:21 pm, John M <[EMAIL PROTECTED]> wrote:
> I have a OneToMany Model where in the save() routine of the Many class
> I try to manipulate a set of fields of the owner of my record. See my
> dpaste examplehttp://dpaste.com/hold/32545/
You've got an indentation problem on line 64 ther
I have a OneToMany Model where in the save() routine of the Many class
I try to manipulate a set of fields of the owner of my record. See my
dpaste example http://dpaste.com/hold/32545/
I have a bunch of stock holdings with trades behind them (1 Holding
with Many trades). When I save a trade re
On Jan 25, 12:55 pm, todd <[EMAIL PROTECTED]> wrote:
> class Image(models.Model):
> image = models.ImageField(upload_to='/PATH/site/files',
> blank=True, unique=True)
I would suggest renaming the class Image to something else because the
Python Imaging Library provides a class by that same
Hi,
I have been connecting Django to MySQL using a DATABASE_USER='root'
and DATABASE_PASSWORD='' (those are single quotes - empty string)
until today. It all worked fine. Today I try to lock down my
database by adding a password to the root user. So I type;
$ mysqladmin -u root password "myne
On Jan 25, 12:42 pm, Chris <[EMAIL PROTECTED]> wrote:
> Thanks for reply but that is not what I am looking to do. my [EMAIL
> PROTECTED] table
> is NOT the categories table.
Well, as I said in my earlier post, you still haven't posted your
model code. It would help people understand better wha
class Image(models.Model):
image = models.ImageField(upload_to='/PATH/site/files',
blank=True, unique=True)
class Admin: pass
def __str__(self):
return self.image
class Client(models.Model):
name = models.CharField(maxlength=255)
street = models.CharField(maxlength=2
I'm trying to run syncdb on a clean database (no other tables etc.) in
postgres. It produces the standard Postgres error:
psycopg2.ProgrammingError: current transaction is aborted, commands
ignored until end of transaction block
Digging a bit deeper, I see the exception is thrown in get_table_li
Thanks for reply but that is not what I am looking to do. my [EMAIL PROTECTED]
table
is NOT the categories table. In django, when it generates your models,
it automatically generates your M2M table reference. so I have a table
called blog that has a m2m relation with categories. (blog-->M2M--
>ca
Hi,
> Has anyone got any clues what's happening?
You need to post your model code so people can help you find the
problem.
-Rajesh D
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
Rajesh Dhawan wrote:
>
>
> On Jan 25, 11:57 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
>> When creating a field that will hold HTML snippets, should it be created
>> as a CharField or an XMLField (or something else)?
>
> Either of those would work. The XMLField would require you to
> guarantee
On Jan 24, 10:36 pm, hifire <[EMAIL PROTECTED]> wrote:
> Greetings group!
>
> I've been trying to get this code to
> work:http://www.djangosnippets.org/snippets/282/
>
> I created a templatetags folder in my app, and added __init__.py and
> usertags.py. I pasted the code from the snippets site
On Jan 25, 11:57 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
> When creating a field that will hold HTML snippets, should it be created
> as a CharField or an XMLField (or something else)?
Either of those would work. The XMLField would require you to
guarantee that the HTML snippet is valid XML
> so if category_id 2 name is 'politics' it would know that it occurs 3
> times. make sense? The easy way would be to create a counter field in
> the categories table and count each time that the category is being
> used but that is redundant and require extra work to save the category
> count e
Hi Django users,
I'm new to Django but have manage to build my model and db, all goes
well, till...
I've been trying to upload images, and this goes well enough if in a
table the image has it's own column, but I'd like to re-use images, so
first I tried to making an images table and doing a Fore
When creating a field that will hold HTML snippets, should it be created
as a CharField or an XMLField (or something else)?
Thanks,
Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Thanks for the response. If only it were that easy :). In my
categories table, each category should be unique. What I am trying to
count is the m2m ref table.
Example.
category_id | name
1 | programming
2 | politics
3 | games
blog_id | category_id
1 | 2 <-- I am trying to reference this table
On Jan 24, 9:54 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > Can you include the code for your CustomManager.open() method?
>
> class OpenEntries(models.Manager):
> def open(self):
> now = datetime.now()
> entries = super(OpenEntries,
> self).get_query_set().filter(dispDa
free online job:
enjoy work on this job and ...very use full &yours
work details
http://asiafriendfinder.com/go/g933052
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
Hello there!
I'm seeking some design advice, and I hope you'll have some
suggestions :)
I'm storing my site's menu structure into the database so that I can
edit it from the admin. Here's the code:
class MenuItem(models.Model):
caption = models.CharField(max_length=30)
url = models.Char
Hi,
There are two ways of counting:
# Bad way:
len(MyModel.objects.filter(...))
This will fetch all rows (SELECT * FROM ... WHERE ...;)
# Good way:
MyModel.objects.filter(...).count()
This will do the couting at the database
SELECT COUNT(*) FROM ... WHERE ...;
If you know how to get all
I have mod_python and I'm using ModelChoiceField, but I'm not getting
the expected results, when I change my queryset and the second has
elements not present on the original queryset, it displays the choices
but doesn't validate properly, complaining about the option not being
valid for the set.
I am using geodjango, is it a way to have both newforms-admin and
geodjango on the same trunk? newforms-admin looks really nice to be
used, but right now I'm using geodjango for GIS. Any
recommendations? It's an application of about 70 classes on
models.py, If I'm right there would be necessary
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
YourCoolForm(forms.ModelForm):
~choices_field = forms.ModelChoiceField(
~queryset=UserProfile.objects.all())
~def__init__(self, **kwargs):
~ super(YourCoolForm, self).__init__(**kwargs)
~ self.fields['choices_field'].q
Felix,
> Inline objects now have a 'delete' checkbox which is used for removing
> objects.
Oh yeah! Well that answers the delete question, thanks.
> I believe that the usual admin rules apply for creating models i.e.
> all fields without blank=True will be required, otherwise you'll get
> valid
Hallo,
I have a model in which I have defined a "unique_togther" of two
fields in Meta class section:
from django.db import models
from production.processors.models import Processor
class Processoroutput(models.Model):
processorID = models.IntegerField(primary_key=True,
I found out that Django doesn't use the related_name as an alias for
the join, but an incremented name (strings, strings1, strings2,
strings3 ...)
Does anyone know why/how to change this?
On Jan 25, 10:29 am, Rufman <[EMAIL PROTECTED]> wrote:
> Hey
> How can I follow the foreign key relation by
Hey
How can I follow the foreign key relation by related_name by using
select_related()?
ex:
Class Strings(models.Model):
string = CharField(max_length=255)
Class Stuff(models.Model):
spam = models.ForeignKey(Strings, db_column='spam',
related_name='spam', db_index=True, blank=True)
Il giorno 25/gen/08, alle ore 08:32, shabda ha scritto:
> Instead is there some way I can get django to do this in the database,
> where it runs a query like
> select sum(hrs_worked) from Entry where job_id = job.id, without using
> custom SQL?
Just not yet: http://code.djangoproject.com/ticket/
59 matches
Mail list logo