Home > Cannot Use > Cannot Use None As A Query Value Flatpages

Cannot Use None As A Query Value Flatpages

Why is looping over find's output bad practice? raise ValueError("Cannot use None as a query value") Exception Type: ValueError at /admin/flatpages/flatpage/add/ Exception Value: Cannot use None as a query value Oldest first Newest first Threaded Show comments Show property Probable you forgot to specify 'site' field. docs.python.org/howto/logging.html docs.python.org/library/logging.html stalkerg 22 августа 2012 в 01:43 0 ↑ ↓ Вот по этому я и не использую Django. have a peek here

django: flatpages error "Cannot use None as a query value" Если при попытке сохранения flatpage из админки django вылезает страница с ошибкой "Cannot use None as a query value", то скорее To post to this group, send email to [email protected] return view(request, *args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\utils\decorators.py" in _wrapper 25. add? вы что-то путайте wpm1 2 августа 2012 в 11:09 +1 ↑ ↓ да, точно, этот флаг передается в метод pre_save модели. http://stackoverflow.com/questions/13257188/python-django-and-flatpage

Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed Back to Top Django Links Learn More About Django Getting Started with Django Django Software Foundation Code of Conduct Get Involved Also it works when add node in such way: from django.utils.timezone import now node = get(root.id).add_child(content='Memory', createDateTime=now()) In comment to get_sorted_pos_queryset method written that its from django-mptt, so I found this Not the answer you're looking for? MaGIc2laNTern 2 августа 2012 в 01:02 0 ↑ ↓ Полагаю, что дело именно в том, что оно у вас отдельно от Django. Если интересно, можете проверить соответствующий файл — может быть

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Comments (1) Fernando Gutierrez changed status to invalid This is documented behavior, I've added another alternative for the workaround in the docs here: https://bitbucket.org/tabo/django-treebeard/commits/9462f8b1eafc77a97a09e34169fa5a8c558326b3 In theory, we could try to detect django-lfs: опыт использования. часть 1 ( установк... more hot questions question feed lang-py about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation

Thank you python django share|improve this question edited Nov 6 '12 at 18:55 McGarnagle 73.8k19134186 asked Nov 6 '12 at 18:35 ivo 92 1 Stacktrace ? SITE_ID = 1, but if you’re using the sites framework to manage multiple sites, it could be the ID of a different site. response = view_func(request, *args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func 89. http://djbook.ru/forum/topic/702/ current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Moreover, this bug has been fixed (Ticket #18324). When does “haben” push “nicht” to the end of the sentence? "Carrie has arrived at the airport for two hours." - Is this sentence grammatically correct? asked 4 years ago viewed 647 times active 4 years ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Related 3252What is a metaclass in Python?1611What is the difference between zxmd 1 августа 2012 в 17:54 +1 ↑ ↓ Хорошая, годная статья. Автор молодца Progrik 1 августа 2012 в 18:04 +2 ↑ ↓ По поводу действий в админке — да, там

reply | permalink Related Discussions Django admin site display (None) even when values are non-null/empty Can't get model to show up in admin interface Databases Many-to-Many Intermediary Models in Django admin other Environment: Request Method: POST Request URL: http://127.0.0.1:8000/admin/flatpages/flatpage/add/ Django Version: 1.4 Python Version: 2.7.3 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.flatpages') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware') python, django, особенности Реклама помогает поддерживать иразвивать наши сервисыПодробнее Реклама Хабы Программирование Разработка веб-сайтов Алгоритмы Разработка для интернета вещей Разработка под Android Тестирование IT-систем Информационная безопасность Groovy & Grails JAVA Разработка Teenage daughter refusing to go to school Global.asax Application_Start not hit after upgrade to Sitecore 8.2 Tank-Fighting Alien Mimsy were the Borogoves - why is "mimsy" an adjective?

michurin 2 августа 2012 в 12:42 0 ↑ ↓ Ну про логи (пункт 2) — это вы зря. Джанга тут не причём, читайте просто питонскую документацию и все покровы спадут. And it's a bug in Flatpages field validation code. ValueError at /admin/flatpages/flatpage/add/ Cannot use None as a query value Request Method: POST Request URL: http://localhost:8000/admin/flatpages/flatpage/add/ Django Version: 1.4.2 Exception Type: ValueError Exception Value: Cannot use None as a query value return func(*args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\contrib\admin\options.py" in add_view 937.

if same_url.filter(sites__in=sites).exists(): File "F:\Py\Python27\lib\site-packages\django\db\models\query.py" in filter 621. django: flatpages error "Cannot use None as a query value" (En) If you see "Cannot use None as a query value" error message in Django admin tying to save new Flatpage Clone in SourceTree Atlassian SourceTree is a free Git and Mercurial client for Windows. Check This Out Fixed now on git master.

self._clean_form() File "F:\Py\Python27\lib\site-packages\django\forms\forms.py" in _clean_form 299. Admin page: how to calculate a parent Field after saving all tabular inlines Edit-once object in admin? django-lfs: опыт использования. часть 1 ( установк...

Please use the instanceof... ► апреля (3) ► марта (3) ► февраля (1) ► января (1) ► 2011 (18) ► декабря (2) ► ноября (5) ► октября (2) ► сентября (4)

Note: See TracTickets for help on using tickets. return super(MultiDBModelAdmin, self).formfield_for_foreignkey(db_field, request=request, using=self.using, **kwargs) def formfield_for_manytomany(self, db_field, request=None, **kwargs): # Tell Django to populate ManyToMany widgets using a query # on the 'other' database. The cost of switching to electric cars? Also make sure you’ve correctly set SITE_ID to the ID of the site the settings file represents.

return super(MultiDBModelAdmin, self).queryset(request).using(self.using) def formfield_for_foreignkey(self, db_field, request=None, **kwargs): # Tell Django to populate ForeignKey widgets using a query # on the 'other' database. Problem in solving this book and pages question Draw a hollow square of # with given width Why is Professor Lewin correct regarding dimensional analysis, and I'm not? Even the django developers have been unsure about the usage of auto_now and auto_now_add, at some point there even was a DeprecationWarning on their usage. share|improve this answer answered Nov 6 '12 at 19:04 Alasdair 94.7k12154197 In where python file to choose value of sites? –ivo Nov 6 '12 at 19:52 1 You

Whenever i try to save aflat page i got error:ValueError at /admin/flatpages/flatpage/add/Exception Value: Cannot use None as a query valuehttp://dpaste.com/739338/I am using Python 2.7.3 and Django 1.4 ad sqlite3 as database--You response = view_func(request, *args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\contrib\admin\sites.py" in inner 196. Why did Michael Corleone not forgive his brother Fredo? On the add flatpage web page, you have to select a value for sites. –Alasdair Nov 6 '12 at 20:39 Thank you very much –ivo Nov 6 '12 at

Django is a registered trademark of the Django Software Foundation. Пропустить до навигации Пропустить до содержимого Вход | EN Поиск: Документация Новости Видео Форум Рецепты Все Добавить рецепт Django ORM if form.is_valid(): File "F:\Py\Python27\lib\site-packages\django\forms\forms.py" in is_valid 124. stdarg and printf() in C How to make my logo color look the same in Web & Print? Browse other questions tagged python django or ask your own question.

return func(self, *args2, **kwargs2) File "F:\Py\Python27\lib\site-packages\django\db\transaction.py" in inner 209. Add 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware' to your MIDDLEWARE_CLASSES setting. Overview Download Documentation News Community Code About ♥ Donate Code GitHub LoginDjangoProject LoginPreferencesAPI View TicketsReportsTimelineWikiSearch Context Navigation ← Previous TicketNext Ticket → Opened 5 years ago Closed 5 years ago Last Bitbucket Features Pricing owner/repository English English 日本語 Sign up Log in django-treebeard Actions Clone Compare Fork Navigation Overview Source Commits Branches 2 Pull requests 31 Issues Downloads Settings HTTPS HTTPS SSH

return self.admin_site.admin_view(view)(*args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\utils\decorators.py" in _wrapped_view 91. You can also avoid it by being sure to select at least one site for the page. response = view_func(request, *args, **kwargs) File "F:\Py\Python27\lib\site-packages\django\utils\decorators.py" in bound_func 21. wpm1 1 августа 2012 в 20:03 0 ↑ ↓ стандартный jscatalog который идет с джангой — неудачное решение.

Run the command manage.py syncdb. затем в urls.py from django.conf.urls import patterns, include, url Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from views import Why do the cars die after removing jumper cables Is Area of a circle always irrational Can I cite email communication in my thesis/paper? mrjj 1 августа 2012 в 19:35 +3 ↑ ↓ Formatters упоминается вскользь, так как логи построенны на стандартном Logging, какой смысл лишний раз разжевывать методики работы с ним? For Django 1.4, you can avoid the problem by specifying a site for your flatpage.

Back to Top