Lack of tutorials and explanations about channels

2021-11-10 Thread Dossou Mawussekuifan Gloria Donald KANTI
Why aren't there much tutorials and explanations about Channels and 
websocket integration in django over the internet ? Quite confusing. How 
can we get to know and understand it more if nobody wants to explain it. I 
am new to python and drf, wanna implement some realtime features in my app 
but no chance to get good resources explaining very well how things can be 
done. If there are some pros here knowing very well about the topic please, 
write some blog or make some detailed youtube videos to explain the topic. 
It will really help me and others in the future. It is crucial also for the 
image of django. Thank you

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0c512950-44dc-4b87-b2e5-ff74d8648269n%40googlegroups.com.


Re: updating model breaks admin

2018-04-30 Thread Gloria Elena
Hi George,

Thanks for the advice. I tried both suggestions and I am still getting the
same errors.

Here is my articles app structure and admin.py:


And here is my site structure:


Thank you!!


On Sun, Apr 29, 2018 at 11:50 PM, George Lubaretsi <glubare...@gmail.com>
wrote:

> If the data is not important, try to delete migration files from
> `migrations` package, drop the database tables and reference M2M
> relationship using strings:
>
> tags = models.ManyToManyField('Tag')
>
> Or if the Tag model is in another app:
>
> tags = models.ManyToManyField('app_name.Tag')
>
> Then run `makemigrations` and `migrate`
>
> Can you also share the `Tag` model and related `ModelAdmin` classes?
>
> --
> 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/9d251f4a-b4ea-48b0-946b-458ea6f2957d%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-

Gloria Jimenez
Jr. Software Developer

<https://github.com/gelenaj> <https://www.linkedin.com/in/gloriajimenez>

-- 
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/CADOCafiPg0-jtFMCLOKVufth_D2_3Ttzw9xsc2OkZWP_HZ62ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


updating model breaks admin

2018-04-29 Thread Gloria Elena
Hi all,

I want to request your help and I am sure you can guess by the question
that I am fairly new to Django and THANK YOU IN ADVANCE, I would like to,
someday, publish this portfolio website. I am sure I am making such a
rookie mistake and will have to kick myself for making such a silly error
but I am stuck !! Hope to pay it forward.

*I have this model in the articles app that works great: *

class Article(models.Model):
title = models.CharField(max_length=120, unique=True)
body=models.TextField(max_length=600)
date=models.DateField()
created = models.DateField(auto_now_add=True)
featured=models.BooleanField(default=False)
slug = models.SlugField(blank=True)


*UNTIL I add a new class and add this field:*

tags = models.ManyToManyField(Tag)


*Error message when adding a new article in admin:*


* OperationalError at /admin/articles/article/add/cursor
"_django_curs_5508_1" does not exist Error message when adding a new tag in
admin: *


* ProgrammingError at /admin/articles/tag/add/relation "articles_tag" does
not exist LINE 1: SELECT (1) AS "a" FROM "articles_tag" WHERE
"articles_tag".".. What I have tried to no avail:1) deleting all articles2)
migrate & makemigrations 3) deleting any references to tags in my
templates4) searching these errors on stackoverflow *

-- 
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/CADOCafiMBCKrFqNQdzf1teXkYO7SmjMK9kN__T3-XXdp5one%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Reference to form cleaned data field throws TypeError: 'exceptions.AttributeError' object is not callable

2014-06-03 Thread Gloria W
This is the strangest bug I've seen in Django. (1.6.4 on Ubuntu 14.04, 
Python 2.7.6)
 It is sporadic, but once it starts happening, it is consistent until I 
restart the process. 
To try and debug it, I print the value of self.cleaned_data just before it 
occurs. The value prints fine. 


The code:

