On 17/09/2014 3:22 AM, Michael Martin wrote:
Mike,
Thanks for responding.
I seem to be getting an error when I try to make foreign keys in my
model. Do you have any idea why?
My Model that I am adding is called GeneralSetting
I am now importing:
from django.db import models
from django.cont
Mike,
Thanks for responding.
I seem to be getting an error when I try to make foreign keys in my model.
Do you have any idea why?
My Model that I am adding is called GeneralSetting
I am now importing:
from django.db import models
from django.contrib.auth.models import User
I added under my
cla
On 16/09/2014 2:02 PM, Pitchblack wrote:
Is there a way to add the user to the data model, so it knows who
created the record and who updated it last?
You need to establish a couple of foreign key fields in your model (eg
created and updated) which both link to auth.user. Then grab
request.us
Is there a way to add the user to the data model, so it knows who created
the record and who updated it last?
On Sunday, October 20, 2013 5:24:22 PM UTC-7, Ideo Rex wrote:
>
> Hello,
> I'm relatively new to Django. So I have a working (local) web application.
> I can create new model objects fro
Thanks for the link. I'm spent a good part of the day trying to figure it
out to no avail. My next approach was to describe how I walked through it
and see where I went wrong.
I went into my models.py
from django.db import models
from django.core.urlresolvers import reverse
from datetime impo
On Monday, 21 October 2013 01:24:22 UTC+1, Ideo Rex wrote:
> Hello,
> I'm relatively new to Django. So I have a working (local) web application.
> I can create new model objects from the admin site, but I would like my
> users to be able to create their own objects and save them to the database.
Task is really simple :
Take a look at https://docs.djangoproject.com/en/dev/topics/auth/default/
(this a good start for novice)
Use UserCreationForm for passing data from user and validating
If form is correct save new user
After this you can redirect to new page
Many thanks,
Serge
+380 63
7 matches
Mail list logo