In reference to
http://simonwillison.net/2008/May/1/orm/
and comments from here
http://thisweekindjango.com/screencasts/episode/11/django-ground-episode-3/
I am trying to make my implementation clean as possible... The idea is
to able to drill down querysets based on more and more preset
criteria
mine wasnt working exactly as you all described it...
until i moved my django symlink to someplace else on my python path...
and it suddenly worked its really odd.
On Feb 3, 12:49 am, mrsixcount wrote:
> Can't seem to get the auto complete to work when I import
> django.db.models as models.
shameless plug
http://www.wtflab.com/tech/2008/jul/01/developed-directory-structure/
http://www.wtflab.com/tech/2008/jul/05/making-django-version-control-friendly/
On Sep 5, 4:18 pm, Jeff FW <[EMAIL PROTECTED]> wrote:
> On Sep 5, 12:28 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>
> > On
if im moving my form related logic to another file, i wouldnt really
need to import forms else where? ;)
On Aug 23, 9:10 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Sat, Aug 23, 2008 at 8:59 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > In Django there are no 'standar
> > The runserver stuff is a bit too magic. It puts 'root' on sys.path but
> > only long enough to import 'mysite' package root.
um, i have never experienced this behavior.
plug: http://www.wtflab.com/tech/2008/jul/01/developed-directory-structure/
--~--~-~--~~~---
if you use multiple django instances, you need to add to each
PythonInterpreter somestring
On Jul 8, 11:52 pm, "Milan Andric" <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 8, 2008 at 9:47 PM, foo <[EMAIL PROTECTED]> wrote:
>
> > First, I want to thank you for your reply Milan! I just recently
> > j
blank will store a string as a string with nothing in it
null will store a string as null
you should use blank
http://www.djangoproject.com/documentation/model-api/#null
says you shouldnt use null unless you have a specific reason to
On Jul 7, 1:49 pm, Fernando Rodríguez <[EMAIL PROTECTED]> wro
inside your sitepackages/django folder, there is a folder called
django... that is what should be in site-packages
On Jul 3, 3:25 pm, Leaf <[EMAIL PROTECTED]> wrote:
> I'm trying to install Django on Windows XP SP2, but I received an
> error while doing so.
>
> 1. I downloaded and installed Pytho
look up context processors
On Jul 2, 4:31 am, pihentagy <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I have an auction site, the items appear in more views (and there are
> more items in a view), and I would like to allow users to bid on every
> view.
> I have done it somehow, but I think that solution i
i was going to say state a question, but found my answer...
for anyone else:
http://www.djangoproject.com/documentation/db-api/#querysets-are-lazy
On Jul 2, 10:09 am, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Alex Koshelev wrote:
> > Or may be a custom template tag for common stuff.
>
> Or l
are you forced to use sqlite?
http://www.sqlite.org/limits.html
On Jul 2, 11:09 am, Brian Luft <[EMAIL PROTECTED]> wrote:
> I don't have any firsthand experience to share with running sqlite in
> a production setting. I did choose to spend about 30 seconds scanning
> the sqlite FAQ:
>
> http:/
having trouble understand what you mean
On Jul 1, 2:09 am, gumbah <[EMAIL PROTECTED]> wrote:
> Anyone?
>
> On Jun 27, 9:38 am, gumbah <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > does anyone know what i am doing wrong when i see adatelooking like
> > this in the "change history" part of the adm
i think you need transactions?
problem being that if all those processes happen at about the same
time, they will all see enough money, then they will all process it.
On Jul 1, 5:12 am, pength <[EMAIL PROTECTED]> wrote:
> sorry for the bad indent of the "#models.py" part. I post it again,
> hope
your urls is setup for
http://yourdomain.com/login/...
not http://yourdomain.com/sommerspil/login
On Jun 26, 11:46 am, Peter Rowell <[EMAIL PROTECTED]> wrote:
> You didn't share with us the specific error you are getting.
>
> I strongly recommend a) DEBUG=True in settings.py, and b) checking
> y
go to a python interpreter
import sys
sys.path
make sure that directory is in there
On Jun 26, 2:34 pm, Adi <[EMAIL PROTECTED]> wrote:
> I get the following error when I hit my websitehttp://ipaddress/enterathletes/
>
> DocumentRoot: '/var/www/html'
>
> URI: '/enterathletes/'
> Loca
do you have spaces around post?
i dont even know if that would cause the problem.
if you ar eusing the dev console, the way to debug is use the print
statement
so put these someplace and tell us what you get
print request.method
print request.POST['choice']
On Jun 26, 9:29 am, Mog <[EMAIL
model choice field
http://www.djangoproject.com/documentation/newforms/#fields-which-handle-relationships
On Jun 26, 9:53 am, mwebs <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to do something like this
>
> class PictureForm(forms.Form):
> image = forms.ImageField(label='Pict
emacs does me well.
On Jun 25, 5:23 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote:
> Fernando Rodríguez escribió:
>
> > Hi,
>
> > I'm currently learning django on Ubuntu, but my background is Windows,
> > so I'm not a VIM kind of guy. What kind of IDE do you guys use or
> > recommend?
>
> I use kate
yourversion of django before or after qsrf merge?
select_related does not work well with relations that have null = True
On Jun 24, 11:40 pm, bob84123 <[EMAIL PROTECTED]> wrote:
> I'm having a problem with select_related; I'm not sure if it's a bug
> or a problem with my understanding of how it'
i had a slightly hard time understanding your problem.
are you asking for Personal_Cliente.contract_macro_set.all()
http://www.djangoproject.com/documentation/db-api/#related-objects
or are you asking for how to climb the tree the other way?
On Jun 25, 10:02 am, mariu <[EMAIL PROTECTED]> wrote:
i think i understand what youre saying?
by test database, you mean you want to test django out but your
declared models names dont match your db?
there is a meta option for db table
http://www.djangoproject.com/documentation/model-api/#db-table
On Jun 25, 11:54 am, "[EMAIL PROTECTED]" <[EMAIL
however you would do it without django, is how you would do it with
django
On Jun 24, 9:51 am, RossGK <[EMAIL PROTECTED]> wrote:
> I'm a recent Python/Django inductee and trying to get a small project
> going.
> Is there a good way to do a pop-up window from Django or should I use
> java-script.
orks/Python.framework/Versions/2.5/lib/python2.5/
> > > > > > site-packages/django/core/urlresolvers.py" in __init__
> > > > > > 96. self.regex = re.compile(regex)
> > > > > > File
> > > > > > "/Library/Frameworks/Python.framework/
that is an extremely complex problem for such small problem...
if you are worried about caching, just append a number to the file or
add a date to it.
On Jun 22, 6:48 pm, alex <[EMAIL PROTECTED]> wrote:
> I already have {{ MEDIA_URL }} set in html, css, and js templates and
> that's working grea
http://httpd.apache.org/docs/2.0/vhosts/examples.html
On Jun 22, 7:34 pm, "Brian Ritchie" <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> My first post to this mailing list. I didn't see this in the archive. It
> this was covered before, sorry about that.
>
> I have a webserver (Ubuntu, Apache2) wi
how about a one to many?
On Jun 22, 8:03 am, Xan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Suposing you want a model A with several and indetermined number of
> integer fields. Is there any possibility of defining A without
> creating a Integer class and then add ManyToManyField(Integer) in
> class A
http://www.djangoproject.com/documentation/url_dispatch/
look at the regular expressions used in the examples, and the section
"named groups"
On Jun 23, 9:22 am, sebastian stephenson <[EMAIL PROTECTED]> wrote:
> ok so I have in my data base a colium of rss feeds and I am parseing
> them via fe
class FormFoo(ModelForm):
def __init__(self, obj1, *args, **kwargs):
super(FormFoo, self).__init__(*args, **kwargs)
self.object1 = obj1
def clean(self):
# use self.object1 here
On Jun 23, 12:23 pm, Adi <[EMAIL PROTECTED]> wrote:
> do you mean something like this.
>
> class FormFo
Is there anyway to make the primary key of a model a hash of some
sort?
some of these primary keys will be public facing, and i'd rather them
not be counting up sequentially.
in my current implementation, i have left the primary key alone and
have made a unique field that creates a hash and check
you are implementing logic into the templates, which django templating
attempts to prevent.
On Jun 17, 12:27 pm, Keybo <[EMAIL PROTECTED]> wrote:
> Hello,
> I have a question regarding displaying information in django
> templates. I would like to display a nested dictionary(Hash) in the
>
"You have to add a User, then add a Student, and then
make sure that you get the right User attached to the student" or,
"Well you don't see the Student's first name and last name, in the
Student listing because those are really attributes of the User.""
could have your save method automatically
yes they are strings,
yes in python if you do
if item1:
pass
it will evaluate the string as a true/false depending on existance.
however, comparing two strings for equality... checks if they are
equal.
{% if item1 %}
{% if item2 %}
blah
{% endif %}
{% endif %}
On Jun 19, 1:50 pm, mark <[
use of named urls will probably make that a ton easier
On Jun 19, 11:45 am, "Emily Rodgers" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have been hitting a brick wall so many times now on this that it is
> starting to hurt!! Please help if you can...
>
> I have an index page, and I want my function fo
models.Model.save(self)
super(ProjectModification, self).save()
On Jun 19, 1:41 pm, Adam Fraser <[EMAIL PROTECTED]> wrote:
> Signalling worked out for me but it turned out to be more complex than
> it needed to be. Here are some references in case anyone is looking:
>
> http://www.chrisdpratt.
either way, the database is hit to check that. so if your goal is to
minimize, getting true and false instead of the record has no
advantage. just check if there is something returned.
On Jun 19, 10:14 am, timc3 <[EMAIL PROTECTED]> wrote:
> I have a situation where I want a true or false to wheth
<3 byteflow
i dont use the blog itsself, but i have stolen a ton of ideas from it.
On Jun 13, 12:11 am, Eugene Lazutkin <[EMAIL PROTECTED]>
wrote:
> It is stupidly easy to write a blog using Django, and many people do so.
> You can find many examples out there. One complete example is the
> Bytef
"I'm starting work on a site that's to be hosted on GoDaddy"
uh good luck
On May 27, 3:56 pm, bcrem <[EMAIL PROTECTED]> wrote:
> I think I'll check my target host server; I'm starting work on a site
> that's to be hosted on GoDaddy - have to see what they're running.
> And if their tech-supp
for c in city.person_set.all()
http://www.djangoproject.com/documentation/db-api/#backward
On May 22, 10:54 am, Dan <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm new to Django, so please forgive my newbness :)
>
> The following is my model:
>
> class City(models.Model):
> name = models.CharFie
ive been changing the structure of my projects/applications over and
over.
thats because every time i change it, i realize i can make it a bit
different.
the whole time i felt it was neccessary to allow for multiple projects
on the same host.
well now that ive finally gotten somewhere, i was hopin
variable name collision.
caused by locals()
On May 18, 8:05 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Very odd. On a whim, I changed:
>
>
> {% for instructor in instructors %}
> {{ instructor.first_name }} #there is no value output
> here
> {% endif %}
>
>
> to
>
>
> {% for i in inst
your bundling of those mac files confused me for a minute =P
--~--~-~--~~~---~--~~
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
"I am new to web programming"
"I am trying to use my own loginpage "
is there a reason that contrib.auth doesnt meet your needs?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
get_profile is useful for being able to change the model name or being
able to reuse an app.
if that doesnt matter, you can just do it the normal way... foreign
key to the auth model (from django.contrib.auth.models import User)
On May 11, 4:17 pm, Szymon <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I
i second the template tag approach
On May 11, 3:32 am, mwebs <[EMAIL PROTECTED]> wrote:
> Thanks Alex, thats a good idea.
>
> But I want to have a more generic solution for this problem. There
> must be an other way than to write custom template tags. I think the
> passing-default-request-paramet
im not understanding whats limiting you from using get_profile to
"extend" the user model... then in that having a foreign key (or m2m)
to your group
On May 10, 7:10 pm, Marcin Gorczyński <[EMAIL PROTECTED]> wrote:
> Hello
>
> In my site I want users to belong to groups, but in a quite diffrent
>
if you set a file association of .py to the python.exe, you wont have
to type python before each command
On May 10, 4:12 pm, davenaff <[EMAIL PROTECTED]> wrote:
> It sounds like you have an application configured to open .py files.
>
> Try: python manage.py etc.
>
> On May 10, 12:04 pm, garrettj
django comments is being re-written as a google summer of code project
http://code.google.com/soc/2008/django/appinfo.html?csaid=67A7AB4801F06D7B
On May 10, 2:14 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Any ideas where (which branch/patch/?) new comments using new forms is being
> rewr
can we see your models.py?
On May 10, 9:00 pm, davenaff <[EMAIL PROTECTED]> wrote:
> It is probably also worth noting that _doctest returns correct
> (projectname.appname.models) object.__module__ values for Managers.
>
> On May 10, 5:49 pm, davenaff <[EMAIL PROTECTED]> wrote:
>
> > As I dig int
yea, i never go as far to check html either.
ill take some of your thoughts and blend it into my process
as far as the strings go. thanks a ton, it all makes sense since
strings are immutable.
=)
On May 6, 11:51 am, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> phillc w
defenitely be using that structure in the future.
On May 5, 7:42 pm, Scott SA <[EMAIL PROTECTED]> wrote:
> On 5/5/08, phillc ([EMAIL PROTECTED]) wrote:
>
> >fourth:
> >
> >i never understood this, why do people do
>
> >somevar = "blah blah %s" % a
there has been a few things that i feel have been holding back from
making my code structure/process better. i was hoping someone could
help me on some of these questions.
first:
How does one develop tests for django web apps?
im having trouble writing tests.
i understand there are view test
living_with = MultipleChoiceField(max_length = 200, choices =
LIVING_WITH, blank = True)
add
widget = forms.CheckboxSelectMultiple
label='Living with:'
On Apr 25, 10:28 am, the devel <[EMAIL PROTECTED]> wrote:
> So the code is down to this now cause everything else seemed not
> needed.
>
> http
, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-04-17 at 12:44 -0700, phillc wrote:
> > I was using new forms for one of my forms, and i wanted to save a
> > relation.
> > i came upon an interesting problem along the way. is there a limit in
> > python
I was using new forms for one of my forms, and i wanted to save a
relation.
i came upon an interesting problem along the way. is there a limit in
python on the number of chained function calls or something?
This did not work:
class q_to_q_form(forms.Form):
def __init__(self, columns, questio
ive implemented a hash in the save method, and ive implemented in the
model default=(hash function), and ive done it in my view.
they all worked fine, just remember if you override save, if you have
any data that goes along with the invite and edit it, the hash will be
created again unless you wr
55 matches
Mail list logo