views.py
@login_required
def user_profile(request):
grp = get_user_group(request.user)
# print(dlist)
if grp == 'Student':
return render(request, 'sorp_app/s_profile.html')
else:
iform = forms.StudentInfoForm()
mform = forms.StudentMedicalForm()
under manage.py
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import
{{ question.question_text }}{% for choice in
question.choice_set.all %}
{{ choice.choice_text }}{% endfor %}
I got this syntax in Writing your first Django app, part 3.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
try : pip install django (if pip is installed)
try : pip3 install django (if pip3 is installed)
--
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
I have got this error in section //Writing your first patch for Django//
when i performed this below command in terminal.
i have got an error.
git clone g...@github.com:YourGitHubName/django.git
error part :
Cloning into 'django'...
Warning: Permanently added the RSA host key for IP address
red consciousness that our institutions have
>> failed and our ecosystem is collapsing, yet we are still here — and we are
>> creative agents who can shape our destinies. Apocalyptic civics is the
>> conviction that the only way out is through, and the only way through is
>
I am in tutorial 3 of Django.But i am stuck in understanding the below
code.Please heLP me!!!
{% if latest_question_list %}
{% for question in latest_question_list %}
{{ question.question_text
}}
{% endfor %}
{% else %}
No polls are available.
{% endif %}
--
You
Thanks Vinicius Assef
--
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to
/* also explain super ().save() */
from django.db import models
class Blog(models.Model):
name = models.CharField(max_length=100)
tagline = models.TextField()
def save(self, *args, **kwargs):
do_something()
super(Blog, self).save(*args, **kwargs) # Call the "real"
9 matches
Mail list logo