def clean_email(self):
logger.warn("Debugging Attribute error:%s" % 
pprint.pformat(self.cleaned_data))
try:
FytUser.objects.get(email=self.cleaned_data['email'])
raise forms.ValidationError('A user with that email address 
already exists.')
except FytUser.DoesNotExist:
return self.cleaned_data['email']


The traceback in the uwsgi logs: 

Debugging Attribute error:{'email': u't...@test.net'}

Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", 
line 114, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "./registration/views.py", line 54, in preregister_check
if form.is_valid():

  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 
129, in is_valid
return self.is_bound and not bool(self.errors)

  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 
121, in errors
self.full_clean()

  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 
273, in full_clean
self._clean_fields()

  File "/usr/local/lib/python2.7/dist-packages/django/forms/forms.py", line 
291, in _clean_fields
value = getattr(self, 'clean_%s' % name)()

  File "./fyt/forms.py", line 87, in clean_email
FytUser.objects.get(email=self.cleaned_data['email'])

  File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py", 
line 151, in get
return self.get_queryset().get(*args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 
307, in get
self.model._meta.object_name)

TypeError: 'exceptions.AttributeError' object is not callable


,
POST:'], u'discount_code': 
[u'']}>,
COOKIES:{'_ga': 'xxx',
 'csrftoken': 'x',
 'sessionid': 'xx',
 'signup_modal': 'true'},
META:{'CONTENT_LENGTH': '221',
 'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
 u'CSRF_COOKIE': u'xx',
 'DOCUMENT_ROOT': '/home/xx',
 'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CACHE_CONTROL': 'no-cache',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_CONTENT_LENGTH': '221',
 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
 'HTTP_COOKIE': 'csrftoken=xxx; sessionid=xx; _ga=xx; 
signup_modal=true',
 'HTTP_HOST': 'findyourtrainer.com',
 'HTTP_PRAGMA': 'no-cache',
 'HTTP_REFERER': 'https://x/register?next=/ 
',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 
Firefox/29.0',
 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
 'PATH_INFO': u'*/prereg_check/*',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '',
 'REMOTE_PORT': '37998',
 'REQUEST_METHOD': 'POST',
 'REQUEST_URI': '*/prereg_check/*',
 u'SCRIPT_NAME': u'',
 'SERVER_NAME': '.com',
 'SERVER_PORT': '443',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'UWSGI_SCHEME': 'https',
 'uwsgi.node': '.com',
 'uwsgi.version': '2.0.4',
 'wsgi.errors': ,
 'wsgi.file_wrapper': ,
 'wsgi.input': ,
 'wsgi.multiprocess': True,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'https',
 'wsgi.version': (1, 0)}>


This looks like a memory leak to me. Has anyone else seen this?
Thanks in advance,
~G~

-- 
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/11ddf2f6-7a07-4c1e-86db-b7e0223546ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


"original" not set in admin template django/contrib/admin/templates/admin/submit_line.html after upgrade

2013-09-25 Thread Gloria W
Hi all,

I recently upgraded a site from 1.4 to 1.5.4, and it seems like in the 
submit_line template, "original" is not set. 
This line fails for that reason:

{% if show_delete_link %}{% trans "Delete" %}{% endif %}

The template chain at this point is so nested that it's hard to figure out 
where "original" originated. Does anyone know what is going on here?

Thank you,
Gloria

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Circular import on every backend except sqlite

2011-06-03 Thread Gloria W
I found it. Someone else on the machine had replaced mod_wsgi with a
2.6 variant they compiled. I am using one I compiled for 2.7.1.
Nasty things happen when the mod_wsgi module doesn't match the python
version one's running.
What a P.I.T.A. to find.

Gloria

On Jun 2, 9:11 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Thu, Jun 2, 2011 at 12:44 PM, Gloria W <strang...@comcast.net> wrote:
> > I am experiencing this:
> >https://code.djangoproject.com/ticket/16136
> > and the only way I can prevent it is by using sqlite.
> > Does anyone have a patch for this, or more info?
> > Thank you in advance,
> > Gloria
>
> WFM, + everyone else. Reinstall django, I don't believe (looking at
> that ticket) that it is installed properly.
>
> Cheers
>
> Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Circular import on every backend except sqlite

2011-06-02 Thread Gloria W
I am experiencing this:
https://code.djangoproject.com/ticket/16136
and the only way I can prevent it is by using sqlite.
Does anyone have a patch for this, or more info?
Thank you in advance,
Gloria

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-12-01 Thread Gloria

