Can you share your settings.py file? I think the app that you have created
is not listed under the INSTALLED_APPS section there.
On Wed, Aug 5, 2020 at 5:46 PM atul anand wrote:
> Hi All,
>
> I am new to Django. I want to create tables by using models.
> I have tried to follow this link:
>
I would be tempted to hook the admin site directly into the website.
Django's admin let you specify each form template so the look isn't an
issue. Putting a specific view from the admin at a specific url is a
bit more complex. Should be doable but maybe not easily or cleanly.
Short of doing that,
Thanks! I know it's been covered in the official django poll tutorial.
But how do I let users to do that without django admin? I probably will
have an URL like: example.com/cv/create and only logged in users will be
able to create their cv.
I am not sure how to set up the view so that users can
If you are using the default django admin, you can use inline model
admins [1]. The django's tutorial covert this point with polls'
questions having many possible choice in part 7 [2]
[1]
https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#inlinemodeladmin-objects
[2]
On Mon, Mar 9, 2009 at 9:09 AM, uprising wrote:
>
> Thanks for your fast reply..
> You mean unique_together=(node_a, node_b)?
> No, that's not what I meant.
>
> I want to make sure if someone has created
> Edge(node_a=x, node_b=y).save()
> he can't add
> Edge(node_a=y,
Thanks for your fast reply..
You mean unique_together=(node_a, node_b)?
No, that's not what I meant.
I want to make sure if someone has created
Edge(node_a=x, node_b=y).save()
he can't add
Edge(node_a=y, node_b=x).save()
because edge is a set of two distinct nodes.
On Mar 9, 8:54 pm, Alex
On Mon, Mar 9, 2009 at 8:52 AM, uprising wrote:
>
> Just reminded of a problem by this post, how can I validate a unique
> pair of nodes like this:
>
> class Edge(models.Model):
>node_a: models.ForeignKey(Node)
>node_b: models.ForeignKey(Node)
>
> I mean if I
Just reminded of a problem by this post, how can I validate a unique
pair of nodes like this:
class Edge(models.Model):
node_a: models.ForeignKey(Node)
node_b: models.ForeignKey(Node)
I mean if I already have {"node_a": 1, "node_b": 2}, I can't add
{"node_a": 2, "node_b": 1}
How
On Mon, Mar 9, 2009 at 7:17 AM, Reiner wrote:
>
> Hi,
>
> have a look at the documentation of field options in models:
> http://docs.djangoproject.com/en/dev/ref/models/fields/#blank
>
> class Foo(models.Model):
>this_is_required = models.CharField(...)
>
Hi,
have a look at the documentation of field options in models:
http://docs.djangoproject.com/en/dev/ref/models/fields/#blank
class Foo(models.Model):
this_is_required = models.CharField(...)
this_not = models.CharField(..., blank=True)
Regards,
Reiner
On Mar 9, 8:37 am, khsing
10 matches
Mail list logo