Re: Askani

2010-11-20 Thread Joseph (Driftwood Cove Designs)
Alvaro - this is a nifty idea - will save time and improve consistency. Opens up model proto-typing to non-Django, non-Python, maybe even non- programmer? Could be used for collaboration during model design - especially if it presents an ER'ish diagram as you build the data model. look forward t

Re: User model optional

2010-11-20 Thread Joseph (Driftwood Cove Designs)
You can - it's just Python, so you can do virtually anything - auth is a contrib module, so you can just choose not to use it. But the User model does a ton of work and is hooked into many other modules - including all the base auth layer you might want to build your custom authorization on top of.

Re: problems with model inheritance if base class is not abstract

2010-11-20 Thread Joseph (Driftwood Cove Designs)
Ramiro - you made my day. Somehow I missed this little tid bit in the docs - what a super handy feature!! thank you. On Nov 20, 4:36 pm, Ramiro Morales wrote: > On Sat, Nov 20, 2010 at 7:59 AM, marco.ferrag...@gmail.com > > > > wrote: > > Hi all! I'm new to django and I'm experimenting with mod

Re: database relationships, many to one

2010-11-20 Thread Joseph (Driftwood Cove Designs)
unless a dept. can belong to several Universities (?), Carlos has the right model. On Nov 20, 8:23 pm, Carlos Daniel Ruvalcaba Valenzuela wrote: > Depends on you requirements, you could have used a Foreign Key to the > University on the Department model and marking it as required, thus > there ca

Re: Multiple inheritance model

2010-11-20 Thread Joseph (Driftwood Cove Designs)
Below is the basic layout - I posted a simplified version of the two model classes here: http://pastebin.com/Xc3KLrQx ModelA.save(): if (some condition): super().save_base() else: super().save() ModelB.save(): is_new_model = pk == None super().save() if (is_new_model):

Re: database relationships, many to one

2010-11-20 Thread Carlos Daniel Ruvalcaba Valenzuela
Depends on you requirements, you could have used a Foreign Key to the University on the Department model and marking it as required, thus there cannot be a Department without university and set the related_name property on the ForeignKey to the "departments" so you can access University.departments

database relationships, many to one

2010-11-20 Thread Bruno Amaral
I have been trying to create a database for Universities, Departments and Courses. The idea is that a University has many departments, which in turn have one or more courses. So far, this model works: http://dpaste.com/277850/ With one caveat, it allows a department to exist without a University

Re: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/21 Huy Ton That : > Behaves the same way with Opera 10 and chrome. > click new model > typed in 'testmodel' > in testmodel added 'testfield'. doubleclicked on charfield testfield > clicked on model fields docs link > opens 9 tabs in background, hm, in chrome it was just 2... I could reprod

Re: [RFC] Askani

2010-11-20 Thread Huy Ton That
Behaves the same way with Opera 10 and chrome. click new model typed in 'testmodel' in testmodel added 'testfield'. doubleclicked on charfield testfield clicked on model fields docs link opens 9 tabs in background, hm, in chrome it was just 2... On Sat, Nov 20, 2010 at 9:11 PM, Alvaro Mouriño wr

Re: [RFC] Askani

2010-11-20 Thread RadicalEd
I didn't see it, thanks is an easy way. On Sat, Nov 20, 2010 at 9:11 PM, Alvaro Mouriño wrote: > 2010/11/20 Huy Ton That : > > From a visualizing data standpoint, I think it is very good. Model help > on > > the web opens three tabs though. For what it is intended for, I think it > is > > superi

Re: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 Huy Ton That : > From a visualizing data standpoint, I think it is very good. Model help on > the web opens three tabs though. For what it is intended for, I think it is > superior to a CLI. Hi. I couldn't reproduce the bugs you mention. Which link are you clicking on? There are two lin

Re: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 RadicalEd : > Is awesome, I will start an app tomorrow and I'll use it to make me the life > easier, I'm thinking in combox with the different types of data (CharField, > DateField, etc) When you create a field you can edit it by double-clicking it. In the edition dialog the system auto

Re: [RFC] Askani

2010-11-20 Thread Huy Ton That
>From a visualizing data standpoint, I think it is very good. Model help on the web opens three tabs though. For what it is intended for, I think it is superior to a CLI. On Nov 20, 2010 8:33 PM, "Alvaro Mouriño" wrote: 2010/11/20 rafael.nu...@gmail.com : > Didn't you consider a command-line to

