Re: Why my column header of listview always uppercase?

2017-02-07 Thread 居飞
It works now,  I changed the place and it is ok.

Thanks a lot.

在 2017年2月7日星期二 UTC+8下午4:55:16,居飞写道:
>
>
> 
>
>
> As show in the picture, in my django admin list view, all column header 
> are uppercase, How can I change it to capitalize?
>
> Thanks.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fbd7e2c9-ca8d-49f4-b724-695e60abc222%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why my column header of listview always uppercase?

2017-02-07 Thread 居飞
I add 

thead th { 
text-transform: capitalize; 
}


just at the end of the base.css file, but it seems does not work.


在 2017年2月7日星期二 UTC+8下午4:55:16,居飞写道:
>
>
> 
>
>
> As show in the picture, in my django admin list view, all column header 
> are uppercase, How can I change it to capitalize?
>
> Thanks.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b67ce292-e7a0-4218-8587-5ebd4eca724c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why my column header of listview always uppercase?

2017-02-07 Thread 居飞
hi:
Thanks for your reply!
Do you mean the default css provided by django is working so? I see 
some examples of django admin on internet, they works fine with capitalize.

But I have not modified the default css file yet.


在 2017年2月7日星期二 UTC+8下午6:12:37,ludovic coues写道:
>
> The line 296 of base.css is responsible for this behaviour.
> Adding a rule "thead th { text-transform: capitalize; }" at a later point 
> should do what you want.
> To do that, I would add an app in INSTALLED_APPS before 
> django.contrib.admin. In that app
> templates directory, I would add the following files, admin/base.html and 
> admin/django_base.html.
>
> admin/django_base.html would be a copy of admin/base.html found in the 
> django.contrib.admin.
> admin/base.html would extends admin/django_base.html and add your css in 
> the block extrastyle.
>
> I hope I'm not confusing. If anyone know a better way to override 
> base.html, I would be happy to hear :)
>
> 2017-02-07 9:55 GMT+01:00 居飞 :
>
>>
>> 
>>
>>
>> As show in the picture, in my django admin list view, all column header 
>> are uppercase, How can I change it to capitalize?
>>
>> Thanks.
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/c127487a-86ce-40a1-b0f3-8d49e884c75c%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Cordialement, Coues Ludovic
> +336 148 743 42
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/67798218-28ea-449d-a735-28e1a6a12568%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No installed app with label 'province'.

2017-02-07 Thread Gerald Brown
I have just started an app on Ubuntu 16.04 Server using Python 3.5 and 
Django 1.10.5.

When I do "@admin.register(Province)" in my admin.py file I get the error 
that is the subject of this post.

Of course there is NO app with label of 'province' as that is the label of 
a 'Model'.

Why is Django trying to register an app instead of the Model?

Thanks,

Gerald


-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5e94b0d3-c6cd-4b24-b323-544d10e97923%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to configure client side SSL trusted CA certificate ?

2017-02-07 Thread Gang Yang
Hi,

