Re: AutoField field that increments with regards to a foreign key?

2010-10-21 Thread orokusaki
Correction: I meant for the third ticket to have pk: 3. On Oct 21, 3:18 pm, Yo-Yo Ma wrote: > Example: > > Company has many Tickets > Tickets have a PK, as well as a "number". > Each Ticket's "number" should be the highest prior "number" for a > Ticket with the same

Can you make a subclass of a model just to alter behavior?

2010-09-30 Thread orokusaki
I'm looking to do the opposite of what Django's proxy model does. I want to subclass Model, add some extra methods to it, add behavior to save(), set a default manager that adds some my-application-specific methods, and then subclass that to create most of the models in my application. Is this

Re: What is the best way to manually create an HTML form from a ModelForm

2010-08-23 Thread orokusaki
yle them, etc. and then pass the field as the argument: > > {% my_inclusion_tag form.first_name %} > > On Aug 22, 10:47 pm, orokusaki <flashdesign...@gmail.com> wrote: > > > Normally, I would do something like this: > > > {% for field in form.fields %} > &

What is the best way to manually create an HTML form from a ModelForm

2010-08-22 Thread orokusaki
Normally, I would do something like this: {% for field in form.fields %} {% field %} {% endfor %} What if I need: {% one field %} Some Title {% another field %} I want to be able to still use model forms and I don't want to hard code {% if field == "email"

Re: Random

2010-06-22 Thread orokusaki
Name each person's files using: import uuid filename = uuid.uuid4() On Jun 22, 11:30 am, Waleria wrote: > my application doesn't use DBnot able to do this without using the > Random? ... without DB? > > On 22 jun, 14:22, Javier Guerra Giraldez

Re: Question regarding subdomains of a single project

2010-06-22 Thread orokusaki
Oh my god! Thanks Dan. I didn't know you could do this. That is absolutely perfect. Mark On Jun 22, 9:38 am, Dan Harris wrote: > Check out this from djangosnippets:http://djangosnippets.org/snippets/1509/ > > It allows you to specify multiple URLconfs and then choose which

Re: Media Server

2010-04-03 Thread orokusaki
hn make a call urlopen().read() to fetch the file   > from different server. > > Enpaksh Airon > Sent from my iPhone > > On Apr 2, 2010, at 3:20 PM, orokusaki <flashdesign...@gmail.com> wrote: > > > > > On Apr 2, 11:30 am, Dexter <a.essel...@gmail.com> wro

Re: django authentication system

2010-04-02 Thread orokusaki
You have to use ``auth.models.User`` if you want to enjoy all the benefits of the auth system. Just create a model and make a onetoone to User. On Apr 2, 8:22 am, Heit wrote: > Hello, > > I'm newbie in django, reading documentation i understood that django >

Re: Media Server

2010-04-02 Thread orokusaki
On Apr 2, 11:30 am, Dexter wrote: > Hi, > > Can someone please > > explicitly specify what needs to go in MEDIA_URL and MEDIA_ROOT and > > how does urls.py routes to a cross domain media server. I am not > > interested in any local directory structure to accomplish this task

Re: How to use CommaSeperatedIntegerList with CheckboxSelectMultiple

2010-04-02 Thread orokusaki
The problem is that you're using '1' instead of 1. The comma separated integer list is expecting integers not strings. The reason you're seeing u'1' is because it's being turned from a string to a unicode object. Try this instead: SOME_CHOICES = ((1, 'ch1'),(2, 'ch2'), (3, 'ch3'),(4, 'ch4'))

Re: Using a template twice on the same page

2010-04-02 Thread orokusaki
Hey Matt, If you're trying to use the same template twice in the same request, you might want to reconsider a few things about the design, such as: You may want to use an include instead, or you may want to use a loop inside your template. Either way, here's one way to achieve that if I'm simply

Re: SAAS User and Auth situation.

2010-02-22 Thread orokusaki
@Wes The only problem with using email addresses is that a person could have a User on multiple different accounts and this would not allow for that, unless there was some sort of one-login-to-rule-them- all situation, which there won't be. Imagine a hosted CMS called "Super CMS". A single web

Re: SAAS User and Auth situation.

2010-02-22 Thread orokusaki
@Daniel Thanks for muaccounts. I don't know if it'll work because it appears to be coupled to sub domains ( which I may or may not use ). I'll have to dig more into it later tonight. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Toggle TinyMCE in admin

2010-02-22 Thread orokusaki
I think you can do this by adding the exact HTML that you need into the label field for a form (I can't remember if you have to explicitly turn off HTML filtering though, check the docs to be sure). I would just put Toggle The id_tag_of_field is of course available dynamically. -- You received

SAAS User and Auth situation.

2010-02-21 Thread orokusaki
I'm developing an SAAS which means that I will have Accounts and those Accounts will have Users. Each account's Users are completely orthogonal to the Users of another Account. When a user logs in, they'll supply an Account ID, a username, and a password so username only needs to be unique with

Re: Integrity error handling

2009-05-27 Thread orokusaki
In your form sub-class class you'll need to override the clean method to check for duplicate entries and raise a validation error if they exists: from somewhere import models from somewhere import forms class myForm(forms.ModelForm): some_unique_field = forms.CharField() class