Re: [RFC] Askani

2010-11-20 Thread RadicalEd
Is awesome, I will start an app tomorrow and I'll use it to make me the life easier, I'm thinking in combox with the different types of data (CharField, DateField, etc) On Sat, Nov 20, 2010 at 8:33 PM, Alvaro Mouriño wrote: > 2010/11/20 rafael.nu...@gmail.com : > > Didn't you consider a command-

Re: [RFC] Askani

2010-11-20 Thread Alvaro Mouriño
2010/11/20 rafael.nu...@gmail.com : > Didn't you consider a command-line tool to do that, like Rails scaffold? > Would be nice. Hi Rafael. Sorry but I never used Rails, I thought scaffolds were something different. Could you please explain your idea a little? Anyway, I think a graphical interfac

Re: problems with model inheritance if base class is not abstract

2010-11-20 Thread Ramiro Morales
On Sat, Nov 20, 2010 at 7:59 AM, marco.ferrag...@gmail.com wrote: > Hi all! I'm new to django and I'm experimenting with models but I have > some trouble. I've minimized my problem to this code: > > class TestBase(models.Model): >    base = models.CharField(max_length=255) > > from django.contrib

Re: problems with model inheritance if base class is not abstract

2010-11-20 Thread Michael Sprayberry
--- On Sat, 11/20/10, marco.ferrag...@gmail.com wrote: From: marco.ferrag...@gmail.com Subject: problems with model inheritance if base class is not abstract To: "Django users" Date: Saturday, November 20, 2010, 5:59 AM Hi all! I'm new to django and I'm experimenting with models but I hav

User model optional

2010-11-20 Thread VB
I'm interested in porting a custom CMS from Rails to Django. We currently have a User model and I would like to keep it intact, keep naming conventions, etc. So, two questions: If I intend to write my own authentication, can I use my define my own User model? Or, am I better off naming the model s

Pydoc and security

2010-11-20 Thread Robert S
Hi I'm trying generate documentation for a django project. The obvious tool is pydoc, which does work. The trouble is, pydoc publishes everything ... including passwords. Is there a simply way of controlling the output from pydoc? TIA -- You received this message because you are subscribed to

Re: representing a possible future object in a form?

2010-11-20 Thread derek
Preston Having not done this before (but maybe needing to soon...) the grid approach seems the best solution. Actually this is not really a Django issue per se; more a "mismatch" between the "excel-type" view and the underlying database reality. Django is just the middle-man, translating "filled-

Re: django-admin.py not functional on 64 bit Vista

2010-11-20 Thread michael11717
I just found the BitNami DjangoStack -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. Fo

Re: django-admin.py not functional on 64 bit Vista

2010-11-20 Thread michael11717
well, seems like the ole good-news/bad-news cliche: it would seem that you are correct, it does not seem to be a problem with version of windows; however I am still not able to get Django functioning on my Widows Vista the only version of Django that I was able to find to install was Django-1

Re: [RFC] Askani

2010-11-20 Thread rafael.nu...@gmail.com
Didn't you consider a command-line tool to do that, like Rails scaffold? Would be nice. On Sat, Nov 20, 2010 at 12:28 PM, Alvaro Mouriño wrote: > Hi. > > I'd like to introduce to you this idea I've been working on for the > last month, a django models generator: http://askani.net/ > > Field op

Re: Cache problem after new image uploaded?

2010-11-20 Thread mathphreak
Are you sure that time.time() is evaluating rather than just being text? If you're just appending "?rand=time.time()" to your page, then you'll be having the exact same problem. If you're appending "?rand=" + time.time() then you'll have better luck. On Nov 19, 12:02 pm, vcarney wrote: > Doing

[RFC] Askani

2010-11-20 Thread Alvaro Mouriño
Hi. I'd like to introduce to you this idea I've been working on for the last month, a django models generator: http://askani.net/ Field options definition it's repetitive. Writing meta options leads to inconsistent use due to the variety available. "Inspired" by the repetitiveness of coding djang

problems with model inheritance if base class is not abstract

