Adding new model. ContentType error field "name". Bug?

2015-06-29 Thread ClosiusBeg
Hi All!

I caught a error when I move from Dajngo 1.7 to 1.8.

I wanted to add new model, for example:

class Test(models.Model):
class Meta():
db_table = 'test'
userID = models.ForeignKey(User)
minAge = models.PositiveSmallIntegerField(default=0)
maxAge = models.PositiveSmallIntegerField(default=150)
allowedGender = models.PositiveSmallIntegerField(default=0)


I created migration, it is normal. Then I tried to apply it by manage.py 
migrate but I caught an error "RuntimeError: Error creating new content 
types. Please make sure contenttypes is migrated before trying to migrate 
apps individually.".
Or if rise clear exception it will be "null value in column "name" violates 
not-null constraint"

This error is rised from django/contryb/contenttypes/models.py  
in get_for_model.

Then I observed that Django tried to get a field "name" in DB teble 
django_content_types. This field really exists there. 
But then I saw the migration 0002_remove_content_type_name.py there 
https://github.com/django/django/tree/master/django/contrib/contenttypes/migrations

Thus, Django tried to get content type before it was creted.

I'd like to ask "Why???".  Is it a bug?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/412e4f83-6301-4a1c-87c5-3c78ddcdc9d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


best way to use django