After much digging, I discovered that I cannot iterate over a
forms.ModelMultipleChoiceField.
This explains the template iteration issue.
It seems like I need a FormSet to be able to set these values, and
iterate over them.
This is overly complicated, just for a set of checkboxes, but it looks
like it will work.
~G~

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-11-30 Thread Gloria


>
> Hmmm... what are you trying to do by passing the queryset?  Doesn't that
> send your form everybody's data, instead of just the active user?

No, it doesn't. It returns all available options that users can
optionally select. Users selections of these fields are stored
elsewhere.

> If I
> recall correctly, passing a queryset will initialize a form, so perhaps all
> you need to do there is make it a "get" that returns only the current user's
> data?

I am doing this already. The problem is, getting all checkboxes, and
using the user-specific data to check the "checked" boxes isn't
working.

~G~

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-11-29 Thread Gloria
Here's the line from my model:
class UserProfile(models.Model):
some other fields...
privacy_options = models.ManyToManyField(PrivacyOption,
blank=True, null=True, db_table = 'usr_privacy_selection')

Here's the bit from my form:

class ModifyProfileForm(forms.Form):
some other fields...
privacy = forms.ModelMultipleChoiceField(
queryset=PrivacyOption.objects.all(),
required=False,
show_hidden_initial=True,
widget=forms.CheckboxSelectMultiple,
)

Here's whats happening in my view.

When I initialize it like this:

data = {some other fields...
'privacy' : user_profile.privacy_options
}

form=ModifyProfileForm(data)

Then I show it in the template:
{{ form.privacy.label_tag }}
{{ form.privacy }}
{{ form.privacy.errors }}

I get this error:
Caught an exception while rendering: 'ManyRelatedManager' object is
not iterable

So I change the template like so:
{% for privacy in form.privacy.all %}
{{privacy}}
{% endfor %}

and I get this in my browser:

 Privacy

* Enter a list of values.


as if it is not displaying any checkboxes because none have a value
set in them yet.

I want to display all checkboxes, and then check the ones which are
set.

I commented out this change in the view, no longer initializing the
form:

#'privacy' : user_profile.privacy_options,

and I still see nothing in my browser, unless I change the template to
this:

{{ form.privacy }}

Then, at least I see all checkboxes:

   Privacy
  o Show My Profile Page
  o Show Expertise
  o Show Affiliations
  o Show Organization
  o Show Contact Info
  o Allow Messages

Now, let me uncomment the init again, and try to initialize this form
to the db values:
'ManyRelatedManager' object is not iterable error again.

Trying to set the initial value for this particular field also does
not seem to help:

initial_dict = {}
for x in user_profile.privacy_options.all():
initial_dict[x.name]=True

form=ModifyProfileForm(data)
form.fields['privacy'].initial = initial_dict

The selected options never show up.

I know the selections are being passed to a user_profile instance and
stored in the database. So maybe this is a template rendering issue?

Thanks again,
Gloria



--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-11-29 Thread Gloria
Thanks for the response. I am trying to do this on the server side.
Here is more detail.
I am initializing it to all unchecked checkboxes in my forms.py.
Then, in my view, I am trying to have HTML generate a "checked" value
for certain checkboxes, based on some user data I received in that
view.
How do I generate "checked" HTML option using the builtin
ModelMultipleChoiceField for certain checkboxes? Is there a builtin
option that I  should set manually to cause the "checked" option to be
generated? Or do I have to iterate over these fields, match them with
data I have received, and generate the "checked" option myself, in the
template?

Thanks!

~G~

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




ModelMultipleChoiceField with checkboxes: How to generate the HTML "checked" option?

2009-11-28 Thread Gloria
Hi all,
I've spent way too much time getting trying to get this widget to work
the way I am envisioning.
In the forms, I want to initialize it, but in the view I need to
determine which boxes are checked.
Has anyone done this without writing their own widget? It would be
great to know how.
Thank you in advance,
Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria

Oh, geez you are NEVER going to believe what caused this error.

This causes it:

user = authenticate(user_name)