2010-11-20 Thread marco.ferrag...@gmail.com
Hi all! I'm new to django and I'm experimenting with models but I have some trouble. I've minimized my problem to this code: class TestBase(models.Model): base = models.CharField(max_length=255) from django.contrib import admin class TestA(TestBase): testb = models.CharField(max_length=25

Re: Display ForeignKey label rather than ID in a CharField

2010-11-20 Thread Marcos Moyano
You need to specify the __unicode__ method of the model holding the Fish object. ie: class FishHolder(models.Model): name = models.CharField(...) . def __unicode__(self): return self.name That should display the names instead of the ids. Rgds, Marcos On Fri, Nov 19, 2010

Re: A Model to store links to other models

2010-11-20 Thread Micah Carrick
I had not seen the generic relationships and ContentType. I'm going to play with that a bit. Thanks everybody! 2010/11/20 Łukasz Rekucki > On 20 November 2010 02:51, Micah Carrick wrote: > > I'm having trouble coming up with a pretty solution to a seemingly simple > > task. I'm relatively new

Re: I have an idea for a new tag

2010-11-20 Thread ringemup
Is there a reason you wouldn't do the sorting in the view before passing it to the template? On Nov 19, 11:55 am, Paweł Roman wrote: > When rendering dictionary, there is absolutely no way to display > values sorted by keys. The only workaround is to copy all the dict > items to a sortable struc

Re: django charts

2010-11-20 Thread Darrel Herbst
I haven't used this, but this provides a way to interface with google charts: https://github.com/jacobian/django-googlecharts/blob/master/docs/examples.txt On Nov 19, 1:56 am, Priya wrote: > Hi, > I am a new user to django ,can anybody please help me resolve this > issue.I am trying to construct

Re: A Model to store links to other models

2010-11-20 Thread Łukasz Rekucki
On 20 November 2010 02:51, Micah Carrick wrote: > I'm having trouble coming up with a pretty solution to a seemingly simple > task. I'm relatively new to Django. > > I want to allow the end user to control various lists of links on the site > used for navigation. The admin should allow the creatio

Re: A Model to store links to other models

2010-11-20 Thread Mark (Nosrednakram)
Hello Micah, I'm not sure I understand what you're attempting to do but if so I'd look at using a foreign key to ContentType, and storing the pk for associating objects rather than a CharField. The key is using ContentType.model_class() to re-create the class. This allows you to store any object

Re: Multiple inheritance model

2010-11-20 Thread Marc Aymerich
On Sat, Nov 20, 2010 at 4:37 AM, Joseph (Driftwood Cove Designs) < powderfl...@gmail.com> wrote: > I'm trying to integrate two existing apps, both of which provide a > django Model - call them ModelA and ModelB - my app's model needs to > inherit from both of these. > I know django models support

Re: I have an idea for a new tag

2010-11-20 Thread Łukasz Rekucki
On 19 November 2010 19:53, Adam Hallett wrote: > Just a thought, what about: > > {% for k,v in mydict|order:'key' %} > > or > > {% for k,v in mydict orderby key %} Here's a quick hack that works right now: {% for k, v in mydict.items|dictsort:"0" %} {{ k }}: {{ v }} {% endfor %} > On Nov 19,

Conf/locale

2010-11-20 Thread Tsolmon Narantsogt
Hello fellows. I'm using Django 1.1 version. My goals is create multiple language site. I make po file myprojectname/conf/locale/mn/LC_MESSAGES/django.po and some msgid, msgstr. But it's don't work. My index.html {% load i18n %} {% get_current_language as LANGUAGE_CODE %} {% ge

Re: -bash: django-admin.py: command not found

2010-11-20 Thread Robbington
You are welcome Errit, Have fun Django-ing. :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegro

Re: Using the Django Admin to change a password.

2010-11-20 Thread Martin Melin
On Sat, Nov 20, 2010 at 10:44 AM, James Hancock wrote: > I have a strange problem and don't really know where to start looking to fix > it. Can someone point me in the right direction to figure this one out. > > > In the Admin interface when I try to use the  "change password form" on any > of my

Using the Django Admin to change a password.

2010-11-20 Thread James Hancock
I have a strange problem and don't really know where to start looking to fix it. Can someone point me in the right direction to figure this one out. In the Admin interface when I try to use the "change password form" on any of my users it gives me a "Page not found (404) Request Method:GET