Re: ManyToManyField to Phones model for enter phones manually (not select from list)

2010-09-21 Thread nick.l...@gmail.com
ted phone numbers. I > check this numbers and if all numbers correct - store this numbers in > database in Phone model (each phone in separate record) and associate > message with list of this phones. > > Can you please help me in this. I not understand how to create my own > Field ba

Re: ManyToManyField to Phones model for enter phones manually (not select from list)

2010-09-21 Thread nick.l...@gmail.com
> phones = models.ManyToManyField(Phone) > > > Nick, thank you for you help. You are really very good people! > > > On 21 сен, 18:12, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > > Maybe I don't understand your problem. > > > > It sound

Re: ManyToManyField to Phones model for enter phones manually (not select from list)

2010-09-21 Thread nick.l...@gmail.com
Maybe I don't understand your problem. It sounds to me like your trying to make this way more difficult than it needs to be. Also it sounds to me like your trying to assign the same phone number to multiple people. (which is fine) But doesn't make a lot of sense to me in a practical application.

Re: ManyToManyField to Phones model for enter phones manually (not select from list)

2010-09-21 Thread nick.l...@gmail.com
:37 AM, nick.l...@gmail.com <nick.l...@gmail.com>wrote: > First I don't think you should be using the admin for such fine grained > control of your data formats. > BUT if you do want to do that you would want to do your validation in > custom admin forms. (created in your adm

Re: ManyToManyField to Phones model for enter phones manually (not select from list)

2010-09-21 Thread nick.l...@gmail.com
First I don't think you should be using the admin for such fine grained control of your data formats. BUT if you do want to do that you would want to do your validation in custom admin forms. (created in your admin.py to do cleans on the data that's being submitted) Second I wouldn't do a

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread nick.l...@gmail.com
Nick, yes...and no. Have you looked at using Virtualenv? http://pypi.python.org/pypi/virtualenv On Thu, Sep 16, 2010 at 1:44 AM, Nick wrote: > Let's say you have Python installed to D:/dev/python2.6 > > Is it wise/common practice to put django and

Re: How to pass in a file to a model directly

2010-09-15 Thread nick.l...@gmail.com
Have you looked at this yet? http://docs.djangoproject.com/en/dev/topics/files/#the-file-object n On Wed, Sep 15, 2010 at 7:18 PM, Yo-Yo Ma wrote: > I'm wondering how to do this: > > > instance = SomeModelWithFile.objects.create( >file = some_file, >

Re: Prepopulating fields from parent, or related models, in the admin

2010-09-15 Thread nick.l...@gmail.com
n for your help, I'll think this through a bit more, there > might be a better way to conceptualize my models and their inheritance > than the way Im thinking. > > On Sep 15, 10:55 am, "nick.l...@gmail.com" <nick.l...@gmail.com> > wrote: > > well...when you

Re: Prepopulating fields from parent, or related models, in the admin

2010-09-15 Thread nick.l...@gmail.com
gt; FK selection button, that when clicked, queries the database and > prepopulates the inherited values. Any suggestions on how to implement > this kind of thing. I have never use jquery for example to interact > with a database, any good tutorials or tips on how to do this with >

Re: Prepopulating fields from parent, or related models, in the admin

2010-09-15 Thread nick.l...@gmail.com
owboy <pixelcowbo...@gmail.com> wrote: > > I'll try when I get home, but thanks again for your help! > > > > On Sep 14, 11:31 am, "nick.l...@gmail.com" <nick.l...@gmail.com> > > wrote: > > > > > > > > > Hi again! :) > > >

Re: View to serve dumpdata output

2010-09-14 Thread nick.l...@gmail.com
one way to do it would be to do this (on an app by app basis) http://docs.djangoproject.com/en/dev/topics/serialization/#serializing-data Then have your view return data n On Tue, Sep 14, 2010 at 8:01 PM, David Somers Harris < da...@somers-harris.com> wrote: > Is it possible to write a view

Re: Prepopulating fields from parent, or related models, in the admin

2010-09-14 Thread nick.l...@gmail.com
Hi again! :) I haven't thought this idea through, and very well could be wildly inefficient! :) Though in your admin.py when registering the admin model do something like this: from myproject.myapp.models import MyModel, OtherModel class MyModelAdmin(models.admin): object_i_want =

Re: prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread nick.l...@gmail.com
ot help because you haven't > experienced this issue, or is it something you just don't have a > problem with? > > On Sep 14, 11:20 am, "nick.l...@gmail.com" <nick.l...@gmail.com> > wrote: > > Nick, > > > > I can answer you first question...but not really t

Re: prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread nick.l...@gmail.com
Nick, I can answer you first question...but not really the second...hopefully someone else will come and explain that one to you... re slugs: The prepopulated_fields are working as intended. The reason being, say you've written a blog post. You've send that link out to thousands and millions of

