These are chat archives for django/django

7th
Dec 2016
John
@flyboy1565
Dec 07 2016 03:15
Charged
@shadowsyntax , charfield
Kaoua Cherif
@kawache
Dec 07 2016 08:03
Hello, I really need your help and advises concerning using django without a database, i'm using Django with LDAP and would like to store user model only in redis. what i've seen until now, no way to do it without a Database
Roel
@roelzkie15
Dec 07 2016 10:47
Please help me with this SO problem about foreignkey constrait in custom usermodel.
Miracle Ayodele
@iammiracle
Dec 07 2016 11:16
Hi guys, how do i keep track of a user_id in different tables
for example, i have a table for registration and the user_id is auto generated
i have another table for user_profile
and i will like the user_id generated in registation table to be the same on user_profile table so as to make track of records
Sherif O.
@shadowsyntax
Dec 07 2016 11:47
Please how do i call render in the following code?
def display(request):
  dispRefInstance = RefNo.objects.all().last()
  return {
    'dispRefInstance': dispRefInstance.generated_ref_no
    render(request, 'cusrefgen/refno.html')
  }
Slava
@scream4ik
Dec 07 2016 11:54
def display(request):
  dispRefInstance = RefNo.objects.all().last()
  return render(request, 'cusrefgen/refno.html', {'dispRefInstance': dispRefInstance})
https://docs.djangoproject.com/en/1.10/topics/http/shortcuts/#render
Sherif O.
@shadowsyntax
Dec 07 2016 11:55
thanks @scream4ik
Alex10Alex
@Alex10Alex
Dec 07 2016 17:42
@Alex10Alex
подскажите выпадает ошибка
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/automium_web.debug'
Brian A.
@brjadams
Dec 07 2016 20:12
any obvious way to refactor something like this:

names = {}
names["authors"] = ", ".join(self.get_author_for_bill_status_report(bill_obj.authors.items))
names["coauthors"] = ", ".join(self.get_author_for_bill_status_report(bill_obj.coauthors.items))
names["sponsors"] = ", ".join(self.get_sponsor_for_bill_status_report(bill_obj.sponsors.items))
names["cosponsors"] = ", ".join(self.get_sponsor_for_bill_status_report(bill_obj.cosponsors.items))
it seems relatively clean, but was curious if there was nice/better way to refactor this sort of snippet