rvisors, and in turn supervisors in
>> themselves can report to their respective supervisors... I developed the
>> following models, but was curious if there might be a better way to do this:
>>
>> class Supervisor(models.Model):
>> supervisor = models.OneToOneField(User)
isors, and in turn supervisors in
> themselves can report to their respective supervisors... I developed the
> following models, but was curious if there might be a better way to do this:
>
> class Supervisor(models.Model):
> supervisor = models.OneToOneField(User)
> def __un
isors, and in turn supervisors in
> > themselves can report to their respective supervisors... I developed the
> > following models, but was curious if there might be a better way to do
> this:
>
> There will be a few different opinions on this ... here's mine:
>
> class Empl
advantage of django's built-in
contrib.auth package.
In Short, employees report to supervisors, and in turn supervisors in
themselves can report to their respective supervisors... I developed the
following models, but was curious if there might be a better way to do this:
There will be a few
-in contrib.auth
package.
In Short, employees report to supervisors, and in turn supervisors in
themselves can report to their respective supervisors... I developed the
following models, but was curious if there might be a better way to do this:
class Supervisor(models.Model):
supervisor
github.com/0951804f4592c970b18b
> >
> > My thoughts are to use something like Django's pagination [1]
> > https://docs.djangoproject.com/en/1.4/topics/pagination/
> >
> > Is there a better way to do this???
> >
> > Thanks!
> >
>
>
&g
ke Django's pagination [1]
> https://docs.djangoproject.com/en/1.4/topics/pagination/
>
> Is there a better way to do this???
>
> Thanks!
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
/topics/pagination/
Is there a better way to do this???
Thanks!
--
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 this group, send email to
django-user
One of my problems, as Steven mentioned in the thread above this post,
is that I have to be very specific with URLs in my current setup.
For example, site2.domain.com uses the same Django install as
site1.domain.com, but a different application. As a result, in the
urlconf I have to have
Your probably better off with three separate VirtualHosts in your case.
They can point to the same django project but use different settings files
with a different SITE_ID for each one. This would allow you to utilize the
built in Sites framework.
On Wed, Apr 14, 2010 at 7:08 PM, Steven Degutis
If you don't mind me jumping in here, I have a followup question (related
context: I'm a django newb, this is day 3 for me) -- if you use ServerAlias,
how do you specifically set django to recognize the different subdomains
when a website is accessed? The urlpatterns seem to only match everything
I'm assuming you are running all three of these projects on the same
machine. You can use the ServerAlias directive in your config. It would
look something like this
ServerName host1.domain.com
ServerAlias host2.domain.com host3.domain.com
DocumentRoot /var/www/whatever/
WSGIScriptAlias
Hello,
I have multiple virtual hosts pointing to the same Django project.
So something like:
host1.domain.com
host2.domain.com
host3.domain.com
each point to the same Django project because although it was required
that host1 host2 and host3 should get their own hostnames, none of web
apps the
On Wed, 2007-12-05 at 20:02 -0800, globophobe wrote:
[...]
> class Stack(models.Model):
> title = models.CharField(max_length=100)
> description = models.TextField()
>
> def __unicode__(self):
> return self.title
>
> class Card(models.Model):
> stack =
On Dec 6, 10:29 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2007-12-05 at 15:34 -0800, globophobe wrote:
> Probably an easier question to answer if we could see the models
> involved (and perhaps an English description of what you are wanting to
> achieve). My gut feeling is that
On Wed, 2007-12-05 at 15:34 -0800, globophobe wrote:
> I've read the documentation. I admit to being more than a little
> deficient with databases. Can anybody suggest a better way?
>
> if len(study) < 20:
> exclude = user.study_set.filter(stack=stack).values('card')
> cards =
I've read the documentation. I admit to being more than a little
deficient with databases. Can anybody suggest a better way?
if len(study) < 20:
exclude = user.study_set.filter(stack=stack).values('card')
cards = stack.card_set.exclude(id__in=[i.get('card') for i in
Thanks Russ. Is there a way to have a multiple select drop down
without using a m2m and a filter?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
First, thanks for your opinons.
Tim:
This was what I did the first way I did it, because it didn't make
sense to me to have a table that is just going be used for a lookup.
However, with that option, I didn't get the option to do a multiple
select on the days. If a flight is only on sunday or
You can use choices for the Frequency model, if you like. It may
simplify things.
DAY_CHOICES = (
('Sa', 'Saturday'),
('Su', 'Sunday'),
('Mo', 'Monday'),
('Tu', 'Tuesday'),
('We', 'Wednesday'),
('Th', 'Thursday'),
('Fr', 'Friday'),
)
class Frequency(models.Model):
On 8/22/06, Burhan <[EMAIL PROTECTED]> wrote:
Now this does work, but is there a better way to get the same result?Erm Yes :-). However, it is a little difficult to establish what facet of your application you want to have critiqued. You have presented a very large model and view, without any
Hello Everyone:
I am trying my luck with django again, and I found a way to show a
list of related objects in a many-to-many relationship, using the
following model and view:
Model
# Flight Frequency
class Frequency(models.Model):
day_translated = {'Sa': 'Saturday', 'Su': 'Sunday',
22 matches
Mail list logo