This makes it work:

user = authenticate(username = user_name)

The error is vague because authenticate() accepts **kwargs.

How did I find it, you may ask? I set a breakpoint using pdb, right
before the authenticate() call. I then ran runserver, and stepped into
the callback. I saw that it was indeed authenticating against each
model given in the settings file.

Argh! Finally. Now I can sleep.

Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria
The post before this one never made it. Strange.
I have no other custom authenticate() methods. I did try to call my
own directly, and this worked, but it's not the recommended way.
Is there some more debug info I can turn on, to see what authenticate
() methods Djongo is trying to invoke? It's appanrently ignoring mine,
and gettiong one from somewhere not obvious to me.
Thanks for your help,
Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria
After further examination, it looks like Django is completely ignoring
my setting:

AUTHENTICATION_BACKENDS =
('pg.ip.profile.auth_backend.AuthBackend','django.contrib.auth.backends.ModelBackend')

Argh...

Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria
Environment:

Request Method: POST
Request URL: http://localhost:8000/login/
Django Version: 1.1.1
Python Version: 2.6.0
Installed Applications:
['attachments',
 'avatar',
 'soaplib',
 'notification',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.flatpages',
 'django.contrib.redirects',
 'django.contrib.humanize',
 'django.contrib.comments',
 'django_extensions',
 'ajax_validation',
 'djangoratings',
 'debug_toolbar',
 'solango',
 'voting',
 'tagging',
 'compress',
 'opencrowd.django.apps.portal_layout',
 'mailer',
 'pg_logging.singleton_logger',
 'pg.ip.misc',
 'pg.ip.taxo',
 'pg.ip.search',
 'pg.ip.client',
 'pg.ip.profile',
 'pg.ip.community',
 'pg.ip.activity',
 'pg.ip.performance',
 'pg.ip.comments']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 
'opencrowd.django.apps.portal_layout.middleware.PageLayoutFallbackMiddleware')


Traceback:
File "/usr/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/
core/handlers/base.py" in get_response
  92. response = callback(request, *callback_args,
**callback_kwargs)
File "/mnt/XP_D/Opencrowd/PressGaney/pg_trunk/main/pg/ip/profile/
views.py" in local_login
  82.   user = authenticate(user_name)

Exception Type: TypeError at /login/
Exception Value: authenticate() takes exactly 0 arguments (1 given)

Thanks,
Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria
Aye, there's the rub. My authenticate takes at least one parameter:

from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.backends import ModelBackend

class AuthBackend(ModelBackend):
"""
Custom authentication: No password, because of SOAP
passthrough.
"""
def authenticate(self, username, password=None):
try:
user = User.objects.get(username=username)
if not user:
# Create a new user. Note that we can
set password
# to anything, because it won't be
checked; the password
# from settings.py will.
user = User(username=username,
password="default")
user.is_staff = False
user.is_superuser = False
user.save()

return user

except:
#except User.DoesNotExist:
# Create a new user. Note that we can set
password
# to anything, because it won't be checked;
the password
# from settings.py will.
user = User(username=username,
password="default")
user.is_staff = False
user.is_superuser = False
user.save()
return user


def get_user(self, user_id):
try:
return User.objects.get(pk=user_id)
except User.DoesNotExist:
return None

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




custom backend causes this error: authenticate() takes exactly 0 arguments (2 given)

2009-11-24 Thread Gloria
Hi all,

I am using the SettingsBackend sample code, from here:

http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.authenticate

in Django 1.1.1, python 2.6, and I get this error:

TypeError at /login/
authenticate() takes exactly 0 arguments (2 given)

I've tried making SettingsBackend inherit from ModelBackend (which is
what I really want), but this does not change the behavior.

Thanks in advance,
Gloria

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: TypeError: save() got an unexpected keyword argument 'profile_callback'

2009-09-28 Thread Gloria

Beautiful! Thanks for this very concise response. It helped greatly.
Gloria
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: TypeError: save() got an unexpected keyword argument 'profile_callback'

2009-09-27 Thread Gloria

