Can you pls elaborate or have any working code
On Sat, 10 Aug, 2019, 9:40 PM Andrew C., wrote:
> Two options:
>
> 1) Save the JSON files and link it with a FileField
>
> 2) Use PostgreSQL’s Django-specific JSONField.
>
> On Sat, Aug 10, 2019 at 9:46 AM Suraj Thapa FC
> wrote:
>
>> How can I
Two options:
1) Save the JSON files and link it with a FileField
2) Use PostgreSQL’s Django-specific JSONField.
On Sat, Aug 10, 2019 at 9:46 AM Suraj Thapa FC
wrote:
> How can I linked a JSON file with my db... Json files contains the key
> value pair of the user data..
> If the id in the db
On Tue, May 7, 2019, 12:35 PM Soumen Khatua Hi Folks,
>
> I didn't understand this code please help me to understand this code.
>
> class AddressQueryset(models.QuerySet):
> def annotate_default(self, user):
> # Set default shipping/billing address pk to None
> # if default
Yes,You are right as_data is custom made function inside the same
class,here is the code:
def as_data(self):
"""Return the address as a dict suitable for passing as
kwargs.Result does not contain the primary key or an associated user."""
data =
Soumen,
The function looks to compare two Address objects. The as_data() call is
custom made. I saw it documented in your other post. It removes the Primary
Key and User from the Address object. I presume this is so they can compare
the hash of one address to the hash of another.
Regards,
Joe
Hi,
The error is pretty self explanatory.
There is a missing migration file:
(u'training_kits', u'0003_auto_20160914_0722')
So check your training_kits app for a migration that is called
0003_auto_20160914_0722.py.
This migration is a dependency for the migration:
hi guys, i need your help
when i run makemigrations command, i got error:
django.db.migrations.exceptions.NodeNotFoundError: Migration
task_types.0004_tasktype_training_kit dependencies reference nonexistent
parent node (u'training_kits', u'0003_auto_20160914_0722')
On Fri, Aug 10, 2018 at 8:21
Hi Ramandeep,
The problem is pretty much the same as before: Mismatched parentheses, but I'll
leave to you to figure out where. It's pretty easy to spot.
Did you find an editor that helps you syntax check python code?
It'll make your life a lot easier.
Kind regards,
Kasper Laudrup
On August
thanks i got my mistake but now again i am getting an error.
my urls.py:
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView
from rest_framework_nested import routers
from rest_auth.views import LogoutView
from
Hi Ramandeep,
On 08/10/2018 07:36 AM, Ramandeep Kaur wrote:
> strange thing is that it indicates the error in line 395 which is in
> the end where i dont write any code.
It looks like your error is not closing the call to url() here:
url('^api/v1/calls/beneficiary/(?P\w+)/$',
#
lto:django-users@googlegroups.com>>
[mailto:django-users@googlegroups.com
<mailto:django-users@googlegroups.com>
<mailto:django-users@googlegroups.com
<mailto:django-users@googlegroups.com>>] *On Behalf Of
<mailto:django-users@googlegroups.com
<mailto:django-users@googlegroups.com>>
[mailto:django-users@googlegroups.com
<mailto:django-users@googlegroups.com>
<mailto:django-users@googlegroups.com
Hi Ramandeep,
On 08/09/2018 09:57 AM, Ramandeep Kaur wrote:
hi kasper,this is my settings.py
What you have added to your settings.py doesn't make any sense. It is
not valid Python code as your Python interpreter correctly tells you. I
have no idea what you tried to achieve by writing
import os
import sys
from django.core.exceptions import ImproperlyConfigured
from .base import *pip install django-generate-secret-key
def get_env_variable(var_name):
try:
return os.environ[var_name]
except KeyError:
error_msg = "Set the %s environment variable" % var_name
raise
Hi Ramandeep,
On 08/09/2018 09:25 AM, Ramandeep Kaur wrote:
when i run my manage.py server its giving me invalid syntax error.
File "C:\Users\Dell\vms2\vms2\settings\base.py", line 18
from .base import *pip install django-generate-secret-key
^
SyntaxError: invalid
ret key but its again giving me the same errror.
>>> django.core.exceptions.ImproperlyConfigured: The SECRET_KEY
>>> setting must not be empty.
>>>
>>
>> Try running the migrations command with the settings option so
>> manage.py can find
/settings/#secret-key>
*From:*django-users@googlegroups.com
<mailto:django-users@googlegroups.com>
[mailto:django-users@googlegroups.com
<mailto:django-users@googlegroups.com>] *On Behalf Of
*Ramandeep Kaur
*Sent:* Wednesday, August
.com [mailto:django-users@
> googlegroups.com] *On Behalf Of *Ramandeep Kaur
> *Sent:* Wednesday, August 8, 2018 8:50 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: django models
>
>
>
> I am new at Django so I don't know how to create secret key. please
> exp
@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Ramandeep Kaur
Sent: Wednesday, August 8, 2018 8:50 AM
To: django-users@googlegroups.com
Subject: Re: django models
I am new at Django so I don't know how to create secret key. please explain me.
On Wed, Aug 8, 2018, 1:20 PM Gerald Brown
I am new at Django so I don't know how to create secret key. please explain
me.
On Wed, Aug 8, 2018, 1:20 PM Gerald Brown wrote:
> The last line of the error message tells you what to do. Create a Secret
> Key in your settings.py file because it says it is now empty.
>
> On Wednesday, 08
You must have removed the secret key in settings.py file, try re-adding
that secret key, then it should work just fine
On Tuesday, August 7, 2018 at 10:17:00 AM UTC-7, Ramandeep Kaur wrote:
>
> My question is that how to delete models in django?
>
--
You received this message because you are
The last line of the error message tells you what to do. Create a
Secret Key in your settings.py file because it says it is now empty.
On Wednesday, 08 August, 2018 02:43 PM, Ramandeep Kaur wrote:
when i run this ./manage.py makemigrations it gives some error. Don't
know what to do.
when i run this ./manage.py makemigrations it gives some error. Don't know
what to do.
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 353, in
Just delete the code in models.py and run ./manage.py makemigrations and
./manage.py migrate.
On Wednesday, 08 August, 2018 01:14 AM, Ramandeep Kaur wrote:
My question is that how to delete models in django?
--
You received this message because you are subscribed to the Google
Groups "Django
> On Aug 7, 2018, at 10:14, Ramandeep Kaur wrote:
>
> My question is that how to delete models in django?
Do you need to delete a model *class*, or a model *instance*?
--
-- Christophe Pettus
x...@thebuild.com
--
You received this message because you are subscribed to the Google Groups
Wow, Derek what a great link. Thanks very much.
Ken
On Friday, May 27, 2016 at 4:47:56 PM UTC+2, Derek wrote:
>
> There a number of designs for similar situations online; a quick Google
> showed me:
>
> * http://www.databasedev.co.uk/student_courses_data_model.html
> *
There a number of designs for similar situations online; a quick Google
showed me:
* http://www.databasedev.co.uk/student_courses_data_model.html
* http://databaseanswers.org/data_models/
And I am sure there are more...
If this is your first project. I would not be too fussed about making it
simplest way is using filter() against all()
Take a look at
https://docs.djangoproject.com/en/1.9/ref/models/querysets/
Many thanks,
Serge
+380 636150445
skype: skhohlov
On Fri, May 6, 2016 at 5:27 PM, Omar wrote:
> Gretting, I have in my DataBase (Directorios)
On 21/03/2016 7:29 PM, Amine Yaiche wrote:
Hi everyone,
Given a field in a model that uses choices:
|
CHOICES =(
  (0,"choice_0"),
  (1,"choice_1")
)
foo =models.IntegerField(choices=CHOICES)
|
If i put a value other than 0 or 1, django will accept it. Is that
possible that we
The choices don't enforce any default validation. But if you are populating
the data from a http call then use ModelForm they show the invalid_choice
error message on entering value other than defined choices
On Mon, Mar 21, 2016 at 1:59 PM, Amine Yaiche wrote:
> Hi
creating a sharing manytomany field is right but how to call it in views
and verify that user filled in the form exists?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
On 11/12/2015 5:00 AM, Vasu Dev Garg wrote:
models.py :
 `class Document(models.Model):
   docfile = models.FileField(upload_to='documents/%Y/%m/%d')
   user = models.ForeignKey(User, null=False, blank= False)
`
I have created a model for file upload as shown above. docfile is the
Hello,
I'd personally keep it all in one model for as long as possible. It will
really simplify queries and it should make your code a lot cleaner. Wait
til you have some actual performance problems before splitting the models
up.
Collin
On Wednesday, October 14, 2015 at 12:11:55 PM UTC-4,
I think you shoud use ForeignKey.
2015-09-17 23:49 GMT+08:00 周建华 :
> I have design the base model like this:
>
> class User
> some user attr
>
> class UserGroup
> some user_group attr
>
> class Asset
>...
>
> class AssetGroup
>...
>
>
> I want to authorize
Thanks, I eventually solved it by using django to generate the models i
believe it was because i was defining the db_column in the primary key and
django said whatever, so when inspectdb built the models file it took that
out and it started to work.
On Wednesday, July 16, 2014 12:28:27 PM
Hi there,
you are telling django, you know what you are doing via
managed = False -> no batteries included, please read the details here
https://docs.djangoproject.com/en/dev/ref/models/options/
There are great books out there explaining django from
other perspectives than the online
so I added a db trigger in oracle and it still said the same thing when
ever I tried to save the new addition. Also whenever I try to go to an
existing vm the manytomany field throws an exception that table or view
doesn't exist but when I goto add new it doesnt and the correct field is
On Tue, Jul 15, 2014 at 11:16 PM, G Z wrote:
> Tom,
>
> It fails with both autofield and bigintergerfield
>
> class License(models.Model):
>license_id = models.AutoField(primary_key = True, editable = False,
> db_column='license_id')
>license_authority_id =
http://www.oracle.com/technetwork/articles/dsl/vasiliev-django-100257.html
the guide I followed from oracle.
On Tuesday, July 15, 2014 4:16:54 PM UTC-6, G Z wrote:
>
> Tom,
>
> It fails with both autofield and bigintergerfield
>
> class License(models.Model):
>license_id =
Tom,
It fails with both autofield and bigintergerfield
class License(models.Model):
license_id = models.AutoField(primary_key = True, editable = False,
db_column='license_id')
license_authority_id = models.ForeignKey(License_authoritie, on_delete =
models.PROTECT,
On Tue, Jul 15, 2014 at 10:23 PM, G Z wrote:
> So I have a database that we are using to collect vm statistics. It is
> always running and writing to a django database.
> I built my models file to resemble the db. However I have run into quite a
> few issues. I was wondering if
I can update items just not add them always the same error cannot insert
null for the primary key
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Thanks for this reply , am not using anybody's code. I am still studying
django and was wondering where those fields where from. Thanks for the
clarification. With time i will write my own field since am from Cameroon.
On Tuesday, June 3, 2014 2:16:37 AM UTC+1, Andrew Farrell wrote:
>
> Hi Mr.
Hi Mr. Akumbo,
The options for Model Fields that come with django in the django.db library
and are listed and explained here:
https://docs.djangoproject.com/en/dev/ref/models/fields/#model-field-types
Each corresponds to a different type of data. For example
name =
On Sunday, June 1, 2014 7:42:13 PM UTC+1, Thomas wrote:
>
>
> On 2014-05-31, at 4:41 AM, ngangsia akumbo > wrote:
>
> please i need some legit answer please
>
>
> Please give one or two specific examples of functionality you need. There
> are parameters for fields which
On 2014-05-31, at 4:41 AM, ngangsia akumbo wrote:
> please i need some legit answer please
Please give one or two specific examples of functionality you need. There are
parameters for fields which can help specialize some behaviours without needing
a new model. And there
On 16-7-2012 3:26, croberts wrote:
> I am familiar with the use of Field.choices for text.
Then that's all you need. Let the template handle the image rendered:
EMO_CHOICES = (
('smiley_sad.png', 'sad sad emo'),
('smiley_neutral.png', 'ask me later'),
На Sun, 15 Jul 2012 18:26:02 -0700 (PDT)
croberts написа:
> I am familiar with the use of Field.choices for text.
>
> However, I'd like the same option for images. Is this possible? I
> want users to select one image from a list of 3 and be able to save
> this. They
Hi all!
The issue was not from Django side, but really from my models
implementation.
I made mistake when propagating my associative tables through other tables.
And there was another unity constraint blocking the one i wanted to set.
I don't think it's necessary to explain you all here,
Hi,
Using a form did the trick, I did however have a issue with datetime
formats. It appears the formats I got from the string values are not
recognized.
This sorted me out with that:
from dateutil import parser
if str(Customer._meta.get_field("pastel_"+col).get_internal_type())
On Fri, May 11, 2012 at 12:39 PM, Michael da Silva Pereira
wrote:
>
> Hi,
>
> Looking for some ideas around a type / conversion matching
> issue I'm having with a big django model.
> The model has tons of variables, and all being of different types
> (int, nullbool, date,
ok got it. I read the document and it was good stuff.
Just got confused with copying pasting into my models.py. Thanks alot once
again.
:)
Best Regards,
Stanwin Siow
On Jan 30, 2012, at 10:02 PM, Michael Elkins wrote:
> On Mon, Jan 30, 2012 at 09:53:18PM +0800, Stanwin Siow wrote:
>> but
On Mon, Jan 30, 2012 at 09:53:18PM +0800, Stanwin Siow wrote:
but once my terminal creates the model classes do i have to copy it into my
app's model.py?
yes, you will need to copy the output to your models.py. you may
need to edit it to put the models in order so that dependencies
like
sorry to bother you again michael
but once my terminal creates the model classes do i have to copy it into my
app's model.py?
I wanted to be sure.
Best Regards,
Stanwin Siow
On Jan 30, 2012, at 9:35 PM, Michael Elkins wrote:
> On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:
Thank you so much.
This information is very useful. It work like a charm for me.
Thank you once again mike. Cheers
Best Regards,
Stanwin Siow
On Jan 30, 2012, at 9:35 PM, Michael Elkins wrote:
> On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:
>> However what does this error
On Mon, Jan 30, 2012 at 09:26:10PM +0800, Stanwin Siow wrote:
However what does this error say?
ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.
If you have a manage.py for your project, you can just run
"manage.py inspectdb" and it
hi michael,
Thanks for the tip. It is a huge step in my progress.
However what does this error say?
ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.
Best Regards,
Stanwin Siow
On Jan 30, 2012, at 8:37 PM, Michael Elkins wrote:
>
On Mon, Jan 30, 2012 at 04:13:50AM -0800, St@n wrote:
How do i ask django to query for a table that is already created in
the database but not part of the models.py?
the models.py is used to described the database and to create tables
with that models.py. However i already have my tables
Thank you very much!
I choose the first option for now.
If I have any problems, I will write them here
On Oct 17, 2:51 pm, Stuart wrote:
> Hello Omer --
>
> I believe you have two options. You could use the AttributeValue
> approach I described earlier. You could add
Hello Omer --
I believe you have two options. You could use the AttributeValue
approach I described earlier. You could add features to take care of
'data types' and the like. The work may be quite tedious, but it has
the advantage of not being clever. In other words, you would do the
work to
I should also mention that one AttributeValue table for all the
registrations isn't good for my purpose, because it says that the
Value column must have a specific type field. I want that every detail
(Atrribute) will have the option to be from any field type
(CharField,DateTimeField, etc).
On
Thank you for the response.
As stuart wrote, i should give more details about the website.
Currently let's suppose I have 2 interesting tables (I'm not sure that
the relationship between these 2 tables is well designed):
1. Details, that contains all the possible information that should be
Hello omerd --
If you give some concrete examples of what you are trying to do,
including providing your current models.py code, it will make it
easier for us to help you.
Since you have Registration and Details models, I am assuming you want
the user to be able to create/define these items,
> When you define an abstract model, you have to define the ``abstract''
> property inside its
> Meta.http://docs.djangoproject.com/en/1.2/ref/models/options/#abstracthttp://docs.djangoproject.com/en/1.2/topics/db/models/#abstract-base-...
>
> That way your abstract class can inherit models.Model
> If I have my abstract super classes inherit models.Model, things
> technically can work. However, I arrive with a rather overly complex
> SQL design generated from them (like needless tables for abstract
> super classes).
>
> On the other hand, if I have my abstract super classes NOT inherit
>
Use related_name
(http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.related_name)
Rgds,
Marcos
At Tue, 9 Nov 2010 07:20:45 -0800 (PST),
luckrill wrote:
>
> I write following models:
>
> class article(models.Model):
> created_by = models.ForeignKey('User')
You can:
1) redefine your sa models in django models.py
2) use sqlalchemy-migrate for database migration and initial data
population, I never used json for initial data with migrate
drakkan
On 26 Ago, 17:29, ajay wrote:
> HI,
> I have used sqlalchemy for database
On Thu, Feb 19, 2009 at 7:45 AM, madhav wrote:
>
> I have a model something like this:
> class CandidateEmailMessage(models.Model):
>from_email = models.EmailField(max_length=100)
>to_email = models.EmailField(max_length=100)
>body = models.TextField()
>
On Thu, Jan 8, 2009 at 7:08 PM, rabbi wrote:
>
> Thanks Karen,
> I actually deleted the thread soon after posting it as I came across
> what you have written above.
> Somehow you still managed to reply to a deleted thread though...?
> Impressive
>
I don't use the Google
Thanks Karen,
I actually deleted the thread soon after posting it as I came across
what you have written above.
Somehow you still managed to reply to a deleted thread though...?
Impressive
On Jan 9, 1:04 am, "Karen Tracey" wrote:
> On Thu, Jan 8, 2009 at 12:06 PM, rabbi
On Thu, Jan 8, 2009 at 12:06 PM, rabbi wrote:
>
> Hi,
> I have a question that is probably very simple to answer.
>
> class Example(models.Model):
>value = models.CharField(max_length=200)
>related_examples = models.ManyToMany
>
Alright thanks a lot.
On Dec 22, 3:06 pm, bruno desthuilliers
wrote:
> On 22 déc, 17:10, kev wrote:
>
>
>
> > Hello,
> > Im reading a django book and it adds friends to user authentication
> > system by making:
>
> > (was .96)
>
> > class
On 22 déc, 17:10, kev wrote:
> Hello,
> Im reading a django book and it adds friends to user authentication
> system by making:
>
> (was .96)
>
> class Friendship(models.Model):
> from_friend = models.ForeignKey(
> User, related_name='friend_set'
> )
> to_friend
I see what you are saying but there are few drawbacks:
1) 2 queries instead of one.
2) When you combine into friends_all or something, you need to keep
track of which was friend vs which is user.
I was thinking more on the lines of this:
Each User has a UserProfile which i defined. In
The way I was thinking of doing it was to have two foreignkeys named
friend1 and friend2 then when you do your list you could run
(something like)
friends = Friendship.objects.get(friend1__exact=user)
and
friends2 = Friendship.objects.get(friend2__exact=user)
Then you have a complete instance
Hmm..
def __unicode__( self ):
return "%s" % self.team1 # if Teams model has its own __unicode__
method
On Jun 7, 5:34 pm, nikosk <[EMAIL PROTECTED]> wrote:
> Hi all
>
> Does anyone know how to do something like this :
>
> class Game(models.Model):
> team1 = models.ForeignKey(Teams,
ups i think
return Teams.objects.get(self.team1_id).name
will be better :)
Sebastian Bauer pisze:
> try this:
>
> return Teams.objects.get(self.team1).name
>
>
> nikosk pisze:
>
>> Hi all
>>
>> Does anyone know how to do something like this :
>>
>> class Game(models.Model):
>> team1 =
try this:
return Teams.objects.get(self.team1).name
nikosk pisze:
> Hi all
>
> Does anyone know how to do something like this :
>
> class Game(models.Model):
> team1 = models.ForeignKey(Teams, related_name=u'team_home')
> team2 = models.ForeignKey(Teams , related_name=u'team_away')
>
So, if I add a ForeignKey field to my model it simply add a
"related_model_id" column to my table, let me ask something, how django
enforce that when I add a repeated value to that field it will an error, I
mean, a foreign key value that does not exist in the original table in a one
to many
Hi Jos�,
As the documentation says, the best alternative right now is to set a
ForeignKey from one of the models to the other, on which you should
place the ForeignKey really depends on every specific case, normaly it
should go to the one that "cannot live with the other" (hence, the
dependent
On 4/10/07, Norjee <[EMAIL PROTECTED]> wrote:
>
> Quite often there has been talk about using SqlALchemy in Django, but
> as far as I'm aware there is no implementation yet.
>
> For me, replacing Django's model is definitely too ambitious, so I
> tried the next best thing, use Django's model
I now sort of do what you proposed. I override the init. But for the
attributes that I want to keep track of I create create a property.
Then it's a matter of counting how often it has been accessed. Now I
just need inherit from both Model and DateTimeFieldHelper :)
I now sort of do what you proposed. I override the init. But for the
attributes that I want to keep track of I create create a property.
Then it's a matter of counting how often it has been accessed. Now I
just need inherit from both Model and DateTimeFieldHelper :)
On Thu, 2007-03-15 at 08:37 +1100, Malcolm Tredinnick wrote:
> On Wed, 2007-03-14 at 20:26 +, Norjee wrote:
> > Imagine the following model:
> >
> > class Article(models.Model):
> > title = models.IntegerField()
> >
> > Then when you do case 1):
> > art = Article.objects.get(pk=1)
> >
Thanks, I was hoping I was overlooking some Django internals, but
apparently not ;) I'll just stick to using two queries.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
Assuming you've got a 'mydate' attribute:
mydate = models.DateField(null=True)
You can conditionally assign it if null:
import datetime
art = Article.objects.get(pk=1)
if not art.mydate:
art.mydate = datetime.date.today()
art.save()
--
Jeff Bauer
Rubicon, Inc.
On Wed, 2007-03-14 at 20:26 +, Norjee wrote:
> Imagine the following model:
>
> class Article(models.Model):
> title = models.IntegerField()
>
> Then when you do case 1):
> art = Article.objects.get(pk=1)
> art.title = "New title"
> art.save()
>
> or case 2):
> art =
bayerj wrote:
> As soon as I change my database schema, I have several possibilites to
> get my app up again:
> (a) Change the model. Then drop the current db schema, fire up the new
> one. Drawback: I lose my data.
> (b) Change the model and change the schema manually. Drawback: I am
> repeating
This seems very promising to me. Although I personally would be more
comfortable with sql being the root of datastructures, this would be
against django's philosophy.
I'm looking forward to the implementation!
--~--~-~--~~~---~--~~
You received this message
On 8/20/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> There's a Google Summer of Code project going on at the moment to
> support model evolution throughout a project's development. I haven't
> played with it, but I've heard it's coming along.
Actually, we've got a new tune: there's a *finished*
On Sun, 2006-08-20 at 09:43 -0700, bayerj wrote:
> As soon as I change my database schema, I have several possibilites to
> get my app up again:
> (a) Change the model. Then drop the current db schema, fire up the new
> one. Drawback: I lose my data.
> (b) Change the model and change the schema
On Sun, 2006-08-20 at 09:43 -0700, bayerj wrote:
> (b) Change the model and change the schema manually. Drawback: I am
> repeating myself.
Personally, I prefer this method. Yes, I am repeating myself, but I'm
still saving time by not re-importing or re-entering the data. At first
I didn't like
Hi Justin,
On 20 Aug 2006, at 18:43, bayerj wrote:
> As soon as I change my database schema, I have several possibilites
> to get my app up again:
> (a) Change the model. Then drop the current db schema, fire up the
> new one. Drawback: I lose my data.
> (b) Change the model and change the
I'm a beginner, but I would do like this:
class Reservation(models.Model):
properties=model.CharField(maxlength=7,primary_key=True)
class Restaurant(models.Model):
name=models.CharField(maxlength=30,primary_key=True)
reservations=models.ForeignKey(Reservation)
class
94 matches
Mail list logo