I'm pretty new to Django and encountered some client side SSL issue. I'm 
trying to use django-cas-ng (CAS client) to do CAS authentication and the 
CAS server is using a self-signed server certificate. After obtaining the 
service ticket (ST), django-cas-ng tried to verify the ST by calling 
requests.get(...) and failed with CERTIFICATE_VERIFY_FAILED error. 
Following some suggestions on the internet, I've tried to modify 
django-cas-ng's code to call requests.get(..) with verify parameter, such 
as requests.get(..., verify=False) and requests.get(..., verify="CAS server 
cert"). Both workarounds worked, but I can't change third-party package 
code. I also tried to add the CAS server cert to the underlying OS (Windows 
2008 and CentOS 6.7), but it did not help.

My question is where does SSL client code get the trusted CA certificates 
from, from Django, Python or the underlying OS? What configuration do I 
need in order for the SSL client to conduct the SSL handshake successfully?

Appreciate any help!

Gang

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f07875b8-f3b8-4bcb-b95f-2d936f5ece34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to configure CA certificates for client side in Django?

2017-02-07 Thread Gang Yang
Hi,

I'm pretty new to Django and encountered an SSL (client side) issue. I'm 
trying to use django-cas-ng (CAS client) for CAS authentication and my CAS 
server uses a self-signed server certificate for dev env. After obtaining 
the service ticket (ST), django-cas-ng tried to verify the ST and failed on 
SSL handshake with a CERTIFICATE_VERIFY_FAILED error. django-cas-ng is 
using requests.get() to access the CAS server for cert verification. 
Following some suggestions on the internet, I tried to use 
requests.get(..., verify=False) and requests.get(..., verify="CAS server 
cert") and both worked around the problem. But I can't modify the 
third-party package. I also tried to add the self-signed CAS server cert to 
tye underlying OS (added to Windows' trust store and append 
to /etc/ssl/certs/ca-bundle.crt on CentOS 6.7), but it did not help. 

My question is how does the SSL client (say, requests.get()) get 
the trusted CA certs for SSL handshaking in Django runtime environment? 
Does it get from Django (I did not see any settings for that), or Python or 
the underlying OS? How can I configure it so that I don't have to make code 
change to the requests.get() call to successfully complete the SSL 
handshake?

Appreciate any help.

Gang

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b4ab03d7-0c2b-4306-8610-9eb07b97a714%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ignore previous post!!!

2017-02-07 Thread Gerald Brown
You can ignore my previous post as I *think* I discovered my problem.

I had 2 admin.py files and the second one was giving me the error...

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/537e6b7c-e06b-44a4-a713-117cbde12236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django documentation tutorial part 1

2017-02-07 Thread Gerald Brown
Have you tried using "127.0.0.1" instead of "localhost"?  I had a similar 
problem when I used "localhost" 

On Tuesday, February 7, 2017 at 5:12:30 AM UTC+8, Philip wrote:
>
> Hello,
>
> I am working through the tutorial included with the django documentation, 
> and I am confused as to why my url is not working. I have the most recent 
> versions of django and python (the ones that the tutorial says to use) and 
> I believe my file structure is correct, you can see it on  
> https://github.com/philipkiely/docexample to verify. However, I get a 404 
> error when I try localhost:8000/polls/, where the documentation tutorials 
> says that I should be seeing the page that I built.
>
> Thank you,
>
> Philip
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/19dbc28b-c01e-4398-bd44-d6dd7ce6f329%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to the community

2017-02-07 Thread Fabrice NA
I am beginner too, I have found the tutorial on the Django wesite really 
useful. Also I really like this series of Videos from here 
https://www.youtube.com/user/CodingEntrepreneurs the only downside is that 
it goes and speak really fast.

On Monday, 6 February 2017 21:12:09 UTC, Mavlonbek Muratov wrote:
>
> Hi there. I am happy to be part of this community. I am a beginner django 
> user so would love to hear from you about recommendations. Anythig is fine, 
> books, videos, blogs, forums whatever you think can be helpful to learn 
> django. I would really appreciate your help. Thanks.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/60bc665f-da5f-48de-a78d-4ded5551424a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: file fields

2017-02-07 Thread ludovic coues
Can you post the full backtrace ?

2017-02-07 20:15 GMT+01:00 ايهاب توفيق :
>
> this the error that keep coming up TypeError: _getfullpathname: illegal type
> for path parameter
> بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق:
>>
>> I am new in django and to know how to use multiple file field in the same
>> model can any one help me
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ce05b6ca-a5fa-468e-8230-a501e9239a91%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTbb8_KCyZeNd4YJMtMKGJB5y4OGgwqBJB%2BAA2Hb_BtzVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: file fields

2017-02-07 Thread ايهاب توفيق

this the error that keep coming up TypeError: _getfullpathname: illegal 
type for path parameter 
بتاريخ الخميس، 26 يناير، 2017 1:04:28 ص UTC+2، كتب ايهاب توفيق:
>
> I am new in django and to know how to use multiple file field in the same 
> model can any one help me
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce05b6ca-a5fa-468e-8230-a501e9239a91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Web-based Voting System for our capstone project

2017-02-07 Thread Genaro Lubong
Thank you so much guys, it helped me a lot in making the step forward
towards our project.

On Feb 4, 2017 12:16 AM, "Melvyn Sopacua"  wrote:

> On Wednesday 01 February 2017 10:47:14 Avraham Serour wrote:
>
> > I recommend instead of tweaking the admin app to just making your own
>
> > dashboard template.
>
>
>
> I don't, unless you want graphs. If you just want a listing of users with
> vote status, then all you need is a customized list display
> 
> and maybe a list filter
> 
> to show "users who have voted or have not voted".
>
>
>
> >
>
> > You can start learning django by doing the official tutorial at
>
> > djangoproject.com
>
> >
>
> > On Tue, Jan 31, 2017 at 2:44 PM, Genaro Lubong 
> wrote:
>
> > > I just want to ask, how can I customize my admin page and make some
>
> > > dashboard about the students(who have already voted and those who
>
> > > haven't yet),
>
>
>
> --
>
> Melvyn Sopacua
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/1693602.yeVUsT3Ce1%40devstation
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACY%3DutGUiNJo%2BwtTHW3amzrmh90g_o7HdSaO8PQ-3h5BhhG%3DRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Saving Data in Multiple Selected Checkbox for Voting System

2017-02-07 Thread Genaro Lubong
Hello, newbie here, I am currently making our capstone project as a
requirement to our course subject, and it is a major subject, while I was
in the part of retreiving the selected candidates, I was not about to
iterate the vote for those selected on the upper part, just the last
selected item/object/candidate, and since it is the major objective of our
project, and I am stucked with it and our team will be screwed if I didn't
finished it As Soon As Possible, here are my codes:


#views.py

def vote(request):
 selected_candidate = Candidate.objects.get(pk=
request.POST.get('candidate'))
 selected_candidate.totalvotes += 1
  selected_candidate.save()
  return redirect('vs:index')

#voting.html

{% if all_candidates %}
 
 {% csrf_token %}
 {% for organization in all_organizations %}
 {% if all_positions %}
 {{ organization.organization }}
 {% for position in all_positions %}
 {% if organization == position.organization %}
 {{ position.position }}
 
 {% for candidate in all_candidates %}
 {% if position == candidate.position %}
 
 
 
 
 
 
 
 
 
 
  
 {{
candidate.studentid.firstname }} {{ candidate.studentid.middlename }} {{
candidate.studentid.lastname }} {{ candidate.studentid.suffix }}
 {{
candidate.position }} - {{ candidate.party }}
 
 
 
 {% endif %}
 {% endfor %}
 
 {% endif %}
 {% endfor %}
 {% endif %}
 {% endfor %}
 
 
 
  
 {% else %}
 No Candidates Yet {% endif %}

#models.py

class Candidate(models.Model):
studentid = models.OneToOneField(Student, on_delete=models.CASCADE)
position = models.ForeignKey(Position, on_delete=models.CASCADE)
party = models.ForeignKey(Party, on_delete=models.CASCADE)
picture = models.ImageField()
totalvotes = models.IntegerField(default=0)
casvotes = models.IntegerField(default=0)
citvotes = models.IntegerField(default=0)
coevotes = models.IntegerField(default=0)
ctevotes = models.IntegerField(default=0)


I hope, you can help me guys, thank you so much in advance.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACY%3DutF4NhXucpewcHa3AnsrryT4wJ%2BZxZr_HWXF9%2BB88%2B-sog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django channels

2017-02-07 Thread Алексей Кузуб
It works! I configure all from scratch step by step and it works! But I 
didn't find the reason of my problem. Maybe it was IIS or some Windows app 
=)
Thank you very much, Andrew! You really helped me.

понедельник, 6 февраля 2017 г., 20:34:03 UTC+3 пользователь Andrew Godwin 
написал:
>
> The errors you're getting both point to Channels not using your second two 
> routes, but I've tried a similar routing locally and it works fine for me. 
> Is there a chance you could make this into a small sample project that 
> reproduces the issue?
>
> You could also try clearing any .pyc files or __pycache__ directories to 
> make sure it's not some old code being cached, and making sure there's not 
> a "routing" directory that clashes with routing.py
>
> Andrew
>
> On Sun, Feb 5, 2017 at 11:54 PM, Алексей Кузуб  > wrote:
>
>> And workers write me 
>> 2017-02-06 10:42:04,709 - DEBUG - worker - Got message on 
>> websocket.connect (rep
>> ly websocket.send!FlEitltfgsCC)
>> 2017-02-06 10:42:04,710 - DEBUG - runworker - websocket.connect
>> 2017-02-06 10:42:04,711 - DEBUG - worker - Dispatching message on 
>> websocket.conn
>> ect to channels.routing.connect_consumer
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/71618c7e-dbe4-4a76-b873-e35fa410f942%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2e5f0356-be38-494b-b5a8-91bfeccd936d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django-hotsauce 0.6.4 release

2017-02-07 Thread Etienne Robillard

Hi,

I'm pleased to announce the release of django-hotsauce 0.6.4.

Django-hotsauce 0.6.4 is a bugfix release.

What's new:

* Updated libschevo to 3.2.7

* Added basic support for ZODB databases

* Fixed a bug in notmm.utils.urlmap

* Updated test suite

Download: 
http://www.isotopesoftware.ca/pub/django-hotsauce/django-hotsauce-0.6.4.tar.gz


Have fun!

Etienne

--
Etienne Robillard
tkad...@yandex.com
http://www.isotopesoftware.ca/

--
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bf1512aa-1ba4-b0bc-4757-8a650e0c1fcb%40yandex.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django allauth, manage redirect

2017-02-07 Thread Branko Zivanovic
Thanks for idea, I think this one with additional field might work!

уторак, 07. фебруар 2017. 10.51.36 UTC+1, Michal Petrucha је написао/ла:
>
> On Tue, Feb 07, 2017 at 01:30:18AM -0800, Branko Zivanovic wrote: 
> > Thanks for the answer. 
> > This will redirect user after every single login, right? 
> > I wan't it to be after firsty login only, so people can update their 
> > profile. I want this to be done only once. 
>
> Not exactly what you're asking for, but one option might be to define 
> a custom “get_login_redirect_url” method as described in the docs [1], 
> and check either based on the account creation timestamp, or maybe add 
> another field to your model that will indicate whether the user has 
> already completed that step of the sign-up process or not. 
>
> Good luck, 
>
> Michal 
>
>
> [1]: 
> https://django-allauth.readthedocs.io/en/latest/advanced.html#custom-redirects
>  
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/38239f77-d8de-4298-82ed-8104b448382a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread ludovic coues
Have you added some choices to the "What's up?" question ?

What you see is that question.choice_set.all is empty.
The following snippet will give you some output:

{% for choice in question.choice_set.all %}

{{ choice.choice_text
}}
{% empty %}
Sorry, no available choices.
{% endfor %}

2017-02-07 10:12 GMT+01:00 Brady Lee :
> Same issue here, no radio buttons show up.
>
> ubuntu 16.04.1 LTS
> python 3.5.2
> django 1.10.5
>
> I've tried  {{ question|pprint }} and {{ question.choice_set.all|pprint }}
> for debugging, got:
>
>  
>
> Now trying to figure out where the problem is.
>
>
> On Thursday, October 20, 2016 at 11:52:59 PM UTC+8, Othniel Ayinzat wrote:
>>
>> Hi guys,
>>  I have been following the django tutorials up to part 4 on the polls
>> application. My details template only displays the vote submit button but
>> the radio buttons for making choices won't show. I have been battling with
>> this for some hours now and i need help or some pointers. Thanks. Below are
>> the code snippets for the polls app.
>>
>> polls/templates/polls/detail.html
>> ---
>> {{ question.question_text }}
>> {% if error_message %}{{ error_message }}{% endif
>> %}
>> 
>> {% csrf_token %}
>> {% for choice in question.choice_set.all %}
>> > value="{{ choice.id }}" />
>> {{ choice.choice_text
>> }}
>> {% endfor %}
>> 
>> 
>>
>> polls/templates/polls/index.html
>> ---
>>
>> {% if latest_question_list %}
>> 
>> {% for question in latest_question_list %}
>> {{
>> question.question_text }}
>> {% endfor %}
>> 
>> {% else %}
>> No polls are available.
>> {% endif %}
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8a5fe550-62bf-42e5-8dfa-0b3fc8d5d4cf%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTYme1T1URdKwCTRnZXYT%2BR5jLXqoASyBdK9w4yc4zumJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why my column header of listview always uppercase?

2017-02-07 Thread ludovic coues
The line 296 of base.css is responsible for this behaviour.
Adding a rule "thead th { text-transform: capitalize; }" at a later point
should do what you want.
To do that, I would add an app in INSTALLED_APPS before
django.contrib.admin. In that app
templates directory, I would add the following files, admin/base.html and
admin/django_base.html.

admin/django_base.html would be a copy of admin/base.html found in the
django.contrib.admin.
admin/base.html would extends admin/django_base.html and add your css in
the block extrastyle.

I hope I'm not confusing. If anyone know a better way to override
base.html, I would be happy to hear :)

2017-02-07 9:55 GMT+01:00 居飞 :

>
> 
>
>
> As show in the picture, in my django admin list view, all column header
> are uppercase, How can I change it to capitalize?
>
> Thanks.
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/c127487a-86ce-40a1-b0f3-8d49e884c75c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZ1Hqp4Nqpnmmw2mPeUcNPt46g6-LsJZ_cerEJ97qfYtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django allauth, manage redirect

2017-02-07 Thread Michal Petrucha
On Tue, Feb 07, 2017 at 01:30:18AM -0800, Branko Zivanovic wrote:
> Thanks for the answer.
> This will redirect user after every single login, right?
> I wan't it to be after firsty login only, so people can update their 
> profile. I want this to be done only once.

Not exactly what you're asking for, but one option might be to define
a custom “get_login_redirect_url” method as described in the docs [1],
and check either based on the account creation timestamp, or maybe add
another field to your model that will indicate whether the user has
already completed that step of the sign-up process or not.

Good luck,

Michal


[1]: 
https://django-allauth.readthedocs.io/en/latest/advanced.html#custom-redirects

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20170207095023.GF23772%40konk.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: Django allauth, manage redirect

2017-02-07 Thread Branko Zivanovic
Thanks for the answer.
This will redirect user after every single login, right?
I wan't it to be after firsty login only, so people can update their 
profile. I want this to be done only once.

уторак, 07. фебруар 2017. 10.20.21 UTC+1, pradam.programming је написао/ла:
>
> Hi,
> add this line in settings.py:
> LOGIN_REDIRECT_URL = "/my-tasks/"
>
> On Tue, Feb 7, 2017 at 2:09 PM, Branko Zivanovic  > wrote:
>
>> I'm using django-allauth for authentication. I've enabled Facebook and 
>> Google for social logins. How do I make redirect after first login? I want 
>> to make people edit their profiles instantly after their first login.
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/70fcb12c-f1fc-41b1-944d-47d5c0c756f5%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84c1aefd-55be-4ac4-b80e-bc53bd84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread Brady Lee
Same issue here, no radio buttons show up.

ubuntu 16.04.1 LTS
python 3.5.2
django 1.10.5

I've tried  {{ question|pprint }} and {{ question.choice_set.all|pprint }} 
for debugging, got:

 

Now trying to figure out where the problem is. 

On Thursday, October 20, 2016 at 11:52:59 PM UTC+8, Othniel Ayinzat wrote:
>
> Hi guys,
>  I have been following the django tutorials up to part 4 on the polls 
> application. My details template only displays the vote submit button but 
> the radio buttons for making choices won't show. I have been battling with 
> this for some hours now and i need help or some pointers. Thanks. Below are 
> the code snippets for the polls app.
>
> polls/templates/polls/detail.html
> ---
> {{ question.question_text }}
> {% if error_message %}{{ error_message }}{% endif 
> %}
> 
> {% csrf_token %}
> {% for choice in question.choice_set.all %}
>  value="{{ choice.id }}" />
> {{ choice.choice_text 
> }}
> {% endfor %}
> 
> 
>
> polls/templates/polls/index.html
> ---
>
> {% if latest_question_list %}
> 
> {% for question in latest_question_list %}
> {{ 
> question.question_text }}
> {% endfor %}
> 
> {% else %}
> No polls are available.
> {% endif %}
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8a5fe550-62bf-42e5-8dfa-0b3fc8d5d4cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django allauth, manage redirect

2017-02-07 Thread pradam programmer
Hi,
add this line in settings.py:
LOGIN_REDIRECT_URL = "/my-tasks/"

On Tue, Feb 7, 2017 at 2:09 PM, Branko Zivanovic <
international11...@gmail.com> wrote:

> I'm using django-allauth for authentication. I've enabled Facebook and
> Google for social logins. How do I make redirect after first login? I want
> to make people edit their profiles instantly after their first login.
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/70fcb12c-f1fc-41b1-944d-47d5c0c756f5%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGGVXBMuEfUpTP2zBXXjtX3M%3D7Z9Gy7f_0RxVsHMRo-YMwZTxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Why my column header of listview always uppercase?

2017-02-07 Thread 居飞





As show in the picture, in my django admin list view, all column header are 
uppercase, How can I change it to capitalize?

Thanks.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c127487a-86ce-40a1-b0f3-8d49e884c75c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to the community

2017-02-07 Thread pradam programmer
hi,

you can try this video tutorials its easily understandable

https://www.youtube.com/playlist?list=PLEsfXFp6DpzQFqfCur9CJ4QnKQTVXUsRy

On Tue, Feb 7, 2017 at 12:31 PM, Antonis Christofides <
anto...@djangodeployment.com> wrote:

> Hello,
>
> except for Django's official tutorial, which is quite good, many people
> seem to like the Django Girls tutorial.
>
> Regards,
>
> Antonis
>
> Antonis Christofideshttp://djangodeployment.com
>
>
> On 02/06/2017 09:46 PM, Mavlonbek Muratov wrote:
>
> Hi there. I am happy to be part of this community. I am a beginner django
> user so would love to hear from you about recommendations. Anythig is fine,
> books, videos, blogs, forums whatever you think can be helpful to learn
> django. I would really appreciate your help. Thanks.
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/18d9cdac-e47a-47a7-a10f-4cabf615934f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/fe265529-df76-c95f-6589-438fbcd80db2%
> 40djangodeployment.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGGVXBOiNrshK9y8EK-KfbrFsnKteai6E3MGk8GTBNgJ-_9NNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django allauth, manage redirect

2017-02-07 Thread Branko Zivanovic
I'm using django-allauth for authentication. I've enabled Facebook and 
Google for social logins. How do I make redirect after first login? I want 
to make people edit their profiles instantly after their first login.

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/70fcb12c-f1fc-41b1-944d-47d5c0c756f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.