Some logging debug, placed in /usr/local/lib/python2.6/dist-packages/
django/core/handlers/base.py:

   import logging
import pprint
logging.error("Args: %s %s %s %s" % (pprint.pformat
(callback),pprint.pformat(callback_args),pprint.pformat
(callback_kwargs),pprint.pformat(request.path_info)))

response = callback(request, *callback_args,
**callback_kwargs


The results:

2009-09-27 18:20:56,279 root: ERRORArgs:  () {'form_class': } u'/users/
register/'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



TypeError: save() got an unexpected keyword argument 'profile_callback'

2009-09-27 Thread Gloria

Hi All,

I have inherited some Django code, I'm porting it to a new machine,
and here is an error I'm getting, which is proving to be hard to
trace:

Traceback (most recent call last):

  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)

  File "build/bdist.linux-x86_64/egg/registration/views.py", line 148,
in register
new_user = form.save(profile_callback=profile_callback)

TypeError: save() got an unexpected keyword argument
'profile_callback'

I can't find build/bdist.linux-x86_64/egg/registration/views.py on my
system, strangely enough. Is this portion of Django byte compiled,
then removed?

I'm running Django 1.2 Apha (although this also happens in 1.1) with
Satchmo 0.9 on a Debian EC2 instance using WSGI. My weekend is shot :)

Thank you in advance,
Gloria

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Any SELECT returns no results via Django

2007-12-20 Thread Gloria W

More info on this: I am connecting to the db via an ssh tunnel. In the
settings-*.py files, I use
DATABASE_HOST = '127.0.0.1'
Works like a charm, except with the connection module. It is probably
not connecting.
Help!
Gloria

On Dec 19, 7:41 pm, Gloria W <[EMAIL PROTECTED]> wrote:
> I am boggled. A SELECT from the MySql command line works just fine.
> But within Django, it returns nothing. It doesn't matter what SQL
> statement I issue.
>
> Here is my syntax:
>
>  from django.db import connection
>   cursor = connection.cursor()
>   cursor.execute("use editorial_production_2007_12_14; SELECT
> category_id,message_id FROM categories_messages")
>
>  rows = cursor.fetchall()
>
> I'm stuck using Django 0.95 and Python 2.4 on an X86-64 Linux box.
>
> Has anyone else experienced this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Any SELECT returns no results via Django

2007-12-19 Thread Gloria W

I am boggled. A SELECT from the MySql command line works just fine.
But within Django, it returns nothing. It doesn't matter what SQL
statement I issue.

Here is my syntax:


 from django.db import connection
  cursor = connection.cursor()
  cursor.execute("use editorial_production_2007_12_14; SELECT
category_id,message_id FROM categories_messages")

 rows = cursor.fetchall()

I'm stuck using Django 0.95 and Python 2.4 on an X86-64 Linux box.

Has anyone else experienced this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Support for Federated MySql table?

2007-11-30 Thread Gloria W

Hi, I'm using Django 0.95 on Python2.4, and it seems that it doesn't
fully support federated tables in Mysql.

The problem I have is that the manage.py inspectdb dumps a table which
matches my sql table in construct, but no info about being federated.
So an objects.filter() on some of these fields is failing, although I
can see the fields when I iterate over the records.

Any help or pointers to good docs on Django's handling of federated
tables and foreign keys (for another problem I'm having) would be
greatly appreciated.

Thank you,
Gloria
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: KeyError, Submit Empty Field and Form Validation

2007-11-13 Thread Gloria W

This was an excellent response, and helped me immediately. Thank you.
~G~


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Multiple databases, same Django instance.

2006-10-08 Thread Gloria

Hi, I was wondering if the feature is fully supported yet.
I have more than one existing "legacy" database that I would like to
support from the same Django instance.

How do I safely bring the Django tables into each database? Do you run
syncdb on an empty copy, then add your tables, then importdb?

If I could get past this error, I'd try this myself:

[EMAIL PROTECTED] tp]$ python manage.py syncdb
['Traceback (most recent call last):\n', '  File
"/usr/local/python/2.5/lib/python2.5/site-packages/Django-0.95-py2.5.egg/django/core/management.py",
line 422, in _install\n"references" % model)\n', "Exception:  is not installed, but
it has pending references\n"]
Error: auth couldn't be installed. Possible reasons:
  * The database isn't running or isn't configured correctly.
  * At least one of the database tables already exists.
  * The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlall auth'. That's the
SQL this command wasn't able to run.
The full error:  is not installed, but
it has pending references
[EMAIL PROTECTED] tp]$


This started happening after I installed the multiple db patch.
What did I miss? 
Thank you in advance,
Gloria


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Dojo Editor2 invocation from Django

2006-09-06 Thread Gloria

OK, so here is what I'm trying to render from the Django view (so I
don't have to deal with the correct way to reference static content
just yet):

