Re: CSRF verification failed when I use smart phone

2015-01-28 Thread Zach Borboa
For anyone trying to debug this issue, you may want to print out the variable using {{ csrf_token }} as well as using {% csrf_token %} on the form to verify the token is correct. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe f

Re: Abridged summary of django-users@googlegroups.com - 45 updates in 28 topics

2015-01-28 Thread Rosie Terry
How to create a Django Blog Post? On Thu, Jan 29, 2015 at 12:13 AM, wrote: > django-users@googlegroups.com > > Google > Groups >

Re: How migrate a CustomUser?

2015-01-28 Thread Jorge Andrés Vergara Ebratt
Hello, in Django 1.7+ you don't use syncdb you use a a mix of: python manage.py makemigrations And then use python manage.py migrate On Wed Jan 28 2015 at 11:03:06 AM Neto wrote: > I'm using syncdb to the class CustomUser(AbstractUser), my Django is 1.7, > how can I user migrate to a customuse

Re: Validation on two user foreign keys

2015-01-28 Thread Bala Subrahmanyam Varanasi
Hi Nicole, Override the Friendship model's 'save' method to test the unique combination of (initiator, recipient). Regards, On 29 January 2015 at 08:27, Nicole Harris wrote: > Hi All, > > I have a model called 'Friendship' that includes two foreign keys to > User. One is the 'initiator' of th

Validation on two user foreign keys

2015-01-28 Thread Nicole Harris
Hi All, I have a model called 'Friendship' that includes two foreign keys to User. One is the 'initiator' of the Friendship, the other the 'recipient'. I want to make sure the Friendship only exists once regardless of who is the recipient and who is the initiator. Any thoughts on the best way

Re: CSRF verification failed when I use smart phone

2015-01-28 Thread Pouria M
Hi Everyone, I am facing a similar issue ... CSRF verification fails on IOS using chrome ... Appreciate any insights p On Friday, January 9, 2015 at 6:16:37 PM UTC-8, James Schneider wrote: > > Is the iframe sourced from the same domain as the main page that was > requested in the address ba

Re: Re: how to have popup window and print it

2015-01-28 Thread 163 email
Thanks Rafael E. Ferrero a lot . this is what I want. Web programing is really hard to me as a shell programmer. Hope I can know it well soon. 163 email From: Rafael E. Ferrero Date: 2015-01-28 19:30 To: django-users Subject: Re: how to have popup window and print it IMHO - You can't find anyt

Re: Two user model problem

2015-01-28 Thread Russell Keith-Magee
On Thu, Jan 29, 2015 at 1:39 AM, 詹上潁 wrote: > Before I use the design as I mention above, I had thought of using two > type of profile. > Using two profile model in a project, I need to implement two login page > for each type of user, and I also need to check which of user is logging in. > I nee

Re: Two user model problem

2015-01-28 Thread Russell Keith-Magee
On Wed, Jan 28, 2015 at 9:32 PM, Andreas Kuhne wrote: > 2015-01-28 13:26 GMT+01:00 Russell Keith-Magee : > >> >> On Wed, Jan 28, 2015 at 3:00 PM, 詹上潁 wrote: >> >>> My project need an admin for staff and a normal website for normal user. >>> Staff can only login to staffsite and normal user can o

Re: SQL Server performance problem

2015-01-28 Thread chj
Avoid using ODBC. It's horribly slow. While I have no experience with MSSQL, you may have a look at django-mssql: https://django-mssql.readthedocs.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

SQL Server performance problem

2015-01-28 Thread Fred
I'm on a W7 32bit virtual machine with python 2.7 and SQL Server 2008 with local views referencing Linked Server where the real data resides. My setup is Django (1.7.4) django-pyodbc (0.2.6) django-pyodbc-azure (1.2.3) not using this, it was a false start that did not pan out. mysql

Re: django views error

2015-01-28 Thread Sergiy Khohlov
Second function has ident mistakes .2last lines have additional space. 27 січ. 2015 09:31, користувач "Stephen J. Butler" написав: > Not all your lines have the same indent level in your profile method. Line > 52. > > On Tue, Jan 27, 2015 at 1:03 AM, Mosharof sabu > wrote: > > my view > > > > >

Re: Two user model problem

2015-01-28 Thread 詹上潁
Before I use the design as I mention above, I had thought of using two type of profile. Using two profile model in a project, I need to implement two login page for each type of user, and I also need to check which of user is logging in. I need to implement a custom login_required decorator to pr

How migrate a CustomUser?

2015-01-28 Thread Neto
I'm using syncdb to the class CustomUser(AbstractUser), my Django is 1.7, how can I user migrate to a customuser? -- 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 t

Re: Select Field With Other option

2015-01-28 Thread trubliphone
I have done something fairly similar. I wound up using two separate fields (rather than a single MultiValueField). The first one is based on a TextField and its formfield is based on a MultipleChoiceField. On form creation of forms that use this field, I append [("_OTHER", "---OTHER---")] to

Re: Django sever for andriod

2015-01-28 Thread Andreas Kuhne
2015-01-28 6:45 GMT+01:00 suhail areekkan : > I am new in django how i start a django server for an android application. > > -- > 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, se

Re: Two user model problem

2015-01-28 Thread Andreas Kuhne
2015-01-28 13:26 GMT+01:00 Russell Keith-Magee : > > On Wed, Jan 28, 2015 at 3:00 PM, 詹上潁 wrote: > >> My project need an admin for staff and a normal website for normal user. >> Staff can only login to staffsite and normal user can only login to >> website. Staff will login to admin to do some ma

Re: Two user model problem

2015-01-28 Thread Russell Keith-Magee
On Wed, Jan 28, 2015 at 3:00 PM, 詹上潁 wrote: > My project need an admin for staff and a normal website for normal user. > Staff can only login to staffsite and normal user can only login to > website. Staff will login to admin to do some management. They can > view normal user list and detail and

Django unique constaint not working

2015-01-28 Thread vaibhav jain
Need help with this django-unique-constaint-not-working -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails f

Django sever for andriod

2015-01-28 Thread suhail areekkan
I am new in django how i start a django server for an android application. -- 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.

Reduce start up time for manage.py

2015-01-28 Thread chj
Hi, I'm having a quite large Django project with dozens of apps and many reusable third-party libraries. All the custom management commands (being used with manage.py ) take a long time to be executed, since the start up sequence takes between 3 and 5 seconds. Using the cProfile module I was a

Two user model problem

2015-01-28 Thread 詹上潁
My project need an admin for staff and a normal website for normal user. Staff can only login to staffsite and normal user can only login to website. Staff will login to admin to do some management. They can view normal user list and detail and create or delete normal user admin. The two type o

Re: how to have popup window and print it

2015-01-28 Thread Rafael E. Ferrero
IMHO - You can't find anything in Django because it's not a Django problem. The popup windows you can do it a little of javascript [1] and for print you can do a button in html and use javascript for print the page onclick="javascript:window.print();" (something like this, i think) Fill with data

Re: How to detect (daily) User Login when using cookies?

2015-01-28 Thread Tobias Dacoir
Yes that would be enough. I know in the User Model there is last_login but that is only updated when the User actually logs in. And the signal from django-allauth is also only send when the user uses the login form. The only other alternative I found was to check in every view I have for reques