Sometimes table have more than one foreign key reference to other tables.
Then how to descript it in model?
For eg:
Table A:
create table A (
oid varchar(10) not null,
pid varchar(10) not null,
color varchar(20)
You are probably looking for a many-to-many relationship using an
intermediary table:
https://docs.djangoproject.com/en/1.8/topics/db/models/#intermediary-manytomany
-James
On Aug 6, 2015 3:06 AM, "Holland_zwz" wrote:
> Sometimes table have more than one foreign key reference to other tables.
>
Hi Abdulhakim,
I'm sorry that only now I saw your message. You are welcome to contribute
to Speedy Mail Software. I only use Sourceforge to find more developers, I
think I prefer to use Github for Git. If you have any questions, contact me
at u...@speedy.net
Thanks,
Uri.
*Uri Even-Chen* [image
Hi Stuart,
Are you interested in participating in writing code for Speedy Mail
Software? And thanks for the link to pyjs, I was not aware of this libraby.
So I guess we can just use it and we don't have to create it. I want to use
pyjs also for Speedy Mail Software. Please let me know if you can
p
Hi James,
Thanks for reply.
But i am not got the main point. The problem is the table C's oid column
data comes from A or B. I think this is not same as many-to-many
relationships.
Thanks
-hollandz
在 2015年8月6日星期四 UTC+8下午6:14:25,James Schneider写道:
>
> You are probably looking for a m
On Thu, Aug 6, 2015 at 8:18 AM, Holland_zwz wrote:
> But i am not got the main point. The problem is the table C's oid column
> data comes from A or B.
I don't think SQL works that way. at least, it's very much against
any normalization guideline.
--
Javier
--
You received this message be
Hi Everyone,
as some of you may already know, last week we release a new open source
tool.
Here is the link to that introduction post:
https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!topic/django-users/9DsIk9w7FGY
Today I announce the release of a new post with more detail
So, I'm trying to use inputs with the *hidden* attr. I have my form class (
*IndexForm*) that has this:
field = HiddenInput()
Then, I pass the instance of IndexForm (*index_form*) to the template, and
manually render the field (*index_form.field*). It is alright, but then, in
the HTML, the render
this is the url.py
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^', .newsletter.views.home, name="home") => this is the
line 20
# url(r'^admin/', include(admin.site.urls)),
error below
Exception Type: SyntaxError
I'd like to add a sidebar on the left side of all admin pages (including
change_list, change_details, etc), with a list of all my models. In
other words, I'd like to move the index with a list of models into a
sidebar on the left.
After poking around the docs and templates a bit, it seems that I'd
Hi Joey.
I was trying to understand your models, relationship and logic behind them.
How you are supposed to create a League object?
I tried creating as follows.
p=Player.objects.create(name='Shahid Afridi')
l=League(name='FootballDevils')
l.save() // not calling directly objects.create on Leagu
On Thu, Aug 6, 2015 at 2:03 PM, Matthew Yankey wrote:
> url(r'^', .newsletter.views.home, name="home")
.newsletter looks like import syntax, but this isn't valid in an expression
at the top include a line like
from .newsletter.views import home
and then the url entry becomes
url(r'^', ho
Дана Thu, 06 Aug 2015 16:39:41 -0300
"'Hugo Osvaldo Barrera' via Django users"
написа:
> I'd like to add a sidebar on the left side of all admin pages
> (including change_list, change_details, etc), with a list of all my
> models. In other words, I'd like to move the index with a list of
> models
I have 1 model from my django project up and running on django. Before
adding more models and content, I wanted to use my actual domain name,
instead of whatever.herokuapp.com. So after I got that straight, I realized
that while the home page was mysite.com, the links were still
mystite.herokua
@zubair: The reason Django complained about wanting to create the
LeaguePlayer intermediary model when you used "add()" is because you didn't
have auto_created=True. That allows Django to link the objects correctly
via the intermediary model automatically without populating any of the
extra fields
Look at "Sites" in the admin.
On Thu, Aug 6, 2015 at 5:03 PM, Malik Rumi wrote:
> I have 1 model from my django project up and running on django. Before
> adding more models and content, I wanted to use my actual domain name,
> instead of whatever.herokuapp.com. So after I got that straight, I
>
1. DNS doesn't really work that way in most situations. Your browser
should cache it, your computer should cache it (especially Windows),
and your upstream DNS (usually your router) should cache it. Your
computer literally stores 'mysite.com' = '1.2.3.4'. It doesn't store
it per-page, but for th
17 matches
Mail list logo