# Create your views here.
from django.http import HttpResponse

def index(request):
return HttpResponse('''


 dojo.require("dojo.widget.Editor");






...It could scarcely be easier.





''')


My urls.py looks like this:

urlpatterns = patterns('',
# Example:
# (r'^tp/', include('tp.apps.foo.urls.foo')),

(r'^tp/', include('tp')),
(r'/?editor/', 'tp.editor.views.index'),
(r'^annotator/', 'tp.annotator.views.index'),
#(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT})
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
)


I am close. I get the box with the text, but no functional javascript.

Thank you in adavce for your help,
~G~


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Dojo Editor2 invocation from Django

2006-09-06 Thread Gloria

Patrick, thank you. I appreciate this feedback.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Dojo Editor2 invocation from Django

2006-09-06 Thread Gloria

Thank you for your responses. The steps Patrickk lists are repretitive,
just like the ones listed in the link I had referenced, except #4 and
the comment below it. Those were helpful, thank you.

Re: The bugs in the Dojo Editor2: Are they so serious that you would
not consider fixing them if you were a rich text javascript developer,
looking for an editor to incorporate into your product?

Re: FckEditor: Is it mature enough to be used in a product? Do any
products currently use it? Isn't it easy to remap the key sequences for
break vs. paragraph? Or is this deeply embedded in the code for some
reason?

Re: TinyMce: I hear great things about this editor, but not from
developers. I need to be able to customize the editor I ultimately
choose. I hear it's not as mature as the Dojo editor. Is this true?

Should this be taken offline, because it's tangential to Django? Or
should it be left here for others looking to integrate rich text
editing?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Dojo Editor2 invocation from Django

2006-09-05 Thread Gloria

Hi there. I found this nifty when I searched for Django and Dojo:

http://code.djangoproject.com/wiki/AddDojoEditor

The thread on this link is closed, so I am starting a new one.

Please explain how I invoke this code. I am fairly new to Django, and
I've avoided javascript like the plague over the years, but I
understand the constructs.

This example explains the model and the media interface. But how do I
invoke this piece of js code from within my view?

Thanks for tolerating neophyte questions here.

Gloria


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Django neophyte question.

2006-08-15 Thread Gloria

Geez! Thank you. :)

I am still waiting for my RhubarbTart question to be answered, which I
posted two weeks ago (I gave up and fixed the bug myself).  Yet here, I
get a pile of responses almost instantaneously. This is yet another
reason for me to try Django. 8)

I am sure once I complete the tutorial, I will have questions related
to serving static content, and retrofitting an existing DB into this
framework. 

Thank you once again,
Gloria


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django neophyte question.

2006-08-14 Thread Gloria

Hi. I am a Python geek who has been in the CherryPy/PythonPaste world
for the past year. I have decided to give Django a serious look, and I
have a simple question.

After running this command:

[EMAIL PROTECTED] wi_2> python manage.py runserver 
Validating models...
0 errors found.

Django version 0.95, using settings 'wi_2.settings'
Development server is running at http://127.0.0.1:/
Quit the server with CONTROL-C.

I expect to get to this URL from a remote machine, like this:

http://dev.blah_server.com:

This works in cherryPy and PythonPaste from behind the firewall, so I
know it's not a port issue.

I'm sure I'm missing something simple. Please let me know what url
parameter to set to access my page from a remote machine.

Thank you,
Gloria


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---