Dear All,
I've copied a MySQL db (using mysqldump) and then loaded it into a new
DB. I've also altered the structure slightly (I've added 6 columns).
However, the problem is that when I try and use the db to add more
data, the primary key starts from 0 again. Since the number for the
first curre
Dear All,
I'm having problems with the Many-to-Many relations in my model.
I've got a list of questions, each of which has a number of marks
associated with it. The marks are in another table in the DB. I've
modelled it as Many-to-Many because it seems that each question can
have many marks, and
Dear All,
I'm working on an MCQ-based site. I'm trying to record the questions
that people have done (in the database), using the profile, but I'm
having problems updating the data
Model.py:
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True, edit_inline=True)
t the database is for. :-)
> make a model that has your "marked" flag.
>
> konstantin
>
> On Mar 21, 11:36 am, "MattW" <[EMAIL PROTECTED]> wrote:
>
> > Dear All,
>
> > More of a design question than a technical query...
>
> > I
Dear All,
More of a design question than a technical query...
I've got a page with multiple 'areas' - some static text, a wiki bit
and a 'marking' bit (via a form). I'd like to be able to only allow
people to enter a mark once, after which views of the page should say
"Thanks for the feedback".
Thanks. That clears some stuff up, but not everything.
The thing I'm still _really_ unclear on is how one adds a profile. So
to go back to the code below:
> > @login_required
> > def viewprofile(request):
> > uname = request.user.username
> > try:
> > profile = request.user.get_p
Dear All,
I've upgraded to the svn code, but I'm still having problems with user
profiles.
I've got a method in views.py:
@login_required
def viewprofile(request):
uname = request.user.username
try:
profile = request.user.get_profile()
except User.DoesNotExist:
reque
Dear All,
I have a view method that looks like this:
@login_required
def viewprofile(request):
uname = request.user.username
profile = request.user.get_profile()
return HttpResponse(uname)
I have a models.py file that includes:
class MySiteProfile(models.Model):
user = models.F
Ok, I've got a new problem. I've set up the files as in the examples
in the Django book.
The @login_required decorator always sends the user to /accounts/
login. However, since this uses the same css as the other templates, I
try and have it inheriting from them.
The problem is that it then trys
Thanks a lot - all solved!
Matt
--~--~-~--~~~---~--~~
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
Dear All,
I am trying to use the users/ authentication framework supplied with
Django. I wrote something very simple myself, but would arther use the
bundled system.
I have a urls.py file with:
(r'^login/$', login),
(r'^logout/$', logout),
in (I know these are different to the ones given in t
Thanks for all the help - have got it working.
I have to say that (IMHO) it doesn't seem the nicest way to do
things...I'm sure there are reasons, I'm just saying it doesn't feel
so nice.
The change from dev to production seems like it might be a pain.
As a note on docs - I was looking at the D
Dear Group,
I've got an HTML page with associated CSS that I want to use as my
template. Just to test it, I call:
return render_to_response('about.html')
and I get the page, but with no CSS info. I've checked the page
source, and it has the name of the stylesheet in there, and the page
renders
Sorry, should have made it clear on my second post in response to
Massimiliano. He suggested this, and so I altered the code so it now
reads:
def ansQuestion(request):
q = get_object_or_404(Question)
answer = request.POST["answer"]
A
Since (at least) two people have now suggested tha
Ok - sorry, could you (briefly) explain what you mean?
Thanks,
Matt
--~--~-~--~~~---~--~~
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 unsu
Dear Massimiliano,
Thanks for that; still doesn't work, I'm afraid.
The error is:
MultiValueDictKeyError at /mcq/ansQuestion/
"Key 'answer' not found in "
Request Method: GET
Request URL:http://localhost:8000/mcq/ansQuestion/
Exception Type: MultiValueDictKeyError
Exception
Dear All,
A newbie with Django, but seem to be doing with some basics so far, but
seem to be a bit stuck on getting the values from a Drop Down menu.
I have a method in my views.py file which starts:
def ansQuestion(request):
q = get_object_or_404(Question)
answer = request.POST['value'
17 matches
Mail list logo