2015-06-29 Thread Jason Thomas
I want to create twon sites, the first will be a tutorial/blog/projects site 
(how to's) that I can post different web apps to be used by public users logged 
into the site and the second a dating site. do I need to know djangular (as in 
is it to much for what I want to do?) or should I just use strieght django?



please help

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3fca832a-f8b1-4874-8031-5d3e10ca0bed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread aRkadeFR

Read the tutorial and begin to implement your website step by step.

You will see if you need djangular after.

On 06/29/2015 05:08 AM, Jason Thomas wrote:

I want to create twon sites, the first will be a tutorial/blog/projects site 
(how to's) that I can post different web apps to be used by public users logged 
into the site and the second a dating site. do I need to know djangular (as in 
is it to much for what I want to do?) or should I just use strieght django?



please help



--
aRkadeFR

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/559109DA.9020308%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread Jason Thomas
Which tutorial do you suggest? Which is the best as far as getting down to the 
nitty gritty (strieght to the point) for what I'm trying to do?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d98a7d4c-23c6-4027-b99e-6e0239a08dae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Adding new model. ContentType error field "name". Bug?

2015-06-29 Thread Tim Graham
Please take a look at this thread and see if it helps: 
https://groups.google.com/d/topic/django-users/DlRQOdsJL6o/discussion

On Monday, June 29, 2015 at 5:02:52 AM UTC-4, ClosiusBeg wrote:
>
> Hi All!
>
> I caught a error when I move from Dajngo 1.7 to 1.8.
>
> I wanted to add new model, for example:
>
> class Test(models.Model):
> class Meta():
> db_table = 'test'
> userID = models.ForeignKey(User)
> minAge = models.PositiveSmallIntegerField(default=0)
> maxAge = models.PositiveSmallIntegerField(default=150)
> allowedGender = models.PositiveSmallIntegerField(default=0)
>
>
> I created migration, it is normal. Then I tried to apply it by manage.py 
> migrate but I caught an error "RuntimeError: Error creating new content 
> types. Please make sure contenttypes is migrated before trying to migrate 
> apps individually.".
> Or if rise clear exception it will be "null value in column "name" 
> violates not-null constraint"
>
> This error is rised from django/contryb/contenttypes/models.py  
> in get_for_model.
>
> Then I observed that Django tried to get a field "name" in DB teble 
> django_content_types. This field really exists there. 
> But then I saw the migration 0002_remove_content_type_name.py there 
> https://github.com/django/django/tree/master/django/contrib/contenttypes/migrations
>
> Thus, Django tried to get content type before it was creted.
>
> I'd like to ask "Why???".  Is it a bug?
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8ff0d6ec-f010-42b3-b534-2fb851865b2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot overwrite 'get_fieldsets' in custom UserAdmin

2015-06-29 Thread Felippe Raposo
Henri, can you set a "pdb.set_trace" or print something  at the beginning
of your "get_fieldsets" to see if it is being called or not?

2015-06-28 6:58 GMT-03:00 Henri :

> As I use a custom user model the default django user model is not
> registered. When I try to unregister it I get an error.
>
> See example in the django docs:
>
> https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#a-full-example
> .
>
> Regards, Henri
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b169e3a8-29a5-4d33-b543-06b8d53597f0%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP6GVqjYbLF619ZL078mV5SV6g5dcY%2BeSF%2B_Qb%3DkkR_7HfTHjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread aRkadeFR

Just read the djangoproject tutorial and then start your project:
https://docs.djangoproject.com/en/1.8/

On 06/29/2015 01:20 PM, Jason Thomas wrote:

Which tutorial do you suggest? Which is the best as far as getting down to the 
nitty gritty (strieght to the point) for what I'm trying to do?



--
aRkadeFR

--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/559152DF.6080105%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


migrate gives SQL error on my DB backend

2015-06-29 Thread Graeme Perrow
I have a custom DB backend driver which works on everything from Django 
1.1.4 to 1.7, and now I am trying to update it to support Django 1.8. I 
have seen this change  
regarding
 
the base classes and I've made the appropriate import changes. When running 
a simple test (creating everything from scratch), I'm doing this:

python manage.py startapp test

python manage.py makemigrations test
python manage.py migrate

But when I do the migrate, I get a SQL error. It turns out that it's 
attempting to execute "create table "django_migrations" ( ). I thought that 
perhaps I don't need to do the migrate, but if I don't, I get the same 
error when I run "python manage.py runserver". I'm assuming that I've 
neglected to make some change to my driver but I'm not familiar enough with 
the migration stuff to know what it is I'm missing. Can anyone help?

Thanks
Graeme Perrow

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b9a7d828-6e07-4bd6-8518-8caf78363773%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django unique email id model

2015-06-29 Thread Robert librado
You can use Django All Auth

go to read the docs it was great for getting the sign up and sign out
and login page you will just need to follow the directions and then
add it to your menu .

On 6/28/15, Arindam sarkar  wrote:
> django 1.8 . which user model should i use ? custom or built in one ?
> please help.
> On Sun, Jun 28, 2015 at 12:14 AM, Gergely Polonkai 
> wrote:
>
>> Hello,
>>
>> this depends on a load of things. Which version of Django do you use? Do
>> you have a custom user model, or you use the built in one?
>>
>> Best,
>> Gergely
>> On 27 Jun 2015 13:47, "Arindam sarkar"  wrote:
>>
>>> i am just starting with django. I need create a site with signup/sign in
>>> . i want user to sign up by email id . how do i proced ?
>>>
>>> --
>>> Regards,
>>>
>>> Arindam
>>>
>>> Contact no. 08732822385
>>>
>>>
>>>  --
>>> 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 http://groups.google.com/group/django-users
>>> 
>>> .
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAGnF%2BrAtSBg8qF_xQA%3Duh%2BZmgp6VEtc_MEhn79%2BDpDK1tjt5LA%40mail.gmail.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 http://groups.google.com/group/django-users
>> 
>> .
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACczBUKHPPB2s-5ZjyHffr2AMnv-bhVXvvfOMP%3DmWvofd8r7vQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout
>> 
>> .
>>
>
>
>
> --
> Regards,
>
> Arindam
>
> Contact no. 08732822385
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGnF%2BrBAfwpC5Ei%3DF2r8L4F%2BpXnr5_SnBhWy2maHhCY45fUvdw%40mail.gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAmfpZ0RW-b%3DTG155k2gN3uB91uzq99sWHUS8MknZscB9i95NQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread Robert librado
try coding for entrepreneurs they have one of the best vido series to
get you motivated .

On 6/29/15, aRkadeFR  wrote:
> Just read the djangoproject tutorial and then start your project:
> https://docs.djangoproject.com/en/1.8/
>
> On 06/29/2015 01:20 PM, Jason Thomas wrote:
>> Which tutorial do you suggest? Which is the best as far as getting down to
>> the nitty gritty (strieght to the point) for what I'm trying to do?
>>
>
> --
> aRkadeFR
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/559152DF.6080105%40arkade.info.
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAmfpZ3GLKEV-FkociUJOrmARq3wxQjFL93mUV08X-FFOXbBzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread Jason Thomas
Thank You Sir!!!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ae6adafd-db16-45e3-bd0b-e70e9a74948c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: best way to use django

2015-06-29 Thread Jason Thomas
Thanks to you to my man
I'm on it!!!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ab4d182c-1883-400f-acba-343371c648d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ANNOUNCE] Django Security advisory: simple_tag does not do auto-escaping

2015-06-29 Thread Tim Graham
The Django team has just published a short security advisory about usage of 
the simple_tag template tag helper. You should audit your own code.

https://www.djangoproject.com/weblog/2015/jun/29/simple_tag-security-advisory/

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/70781302-7b1f-4f83-86aa-8901c5742014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Canvas OAuth2 From Django View

2015-06-29 Thread Henry Versemann
First let me say that I'm probably making this harder than it needs to be, 
but I must be missing something in this process. 

I'm trying to use the oauth2  process in the Canvas API, and I started 
working on this back in January, had other priorities that pulled me away 
from it, so I'm only now able to pursue working on this again.

I seem to be able to successfully send the original oauth2 request to 
the Canvas API, because I can get back a status code 200 from it.
But at that point everything seems to stop, so I'm not sure exactly what 
I'm doing wrong.

If after I send the successful response I get back from Canvas (and sending 
it the redirect_uri, etc.), back to my client, then I don't see any 
subsequent requests, coming back to the redirect_uri from Canvas, and don't 
understand why, or can I not normally see them as or when they happen?

If I don't send the successful response back to the client then I also 
don't see any subsequent requests coming to the view associated with the 
redirect_uri that I sent to Canvas and my application just fails with a 
status_code of "500".

So I think I'm probably not grasping exactly how a properly functioning 
"oauth2" process is supposed to work. 

I would appreciate any help anyone can offer in better explaining how the 
process works, how django view processing fits into it, and when to send 
and/or not send a response back to my client.

Thanks for the help.

Henry


On Wednesday, January 21, 2015 at 9:36:08 PM UTC-6, Collin Anderson wrote:

> Hi Henry,
>
> You need to send some kind of response back to the browser and the user. 
> Maybe a message? or a maybe redirect to another page?
>
> def final_step(request):
> code = request.GET['code']
> r = requests.post('https:///login/oauth2/token', {
> 'code': code, 'client_id': 'etc'}
> access_code = r.json()['access_code']
> return HttpResponse('Successfully Logged in! Here's your access_code: 
> %s' % access_code)
>
> Collin
>
> On Sunday, January 18, 2015 at 7:01:12 PM UTC-5, Henry Versemann wrote:
>>
>> Collin, thanks for the help. My django application as it is already has 
>> the "requests" library installed within it and I have already registered it 
>> with the API which I'm trying to authenticate to currently using that API's 
>> oauth2 web application flow, which is a three step process (see the oauth2 
>> tab for the  Canvas API). I'm able so far to send a redirect-uri to the 
>> Canvas Oauth2 api and have it respond back to me with all of the other 
>> information I need to get my final access token from then. My application 
>> currently uses Python 2.7.8 and Django 1.7 and the piece of the process 
>> that I'm having the problem with is sending the final POST request back to 
>> the Canvas Oauth2 flow API. The response that up to now I've tried to 
>> return back from my django view  has been an HttpResponse which apparently 
>> does not allow the sending of a POST request. I've also taken a look at all 
>> of the shortcut functions that django offers as options to return back from 
>> django views, and none of them appear at least not obviously to offer any 
>> options for sending POST requests. Your response below seems to show how I 
>> might get the access token back from the final POST request which I need to 
>> make to the Canvas Oauth2 flow. Can you show me how to do that POST, 
>> and what I need my view to return, to avoid getting and error which says 
>> that my view did  not return a valid HttpResponse but instead returned 
>> "None" like I've gotten up until now?
>> Thanks again for the help.
>>
>> Henry 
>>
>> On Saturday, January 17, 2015 at 7:33:40 AM UTC-6, Collin Anderson wrote:
>>
>>> Hi,
>>>
>>> Use urllib/urllib2 or requests to POST to other websites. Python can do 
>>> it natively.
>>>
>>> try:  # Python 3
>>> from urllib import request as urllib_request
>>> except ImportError:  # Python 2
>>> import urllib2 as urllib_request
>>> from django.utils.http import urlencode
>>>
>>> def my_view(request):
>>> response = urllib_request.urlopen('https://endpoint/', urlencode({
>>> 'mytoken': '12345'}))
>>> data = response.read()
>>> # etc
>>>
>>> https://docs.python.org/3/library/urllib.request.html
>>> https://docs.python.org/2/library/urllib2.html
>>>
>>> or install requests, which is friendlier:
>>> http://docs.python-requests.org/en/latest/
>>>
>>> Collin
>>>
>>> On Thursday, January 15, 2015 at 11:51:45 AM UTC-5, Henry Versemann 
>>> wrote:

 First let me say that I haven't done a lot of stuff with either Python 
 or Django, but I think I understand most of the basics. 
 I am trying to get an access token back from the OAuth2 Web Application 
 Flow of the Canvas' LMS API ( 
 https://canvas.instructure.com/doc/api/file.oauth.html ). 
 I have successfully sent the request in step 1 of the flow, and 
 received back and extracted out of the response all of the data needed for 
 step 3, which came back in step 2 

Re: Cannot overwrite 'get_fieldsets' in custom UserAdmin

2015-06-29 Thread Henri
Hi Lagovas,

the trace and error message when unregistering the default Django user with 
your code:

  File 
"/home/pacha/web/rcl-network.local/private/django/rcl-network/venv/local/lib/python2.7/site-packages/mezzanine/boot/__init__.py",
 
line 78, in autodiscover
admin_site.lazy_registration()
  File 
"/home/pacha/web/rcl-network.local/private/django/rcl-network/venv/local/lib/python2.7/site-packages/mezzanine/boot/lazy_admin.py",
 
line 33, in lazy_registration
getattr(AdminSite, name)(self, *deferred_args, **deferred_kwargs)
  File 
"/home/pacha/web/rcl-network.local/private/django/rcl-network/venv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py",
 
line 107, in unregister
raise NotRegistered('The model %s is not registered' % model.__name__)
django.contrib.admin.sites.NotRegistered: The model User is not registered


Am Sonntag, 28. Juni 2015 09:48:35 UTC+2 schrieb Lagovas Lagovas:
>
> first of all you need unregister default django models and then register 
> yours AdminModel like:
> admin.site.unregister(User)
> admin.site.register(User, CustomUserAdmin)
>
>
> пятница, 26 июня 2015 г., 3:16:24 UTC+3 пользователь Henri написал:
>>
>> I'm using a custom user model and a custom UserAdmin.
>> I try do overwrite the 'get_fieldsets' method to change some fields and 
>> hide some others, bud django admin still uses the  'get_fieldsets' method 
>> from django.contrib.auth.admin.UserAdmin.
>>
>> My CustomUserAdmin Class:
>>
>> from django.contrib.auth.admin import UserAdmin
>> from users.models import User  # custom user model
>>
>>
>> class CustomUserAdmin(UserAdmin):
>>
>> add_fieldsets = (
>> (None, {
>> 'classes': ('wide',),
>> 'fields': ('email', 'username', 'password1', 'password2')
>> }),
>> )
>>
>> # The forms to add and change user instances
>> form = UserChangeForm
>> add_form = UserCreationForm
>>
>> # The fields to be used in displaying the User model.
>> # These override the definitions on the base UserAdmin
>> # that reference specific fields on auth.User.
>> list_display = ('email', 'username', 'first_name', 'last_name', 
>> 'is_active', 'is_staff',
>> 'is_superuser')
>> list_filter = ('is_active', 'is_staff', 'is_superuser')
>> search_fields = ('email', 'first_name', 'last_name', 'username')
>> ordering = ('email',)
>> filter_horizontal = ('groups', 'user_permissions',)
>>
>>
>> def get_fieldsets(self, request, obj=None):
>> if not obj:
>> return self.add_fieldsets
>>
>> if request.user.is_superuser and request.user.pk != obj.pk:
>> perm_fields = ('is_active', 'is_staff', 'is_superuser',
>>'groups', 'user_permissions')
>> else:
>> perm_fields = ('is_active', 'is_staff', 'groups')
>>
>> return [(None, {'fields': ('email', 'password')}),
>> (_('Personal info'), {'fields': ('first_name', 
>> 'last_name', 'username', 'biography')}),
>> (_('Permissions'), {'fields': perm_fields}),
>> (_('Important dates'), {'fields': ('last_login', 
>> 'date_joined')})]
>>
>>
>> admin.site.register(User, CustomUserAdmin)
>>
>>
>>
>>
>> Some body have an idea, whats going on?
>> I'm working on this for days.
>> Please help.
>>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c2f195b5-2151-4bbd-ab39-eb978ae5a229%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to set back the data to ck-editor instance in a Django web app?

2015-06-29 Thread akshat
I have a Django web app which has various instances of ck-editor instances 
on a web page.By using on blur event I am saving whole of data of the 
instance in the database -

{% for editor in editors %}


{% endfor %}


Re: Cannot overwrite 'get_fieldsets' in custom UserAdmin

2015-06-29 Thread Henri
Felippe,

No, it seems, that my"get_fieldsets"  isn't called.

Also when debugging by stepping through the code, as described in my second 
post, I see when loading the UserChangeForm the 'get_fieldsets' method from 
django.contrib.auth.admin.UserAdmin is used instead of my custom one.

Regards, Henri


Am Montag, 29. Juni 2015 16:15:16 UTC+2 schrieb Felippe Raposo:
>
> Henri, can you set a "pdb.set_trace" or print something  at the beginning 
> of your "get_fieldsets" to see if it is being called or not?
>
> 2015-06-28 6:58 GMT-03:00 Henri >:
>
>> As I use a custom user model the default django user model is not 
>> registered. When I try to unregister it I get an error.
>>
>> See example in the django docs:
>>
>> https://docs.djangoproject.com/en/1.6/topics/auth/customizing/#a-full-example
>> .
>>
>> Regards, Henri
>>
>> --
>> 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 http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b169e3a8-29a5-4d33-b543-06b8d53597f0%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/144e1ef9-9116-4e20-be5f-9229e95aea90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Blog post

2015-06-29 Thread Leandro David Cacciagioni
Hi guys, this is my first time here but I need from your experience and 
your thoughts about this blog post that I have 
written: http://wp.me/p5G2dP-2K
I'm from Argentina and I'm really sorry about my English but any feedback 
from this list could be great!!!

Thanks,
Leandro.-

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a36d2595-7660-4aeb-b697-577a301e005e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Apps for versioning model fields

2015-06-29 Thread Fabio C. Barrionuevo da Luz
Hello, I need to implement versioning of a TextField to an electronic
system to manages documents.

Before I try to reinvent the wheel, I'd like to know what are the reusable
apps are available that solve this problem.

I have the following model class:
https://gist.github.com/luzfcb/226612d0b98dd4493f9d

I need versioning only the field 'content'

the type of versioning I need is much like the way it is implemented
versioning of articles on Wikipedia.

I'm trying to use django-reversion, however, I think it is not designed for
this use case.

Would you recommend me look any specific library? If so, what are the pros
and cons What do you think of it?

I appreciate the help in advance.


-- 
Fábio C. Barrionuevo da Luz
Acadêmico de Sistemas de Informação na Faculdade Católica do Tocantins -
FACTO
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPVjvMZi%2BgRmiizHErzhCTiGouQNDAB9EENA3S0xS1hUKqnt3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.