Re: Django tutorial part 4: unresolved error?
Hi all, I just realised my error, so no worries. In my 'polls/urls.py', I am supposed the specify the value of the parameter, 'app_name', as 'polls'. Instead, I used 'app_names' rather than 'app_name' - typo. My bad! Ed On Saturday, November 4, 2017 at 10:52:33 PM UTC, Su-Shin Ang wrote: > > Hi all, > > I am getting started with Django, and working through the tutorial. I am > currently stuck at part 4, as follows. > > https://docs.djangoproject.com/en/1.11/intro/tutorial04/ > > Specifically, I am getting the following error. > > NoReverseMatch at /polls/1/ > > 'polls' is not a registered namespace > > > > > > https://stackoverflow.com/questions/14892462/django-error-upolls-is-not-a-registered-namespace > > > I notice that there were a number of posts of it online, but no real > resolution of the problem. I will to check if anyone out there has any > thoughts about how to resolve this. > > > Thanks in advance, > > Ed > > -- 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/5d58d3ec-a522-4fb1-b0be-4f3502e399e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Django tutorial part 4: unresolved error?
Hi all, I am getting started with Django, and working through the tutorial. I am currently stuck at part 4, as follows. https://docs.djangoproject.com/en/1.11/intro/tutorial04/ Specifically, I am getting the following error. NoReverseMatch at /polls/1/ 'polls' is not a registered namespace https://stackoverflow.com/questions/14892462/django-error-upolls-is-not-a-registered-namespace I notice that there were a number of posts of it online, but no real resolution of the problem. I will to check if anyone out there has any thoughts about how to resolve this. Thanks in advance, Ed -- 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/e08af6ae-d521-48a2-97c8-00c5d51310da%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Attempting to setup Graphite (Django/Gunicorn) DJANGO_PATH not set and "no such table: auth user"
> > Resolved although at the moment I don't have the answer to my specific > questions. > I found a working and maintained script for installing on Ubuntu. I can't say how extraordinary it is to actually find a Graphite install script that sets up Django in working order https://github.com/gdbtek/setup-graphite Tony -- 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/6541afb6-8d1c-413c-a248-545839602561%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Attempting to setup Graphite (Django/Gunicorn) DJANGO_PATH not set and "no such table: auth user"
Apache 2.4 on Ubuntu 13.10 First, If anyone knows of a working install script to install Graphite on any distro preferably (but not critical) using Apache2.4, gunicorn and WSGI, I'd appreciate it. I've been wending my way through a variety of undocumented and less documented issues that differ from the official documentation for a week now... Thx, Tony I have 2 current questions: Q - I strongly suspect that DJANGO_PATH is not set. I've found documentation that suggests how it might be set from an interactive console on Windows http://stackoverflow.com/questions/7479493/django-settings-module-is-undefined But, I strongly suspect it should have been set already in a config script somewhere, but I can't seem to find it. For such a basic configuration, where would I expect to find it? I've also tried to do the following from a console but it doesn't work export PATH=$DJANGO_PATH:/usr/lib/python2.7/dist-packages/django/bin * Q - "no such table: auth user" I attempted to resolve running "manage.py rsync" and "django-admin.py rsync" as I've found in a few articles, but still SOL. Error follows DatabaseError at /composer/ no such table: auth_user Request Method: GET Request URL: http://localhost/composer/ Django Version: 1.5.4 Exception Type: DatabaseError Exception Value: no such table: auth_user Exception Location: /usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py in execute, line 362 Python Executable: /usr/bin/python Python Version: 2.7.5 Python Path: ['/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/opt/graphite/webapp'] Server time: Mon, 10 Mar 2014 14:12:29 -0700 -- 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/16e487ac-4ebd-4bf4-9568-17ae48730c53%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Displaying markdown in html
doc:disable auto-escaping This will not be escaped: {{ data|safe }} -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/JtUzSEmy2X4J. 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: Displaying markdown in html
#model class Article(models.Model): udate=models.DateTimeField(auto_now=True,auto_now_add=True) markdown_content=models.TextField() html_content=models.TextField(editable=False) def save(self): self.html_content=markdown(self.markdown_content) self.update=datetime.datetime.now() super(Article,self).save() #template {{ article.html_content|safe}} Update:{{article.update }} -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/A2TjUW3Ad7AJ. 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: django- accessing items in a python dictionary
what is value of the etc? 2012/4/29 Alan Mo : > My dictionary is as follows: > > data={"BE1234":"abc", "BA3212":"efg", etc} > > I call it through django templates. According to the online manual, they say > "if your context contained a dictionary data, the following would display > the keys and values of the dictionary": > > {% for key, value in data.items %} > {{ key }}: {{ value }} > {% endfor %} > > I get the error: TemplateSyntaxError: 'for' statements with five words > should end in 'reversed': for key, value in data.items > > Can anyone help me fix this error? It's really frustrating. Just wondering > if I'm doing something stupid. Thanks in advance. > > > posted on > stackoverflow: http://stackoverflow.com/questions/10371168/django-accessing-items-in-a-python-dictionary > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/jZK0GkgxJ0oJ. > 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. -- 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: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py
"from userena.models import UserenaBaseProfile " in settings.py cause this problem. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/AA_cMGHU4XYJ. 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: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py
I got this error when I syncdb. 在 2012年4月23日星期一UTC+8上午11时51分18秒,BFSchott写道: > > This should work: > > # django-guardian requires an anonymous user > ANONYMOUS_USER_ID = -1 > > Also, I think you need to "python manage.py syncdb" the first time you use > it. > > Brian Schott > bfsch...@gmail.com > > > > On Apr 22, 2012, at 11:41 PM, su wrote: > > I set ANONYMOUS_USER_ID in my project setting. > It doesn't work. > > > Error message: > --- > > > Traceback (most recent call last): > File "manage.py", line 10, in > execute_from_command_line(sys.argv) > File > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", > line 443, in execute_from_command_line > utility.execute() > File > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", > line 382, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", > line 252, in fetch_command > app_name = get_commands()[subcommand] > File > "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", > line 101, in get_commands > apps = settings.INSTALLED_APPS > File > "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line > 184, in inner > self._setup() > File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", > line 42, in _setup > self._wrapped = Settings(settings_module) > File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", > line 93, in __init__ > mod = importlib.import_module(self.SETTINGS_MODULE) > File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", > line 35, in import_module > __import__(name) > File "/home/su/document/django/simpleSNS/simpleSNS/settings.py", line 8, > in > from userena.models import UserenaBaseProfile > File "/usr/local/lib/python2.7/dist-packages/userena/models.py", line > 12, in > from userena.managers import UserenaManager, UserenaBaseProfileManager > File "/usr/local/lib/python2.7/dist-packages/userena/managers.py", line > 11, in > from guardian.shortcuts import assign, get_perms > File "/usr/local/lib/python2.7/dist-packages/guardian/shortcuts.py", > line 9, in > from guardian.core import ObjectPermissionChecker > File "/usr/local/lib/python2.7/dist-packages/guardian/core.py", line 7, > in > from guardian.utils import get_identity > File "/usr/local/lib/python2.7/dist-packages/guardian/utils.py", line > 11, in > from guardian.conf.settings import ANONYMOUS_USER_ID > File "/usr/local/lib/python2.7/dist-packages/guardian/conf/settings.py", > line 6, in > raise ImproperlyConfigured("In order to use django-guardian's " > django.core.exceptions.ImproperlyConfigured: In order to use > django-guardian's ObjectPermissionBackend authorization backend you have to > configure ANONYMOUS_USER_ID at your settings module > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/BY1w2ckqa34J. > 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. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Uy_8FQThbp0J. 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.
guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py
I set ANONYMOUS_USER_ID in my project setting. It doesn't work. Error message: --- Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 443, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 252, in fetch_command app_name = get_commands()[subcommand] File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 101, in get_commands apps = settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 184, in inner self._setup() File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 93, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/su/document/django/simpleSNS/simpleSNS/settings.py", line 8, in from userena.models import UserenaBaseProfile File "/usr/local/lib/python2.7/dist-packages/userena/models.py", line 12, in from userena.managers import UserenaManager, UserenaBaseProfileManager File "/usr/local/lib/python2.7/dist-packages/userena/managers.py", line 11, in from guardian.shortcuts import assign, get_perms File "/usr/local/lib/python2.7/dist-packages/guardian/shortcuts.py", line 9, in from guardian.core import ObjectPermissionChecker File "/usr/local/lib/python2.7/dist-packages/guardian/core.py", line 7, in from guardian.utils import get_identity File "/usr/local/lib/python2.7/dist-packages/guardian/utils.py", line 11, in from guardian.conf.settings import ANONYMOUS_USER_ID File "/usr/local/lib/python2.7/dist-packages/guardian/conf/settings.py", line 6, in raise ImproperlyConfigured("In order to use django-guardian's " django.core.exceptions.ImproperlyConfigured: In order to use django-guardian's ObjectPermissionBackend authorization backend you have to configure ANONYMOUS_USER_ID at your settings module -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/BY1w2ckqa34J. 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: Hosting Django website
If you have vps ,django+nginx+uwsgi is an easy way. You can google "django+nginx+uwsgi " . 在 2012年4月8日星期日UTC+8下午9时59分51秒,KasunLak写道: > > Hi all, > > I have created a website using django. I want to host it now. Can you > suggest me a best way to host it? I have noticed it is possible to > host in tomcat on top of jython, is this recommended or have any > issues? > > thanks in advance, > Kasun 在 2012年4月8日星期日UTC+8下午9时59分51秒,KasunLak写道: > > Hi all, > > I have created a website using django. I want to host it now. Can you > suggest me a best way to host it? I have noticed it is possible to > host in tomcat on top of jython, is this recommended or have any > issues? > > thanks in advance, > Kasun -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/H-hDDfVMa8wJ. 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.
lose access to my app on dashboard when setting.DEBUG=False
It works fine with DEBUG=True. But when I set settings.DEBUG=False, I can,t access my app on dashboard except sites and auth. It is strange. Any idea? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/N525zsZcrd0J. 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: Error on Tutorial Part 3 - https://docs.djangoproject.com/en/1.3/intro/tutorial03/
like this: your_project--- |---__init__.py |---settings.py |---urls.py |---manage.py |---app_A--- | |---__init__.py |---models.py |---view.py |---templates--- | |---index.html -- 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.
How can I run my django project with django-social-auth?
Dear All! I want to create Django login form via facebook. So I am using with django-social-auth. Can every one guide me in detail how should I do continuously after clone django-social-auth to my project? Regards Su -- 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.