Re: user created variables

2010-09-14 Thread nick.l...@gmail.com
cool glad to help! :) On Tue, Sep 14, 2010 at 12:13 AM, pixelcowboy <pixelcowbo...@gmail.com>wrote: > I see what you are saying, thanks for the advice! > > On Sep 13, 12:10 pm, "nick.l...@gmail.com" <nick.l...@gmail.com> > wrote: > > The problem I see

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
gt; to validate, as in your first example maybe... but create a different > model for each different data type possibility? What do you about this > approach? > > On Sep 13, 9:27 am, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > > hmm ok I'm thinking out loud here :) &

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
f a diverse set of django model types? > Thanks again for your help. > > On Sep 13, 6:40 am, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > > That's fine...well for data types ad a field for types say an integer > field > > and when youcome across a new

Re: django join queries

2010-09-13 Thread nick.l...@gmail.com
Ok...context helps! :) Try reading this... http://docs.djangoproject.com/en/dev/topics/serialization/#deserialization-of-natural-keys I think that'll help get you where you need to go. n On Mon, Sep 13, 2010 at 2:19 PM, ashy wrote: > Hi Nick, > > I am trying to

Re: django join queries

2010-09-13 Thread nick.l...@gmail.com
Ashy, The question what do you want to do with the data is important. When you do Userdata.objects.all() you will get back all the data from both tables. How you access it is different. u = Userdata.objects.all()[0] u.user.name is going to return the name from the User model. u being the

Re: user created variables

2010-09-13 Thread nick.l...@gmail.com
ion structure > requires that users are able to add arbitrary variables to a > model.Thanks for your help! > > On Sep 12, 8:24 pm, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > > without knowing any context of what you want...or are going to do...I > would

Re: Change variable value after a click

2010-09-13 Thread nick.l...@gmail.com
you can do that, though not necessary. Your view needs to return the data necessary for ajax to write INTO the webpage. ie on the page you have: action adventure (click for more) when that user clicks, your view needs to return the "more"...(and really only the more and what ever info is

Re: import Error

2010-09-13 Thread nick.l...@gmail.com
python path. > Rav! > > On Fri, Sep 10, 2010 at 11:32 PM, nick.l...@gmail.com <nick.l...@gmail.com > > wrote: > >> Rav, >> >> There's an environmental variable called PYTHONPATH that often tripped me >> up when I was learning python and django

Re: trouble with Django install

2010-09-12 Thread nick.l...@gmail.com
oh forgot to add...to verify that Django was installed properly, start the python interpreter...then type: import django If it does not error then you're good to go. else...something went wrong. n On Sun, Sep 12, 2010 at 10:19 PM, nick.l...@gmail.com <nick.l...@gmail.com>wrote: &

Re: user created variables

2010-09-12 Thread nick.l...@gmail.com
without knowing any context of what you want...or are going to do...I would say create a similar model and run with it: class UserVariables(models.Model): variable_name = models.CharField(max_length=100) variable_value = models.TextField() THOUGH like I said, I have no idea what you're

Re: trouble with Django install

2010-09-12 Thread nick.l...@gmail.com
Sophi This is the simplest way to install Django: http://docs.djangoproject.com/en/dev/topics/install/?from=olddocs#installing-an-official-release If you follow the instructions about installing the offical release, then you won't need to worry about doing any linking (ie the ln -s command) n

Re: django achievements

2010-09-12 Thread nick.l...@gmail.com
Sweet! On Sun, Sep 12, 2010 at 5:30 PM, Joel Klabo <joelkl...@gmail.com> wrote: > that looks perfect, thanks. > > On Sep 11, 12:44 pm, "nick.l...@gmail.com" <nick.l...@gmail.com> > wrote: > > Not sure if this will help ya...but the guys at Eldarion have

Re: django achievements

2010-09-11 Thread nick.l...@gmail.com
Not sure if this will help ya...but the guys at Eldarion have brabeion for doing badges (awards). http://github.com/eldarion/brabeion That's all I got right now! n On Sat, Sep 11, 2010 at 12:26 PM, Joel Klabo wrote: > Does anyone know of an example of someone using django

Re: Change variable value after a click

2010-09-10 Thread nick.l...@gmail.com
I don't think you can do this with a view and NOT refresh the page. To get the functionality you want you need to use AJAX (and jquery would make it easier). do some research on how to use jquery to manipulate the dom and add HTML elments to the page live. There some jquery bits out there

Re: import Error

2010-09-10 Thread nick.l...@gmail.com
Rav, There's an environmental variable called PYTHONPATH that often tripped me up when I was learning python and django. You need to make sure that the django-chat module is on your PYTHONPATH. To check that you've properly added the app to your PYTHONPATH start up python then type `import