PAGE INDEX HTML

2023-04-02 Thread REMY TOUITOU
Hello could someone help me to make appear the index html page in the application main? Thanks -- 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 dj

ORM migration index name mismatch. Can't drop existing index.

2022-05-16 Thread Konstantin Kuchkov
oes not accept data type uuid Looking at the postgres table I found this index "exams_capture_uuid_4a3af4ea353edaa5_like" btree (uuid varchar_pattern_ops) However, the migration was trying to drop an index by a different name DROP INDEX IF EXISTS "exams_capture_uuid_0c20e2c2_like&

Re: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191

2022-04-02 Thread Antonis Christofides
your model? Antonis Christofides +30-6979924665 (mobile) On 02/04/2022 00.43, Sunday Ajayi wrote: Hi Team, Please I am having the error below from django - postgresql: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191

Re: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191

2022-04-02 Thread Sunday Ajayi
> > > Please I am having the error below from django - postgresql: > > django.db.utils.OperationalError: index row requires 45344 bytes, maximum > size is 8191 > > > Please how can I fix it? > > Regards, > *AJAYI Sunday * > (+234) 806 771 5394 > *sunnexaj...@gmail.co m* > -- > You r

Re: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191

2022-04-01 Thread Antonis Christofides
Hi, could you show the definition of your model? Antonis Christofides +30-6979924665 (mobile) On 02/04/2022 00.43, Sunday Ajayi wrote: Hi Team, Please I am having the error below from django - postgresql: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size

django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191

2022-04-01 Thread Sunday Ajayi
Hi Team, Please I am having the error below from django - postgresql: django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191 Please how can I fix it? Regards, *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.co m* -- You received this message because

Re: List Index out of Range

2021-10-03 Thread Lalit Suthar
Adding to above 2 answers index error may also occur when your time_frame_list or responsible_list does not have the same number of items as your input_list. You should try bnmng' s answer also > Which line in your code is triggering the error? you check it with simple print statements or us

Re: List Index out of Range

2021-10-02 Thread Hedrick Godson's
Make sure you fill all the inputs with list and also make sure that you provide the correct input name to request.POST.getlist() method otherwise it will returns empty list which will raise IndexError On Sun, 3 Oct 2021, 03:13 bnmng, wrote: > Which line in your code is triggering the error? > >

Re: List Index out of Range

2021-10-02 Thread bnmng
Which line in your code is triggering the error? On Saturday, October 2, 2021 at 11:07:13 AM UTC-4 eugenet...@gmail.com wrote: > Good day all, > > I need assistance. Am trying to save data from the below form but I am > getting *list out of range* error > can someone help me to write a

List Index out of Range

2021-10-02 Thread Eugene TUYIZERE
Good day all, I need assistance. Am trying to save data from the below form but I am getting *list out of range* error can someone help me to write a successful save function? here is the code I am using: def submit_work(request): if request.method != "POST": return HttpResponse("Method Not

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread DJANGO DEVELOPER
as you mentioned that you're using django 3.2 but your urls.py file is following the pattern of django 1.7. use your urls.py this way : path('your polls url here', views.index, name='index') On Mon, Jul 26, 2021 at 6:45 PM Zain wrote: > Had the same issue. > > Solved, make sure you

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread Zain
hon 3.9.2 and > Django 3.2 and have exactly the same problems as mentioned above. > > path('', views.index, name='index'), > > AttributeError: module 'polls.views' has no attribute 'index' > > any help on how can I debug this? I am a django noob > > On Wednesday, 1

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-04-22 Thread David Nugent
On Mon, Apr 19, 2021 at 2:07 AM Avi Mehenwal wrote: > I followed the same tutorial on 17th April 2021 with Python 3.9.2 and > Django 3.2 and have exactly the same problems as mentioned above. > > path('', views.index, name='index'), > AttributeError: module 'polls.views' h

Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-04-18 Thread Avi Mehenwal
I followed the same tutorial on 17th April 2021 with Python 3.9.2 and Django 3.2 and have exactly the same problems as mentioned above. path('', views.index, name='index'), AttributeError: module 'polls.views' has no attribute 'index' any help on how can I debug this? I am a django noob

Re: can't find index

2020-07-21 Thread Ralph Barhydt
ango's website, > and has created a view function called "index" in "polls" app, which was > wired to "/polls" url. All the codes were exactly the same as provided in > the tutorial. The mistake you made was when you opened the browser and > typed "htt

Re: can't find index

2020-07-18 Thread Liu Zheng
I believe you were following the official tutorial on Django's website, and has created a view function called "index" in "polls" app, which was wired to "/polls" url. All the codes were exactly the same as provided in the tutorial. The mistake you made was when yo

can't find index

2020-07-17 Thread Exactly musty
Look at the error closely, as it says it all, in your project url django cant find the path index,its a url problem, check it if you got it well spelt -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: can't find index

2020-07-17 Thread Kelvin Sajere
The error is as it is.. Django can't find a path /index On Fri, Jul 17, 2020, 10:22 PM Ralph Barhydt wrote: > > I have done the first part of the tutorial many times and suddenly, doing > it one more time, I get this message. I am in the right directory and I > have checked the cod

can't find index

2020-07-17 Thread Ralph Barhydt
://localhost:8000/index Using the URLconf defined in rbsite.urls, Django tried these URL patterns, in this order: 1. polls/ 2. admin/ The current path, index, didn't match any of these. You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False

Looking for a solution? Calculating index/offset of a particular record?

2020-05-27 Thread Benjamin Schollnick
I’m trying to optimize a few different things. I am looking to try to change this into a more database driven routine, instead of having to iterate through each and every record. While not time consuming (overall), I would like to try to make it a bit cleaner… Effectively I am calculating

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
>>>>>>>>> >>>>>>>>>> operations = [ >>>>>>>>>> migrations.CreateModel( >>>>>>>>>> name='User', >>>>>>>>>> fields=[ >&

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Raja Sekar Sambath
t;>>> primary_key=True, serialize=False)), >>>>>>>>> ('email', models.EmailField(max_length=255, unique=True)), >>>>>>>>> ('admin', models.BooleanField(default=False)), >>>>>>>>> ('s

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Ahmad Saki
>> on_delete=django.db.models.deletion.CASCADE, >>>>>>>> to='organization.Organization')), >>>>>>>> ], >>>>>>>> options={ >>>>>>>> 'db_table': 'user', >>>>>

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
ser.models.UserManager()), >>>>>>> ], >>>>>>> ), >>>>>>> ] >>>>>>> >>>>>>> >>>>>>> >>>>>>> But when I want to migrate it gives me an error below. Please help >&g

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Ahmad Saki
"manage.py", line 17, in main >>>>>> execute_from_command_line(sys.argv) >>>>>> File >>>>>> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\__init__.py", >>>

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
xecute >>>>> self.fetch_command(subcommand).run_from_argv(self.argv) >>>>> File >>>>> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py", >>>>> line 323, i

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Ahmad Saki
f.handle(*args, **options) >>>> File >>>> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py", >>>> line 83, in wrapped >>>> res = handle_func(*args, **kwargs) >>>&g

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\migrations\executor.py", >>> line 117, in migrate >>> state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, >>> fake_initial=fake_initial) >>> File &g

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Ahmad Saki
a\Local\Programs\Python\Python37-32\lib\site-packages\django\db\migrations\executor.py", >> line 245, in apply_migration >> state = migration.apply(state, schema_editor) >> File >> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\d

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-25 Thread Integr@te System
grams\Python\Python37-32\lib\site-packages\django\db\backends\base\schema.py", > line 507, in alter_field > new_db_params = new_field.db_parameters(connection=self.connection) > File > "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models

self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-25 Thread Ahmad Saki
b\site-packages\django\db\models\fields\related.py", line 963, in db_type return self.target_field.rel_db_type(connection=connection) File "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models\fields\related.py", line 878, in target_

"http://127.0.0.1:8000/help/" Show me still 'index page' instead of 'help page'

2019-10-10 Thread Parvez Khan Pathan
. from django.urls import path from appThree import views urlpatterns = [ path('',views.index,name='index'), path('',views.help,name='help'), ] from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): myDict = {'heading':"th

Re: How to create complex gin index in postgres db using django

2018-08-29 Thread Jason
you need to make a migration to apply the index. https://www.endpoint.com/blog/2016/09/17/executing-custom-sql-in-django-migration something like class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.RunSQL

How to create complex gin index in postgres db using django

2018-08-29 Thread Максим Родин
Hello, I'm trying to make the text search index like this: https://www.postgresql.org/docs/current/static/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX: "CREATE INDEX pgweb_idx ON pgweb USING GIN (to_tsvector('english', title || ' ' || body));" I cannot imagine how to do it in django

Re: how to programmatically get the index name of a model field on a migration of django 1.8

2018-07-02 Thread Michal Petrucha
On Fri, Jun 29, 2018 at 11:25:16AM -0300, Fabio C. Barrionuevo da Luz wrote: > Hello, I need to delete an index created automatically by Django, from a > third-party application and my own django apps, for later I recreate the > index optimized way. > > this django application is

how to programmatically get the index name of a model field on a migration of django 1.8

2018-06-29 Thread Fabio C. Barrionuevo da Luz
Hello, I need to delete an index created automatically by Django, from a third-party application and my own django apps, for later I recreate the index optimized way. this django application is used in several companies. so I need to distribute these improvements via django migration. I'm using

Re: Error on execute migration (create index) when set db_name with quoted string

2017-12-02 Thread Carlos Leite
um.com/@cadu_leite> | +CarlosLeite > <https://plus.google.com/u/0/+CarlosLeite> | > > http://people.python.org.br/ > > On Tue, Nov 28, 2017 at 6:30 PM, Simon Charette <charett...@gmail.com> > wrote: > >> Hello Carlos, >> >> Thank you for taking the time

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-29 Thread Carlos Leite
me to reproduce the issue against the upcoming > 1.11 release. > > It looks like `Index` class doesn't use the same name generation logic as > the schema editor for some reason[0] so it will be have to be adjusted in > a similar way. > > Could you file a new ticket[1] referencing this

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Simon Charette
Hello Carlos, Thank you for taking the time to reproduce the issue against the upcoming 1.11 release. It looks like `Index` class doesn't use the same name generation logic as the schema editor for some reason[0] so it will be have to be adjusted in a similar way. Could you file a new ticket[1

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
), migrations.AddIndex( model_name='publisher', index=models.Index(fields=['name'], name='"tbl_litle__name_408be5_idx'), ), migrations.AddField( model_name='book', name='author', field=models.ManyToManyField(b

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
" " ' if I can use that (' " " ') for any database engine, I believe its a bug ... and even changed the migration manually, the same error occur when create an INDEX (at my example) ... so, the error is at the method that generates the db_name string passed for

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
; > Best, > Simon > > [0] https://github.com/django/django/commit/a35ab95ed4eec5c62fa19bdc69ecfe > 0eff3e1fca > [1] https://code.djangoproject.com/ticket/28792 > > > Le lundi 27 novembre 2017 23:24:59 UTC-5, Carlos Leite a écrit : >> >&

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-27 Thread Simon Charette
/a35ab95ed4eec5c62fa19bdc69ecfe0eff3e1fca [1] https://code.djangoproject.com/ticket/28792 Le lundi 27 novembre 2017 23:24:59 UTC-5, Carlos Leite a écrit : > > ooops > > > in the migration 0007 the index name seems badly formed > > ```python >... > migrations.AddIndex( > model

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-27 Thread Carlos Leite
ooops in the migration 0007 the index name seems badly formed ```python ... migrations.AddIndex( model_name='publisher', index=models.Index(fields=['name'], name='"big_name-w_name_cd0539_idx'), # <<<<<<< there is a " in plus. and its ne

Error on execute migration (create index) when set db_name with quoted string

2017-11-27 Thread Carlos Leite
/en/1.8/ref/databases/#oracle-notes> for more details. " at https://docs.djangoproject.com/en/1.8/ref/models/options/#db-table Well, when I tried to *migrate* I got the error, during the index creation, described below. Is it a bug ? or I miss soething ? I just tried to set a custom

Re: django.urls.exceptions.NoReverseMatch: Reverse for 'index' not found. 'index' is not a valid view function or pattern name.

2017-09-28 Thread James Schneider
import ALL from django.template import RequestContext # Create your views here. def home(request): return render(request, 'index.html', {'ne': ne}) def technology(request): return HttpResponse('hello') def index(request): assert isinstance(request , HttpResponse) return render(request, 'index.

django.urls.exceptions.NoReverseMatch: Reverse for 'index' not found. 'index' is not a valid view function or pattern name.

2017-09-27 Thread harsh sharma
): return render(request, 'index.html', {'ne': ne}) def technology(request): return HttpResponse('hello') def index(request): assert isinstance(request , HttpResponse) return render(request, 'index.html') . my url file url(r'^$', all.views.index), url(r'^technology

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-19 Thread djangorobert
gt; > > > On Wednesday, May 17, 2017 at 3:59:47 PM UTC-5, djangorobert wrote: >> >> currently getting this error : >> WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: >> Error during WebSocket handshake: Unexpected response code: 404 >> c

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-18 Thread djangorobert
dnesday, May 17, 2017 at 3:59:47 PM UTC-5, djangorobert wrote: > > currently getting this error : > WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error > during WebSocket handshake: Unexpected response code: 404 > connect @ websocketbridge.js:118 > (index):174

Re: Django Channels error : et connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexpected response code: 404 connect @ websocketbridge.js:118 (index):174 Di

2017-05-18 Thread djangorobert
ltichat > example > > but seem to be getting this error: connection to 'ws:// > www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: > Unexpected response code: 404 > connect @ websocketbridge.js:118 > (index):174 Disconnected from chat socket >

Re: Django Channels error : et connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexpected response code: 404 connect @ websocketbridge.js:118 (index):174 Di

2017-05-18 Thread djangorobert
s error: connection to 'ws:// > www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: > Unexpected response code: 404 > connect @ websocketbridge.js:118 > (index):174 Disconnected from chat socket > > > > the command i use is daphne -p 26358 myproject.asgi

Django Channels error : et connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexpected response code: 404 connect @ websocketbridge.js:118 (index):174 Discon

2017-05-18 Thread djangorobert
not quite sure what im doing wrong with the django channels multichat example but seem to be getting this error: connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexpected response code: 404 connect @ websocketbridge.js:118 (index):174 Disconnected

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-17 Thread djangorobert
currently getting this error : WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexpected response code: 404 connect @ websocketbridge.js:118 (index):174 Disconnected from chat socket On Tuesday, May 16, 2017 at 11:31:19 PM UTC-5

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-16 Thread djangorobert
thanks ya that seemed to help a little now im running into a new error: WebSocket connection to 'ws://www.openchat.us/griper' failed: WebSocket is closed before the connection is established. (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-16 Thread Dylan Reinhold
gt; hitting the regular django listener and its returning a 404. >> >> Dylan >> >> On Tue, May 16, 2017 at 3:39 PM, djangorobert <djangoc...@gmail.com> >> wrote: >> >>> working on the Django channels example : multi chat on Github >>> but am gett

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-16 Thread djangorobert
4. > > Dylan > > On Tue, May 16, 2017 at 3:39 PM, djangorobert <djangoc...@gmail.com > > wrote: > >> working on the Django channels example : multi chat on Github >> but am getting this error >> >> >> (index):173 Disconnected from

Re: Django Channels error : (index):173 Disconnected from chat socket websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/stream/' failed: Error during WebSocket handshake: Unexp

2017-05-16 Thread Dylan Reinhold
channels example : multi chat on Github > but am getting this error > > > (index):173 Disconnected from chat socket > websocketbridge.js:118 WebSocket connection to 'ws://www.openchat.us/chat/ > stream/' failed: Error during WebSocket handshake: Unexpected response > code: 404 >

Re: how to show image with index in python as context variable

2017-04-26 Thread Dartos
Hi, If you're using the django template language, use a dot instead of []. Try this: {{ item.0.image.url }} For {{ foo.bar }}, the django template language tries the following: foo[bar]# dict lookup foo.bar# property foo[int(bar)]# index lookup foo.bar()# callable Reference

how to show image with index in python as context variable

2017-04-25 Thread Shamaila Moazzam
hi, i am trying to display a set of images with the use of index. here is the code: {% for item in product.productimage_set.all %} {% endfor %} the above code is displaying a set of images for one product .right. i want

Re: AttributeError: module 'polls.views' has no attribute 'index'

2017-04-19 Thread Billy Lin
Thanks for your reploy. Actually I followed the tutorial exactly. My polls/views.py has: from django.http import HttpResponse def index(request): return HttpResponse("Hello, world. You're at the polls index.") My polls/urls.py has: from django.conf.urls import url from . im

Re: AttributeError: module 'polls.views' has no attribute 'index'

2017-04-19 Thread m712 - Developer
You didn't give us enough info, but I am thinking that you don't have an index() function in your polls/views.py. Start the tutorial from the beginning and follow it closely. On Apr 19, 2017 4:17 PM, Billy Lin <lcep...@gmail.com> wrote:I'm following the getting started tutorial 01 and r

AttributeError: module 'polls.views' has no attribute 'index'

2017-04-19 Thread Billy Lin
ine 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "C:\Users\cephalin\Repos\django\mysite\polls\urls.py", line 6, in url(r

Force a model to appear on admin's index page depending on the request

2016-04-13 Thread Olivier Dalang
Hi ! Is it possible to force a model to appear on the admin index page depending on the request ? I'm asking because I did override the has_change_permission() method of the ModelAdmin, so that the user can be allowed to change some instances (chosen via a ManyToMany relationship between

Re: AttributeError: 'module' object has no attribute 'index'

2016-03-13 Thread James Schneider
in _call_with_frames_removed > File "/home/kashif/Desktop/mysite/mysite/polls/urls.py", line 5, in > url(r'^$', views.index, name ='index'), > AttributeError: 'module' object has no attribute 'index' > > What does your urls.py look like? Did you do something like 'imp

AttributeError: 'module' object has no attribute 'index'

2016-03-13 Thread kashif Nawaz
n3.4/importlib/__init__.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 2254, in _gcd_import File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1200, in _

Custom Templates in Django Sitemaps Index

2015-11-06 Thread Andreas Dickow
See my new tutorial on Custom Templates in Django Sitemaps: https://biz-factory.de/django-sitemap-index-tutorial/ -- 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, sen

UnicodeError while searching in haystack/whoosh index

2015-04-28 Thread Florian Schweikert
Hi, I'm working on an django-cms 3.0.13/py2.7 page atm and came across an weird behaviour using haystack with whoosh. When using rebuild_index everything works fine. But using update_index afterwards leads to an UnicodeDecodeError when searching for a page with umlauts. Error thrown in

Index(View) rendering template instead of view

2015-02-24 Thread Brad Rice
So I have a RedirectView.as_view() going to a page in an app called web. In the app web this is my view: class Index(View): def get(self, request, *args, **kwargs): return HttpResponse('Hello, World!') However, instead of showing that, when I get redirected to the app it shows my

Re: Show a model on the admin list index page

2014-10-07 Thread Andrea
: > I think it’s clear to me what you are trying to do. By overriding those > methods in BarAdmin you go down that line (bypass the django admin > permission system), but to get the app listed in the admin index page you > would have to actually rewrite the view function. This v

Re: Show a model on the admin list index page

2014-10-07 Thread Daniel Rus Morales
I think it’s clear to me what you are trying to do. By overriding those methods in BarAdmin you go down that line (bypass the django admin permission system), but to get the app listed in the admin index page you would have to actually rewrite the view function. This view function makes

Re: Show a model on the admin list index page

2014-10-07 Thread Andrea
Dear Daniel, I want to answer to an issue you raised in your previous message. The Bar model doesn’t appear in the App index list page because the view > function in charge first verifies whether the user has any of the > add/change/delete permissions granted for such App, and given tha

Re: Show a model on the admin list index page

2014-10-07 Thread Andrea
, but it's not shown in the admin index page (and that's my problem). What I do not want to do is to specifically assign the `foo.add_bar` permission under the `permissions` section in the user profile for each user. Thanks for your time spent in tackling this issue. Andrea 2014-10-07 11:01 GMT+02:00

Re: Show a model on the admin list index page

2014-10-07 Thread Daniel Rus Morales
missions you should use: > > add: user.has_perm('foo.add_bar') > change: user.has_perm('foo.change_bar') > delete: user.has_perm('foo.delete_bar') > How can I show the model Bar in the admin index list without explicitly > assigning foo.change_bar or foo.add_bar to the user? >

Show a model on the admin list index page

2014-10-07 Thread Andrea
s_perm('foo.change_bar') delete: user.has_perm('foo.delete_bar') How can I show the model Bar in the admin index list without explicitly assigning foo.change_bar or foo.add_bar to the user? So far I tried the following, expecting the Bar model to appear in the index list page, but it didn't work.

Column type and index not support by Django ORM - best way to alter/add them

2014-05-26 Thread graeme
I need to do the the following to Postgres tables for Django models: 1) Add a functional index 2) Have a bigserial primary key and a bigint foreign key point to it. Given that I only want this on a single install, is there any reason not to just do it directly? I have found code snippets

two views in one page(index)

2013-09-14 Thread Akhil Dangore
hello friend i am using pinax(django) for my project in that it contains two views(signupview/loginview) and having diferent url "account/signup" & "account/login" so when i am calling two url in one page(index.html).it's overwritting each other forms. plz provide some solution

Re: Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
Yes, this is typo. But I don't see there no edit button суббота, 24 августа 2013 г., 20:52:45 UTC+4 пользователь WongoBongo написал: > > Can you change the name of this file from > > newweb/polls/__init.py__ > > to > > newweb/polls/__init__.py > > That file name is not right. > > K > > > > On

Re: Django IndexError: list index out of range

2013-08-24 Thread Kelvin Wong
Can you change the name of this file from newweb/polls/__init.py__ to newweb/polls/__init__.py That file name is not right. K On Saturday, August 24, 2013 8:02:38 AM UTC-7, Oleg Gorjajnov wrote: > > I'm new to Django. > > > newweb/ > manage.py > newweb/ >

Re: Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
No, I have no problems with manage.py runserver or syncdb. Just now tried build this code in PyCharm and got the same error суббота, 24 августа 2013 г., 19:42:04 UTC+4 пользователь tom написал: > > > On 24 Aug 2013, at 16:02, Oleg Gorjajnov > wrote: > > And this is *not

Re: Django IndexError: list index out of range

2013-08-24 Thread Thomas Scrace
On 24 Aug 2013, at 16:02, Oleg Gorjajnov wrote: > And this is not my case. > > So what's wrong with that? It must work well without meta classes. > Do you get any problems when you do manage.py runserver or syncdb? I think your problem stems from trying to build

Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
s.py", line 3, in class Poll(models.Model): File "C:\python27\lib\site-packages\django\db\models\base.py", line 93, in __new__ kwargs = {"app_label": model_module.__name__.split('.')[-2]} IndexError: list index out of range - What to do? I have read that t

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-11 Thread Hu Shizhi
Thanks Raharu. It works. Best, Tian On Saturday, May 11, 2013 10:12:37 PM UTC+8, Raharu Haruha wrote: > > there is no pattern named "index" (name="index") so, no reverse match > also, if you planned to work with django in future, i suggest you to use > ne

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-11 Thread Raharu Haruha
there is no pattern named "index" (name="index") so, no reverse match also, if you planned to work with django in future, i suggest you to use new-style url template tag like so: {% load url form future %} ... {% url 'index' %} ... On Saturday, May 11, 2013 5:14:02 AM UT

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread Hu Shizhi
y file? To used the url tag with a name you need to > have a defined url with that name, example: > > urlpatterns = patterns('', > url(r'^$', 'app.views.index', name="index"), > ) > > On Friday, May 10, 2013 9:38:27 AM UTC-5, Hu Shizhi wrote: >> >>

Re: NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread C. Kirby
Do you have a urls.py file? To used the url tag with a name you need to have a defined url with that name, example: urlpatterns = patterns('', url(r'^$', 'app.views.index', name="index"), ) On Friday, May 10, 2013 9:38:27 AM UTC-5, Hu Shizhi wrote: > > Hi, > > I a

NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found.

2013-05-10 Thread Hu Shizhi
Hi, I am new to Django and am using django-registration and followed the quickstart.rst document and get the following. Could anyone kindly help? Thanks, Tian NoReverseMatch at /accounts/login/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. Request

Re: Hey! I'm recieving an index error when trying to import models, and I can't figure out why.

2013-04-01 Thread Bill Freeman
Stick a print statement between lines 91 and 92 to show you model_module.__name__ . (or use pdb if you're comfortable with it). My best guess is that the split() is returning a list of one item. That is, that there is no '.' in model_module.__name__ . Thus an index of -2 failss

Re: Hey! I'm recieving an index error when trying to import models, and I can't figure out why.

2013-04-01 Thread C Alaric Moore
model_module = sys.modules[new_class.__module__] >> ---> 92 kwargs = {"app_label": >> model_module.__name__.split('.')[-2]} >> 93 else: >> 94 kwargs = {} >> >> IndexError: list index out of range >> >>

Re: Hey! I'm recieving an index error when trying to import models, and I can't figure out why.

2013-03-31 Thread Jonathan Baker
# For 'django.contrib.sites.models', this would be > 'sites'. > > 91 model_module = sys.modules[new_class.__module__] > ---> 92 kwargs = {"app_label": > model_module.__name__.split('.')[-2]} > 93 else: > 94

Hey! I'm recieving an index error when trying to import models, and I can't figure out why.

2013-03-31 Thread C Alaric Moore
# For 'django.contrib.sites.models', this would be 'sites'. 91 model_module = sys.modules[new_class.__module__] ---> 92 kwargs = {"app_label": model_module.__name__.split('.')[-2]} 93 else: 94 kwargs = {} IndexError: list index out of range I went onto

Sitemaps: Individual index file for each sitemap file

2013-03-12 Thread rosy
I have different sitemaps for different app and i want index files for each and also sitemaps should be compressed. For this am using django app "django-static-sitemaps 1.5.1". The problem is, it generates only one index file for all sitemaps but i want to make individual index file

Re: Changing the index page

2012-10-29 Thread Rodrigo Morgado
gt; miercuri, 11 ianuarie 2012, 04:51:07 UTC+1, kalyan boga a scris: >> >> Hi, >> >> I was working on tutorial 2 and i tried to change the layout of index >> page. Copied the index.html template to my template folder under admin and >> changed the contents

Re: Changing the index page

2012-10-28 Thread Sorin Popa
boga a scris: > > Hi, > > I was working on tutorial 2 and i tried to change the layout of index > page. Copied the index.html template to my template folder under admin and > changed the contents to suit the site. The second line errors out : > {% load i18n admin_static %} >

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Christophe Pettus
ted the indexes: It's not actually PostgreSQL that's creating those. That's Django's standard behavior. 1. It automatically creates an id column for any model that lacks an explicit primary key. 2. It automatically adds an index to foreign key models (for text fields, you get both t

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
://dpaste.org/GbfAJ/ > > Here is the template: [3] http://dpaste.org/vxRs4/ > > Here is the 'guts' of the view: [4] http://dpaste.org/w0b2z/ > > Total Postgresql/SQL n00b, so this may be a stupid statement. I'm > wondering if an index on '"press_page"."article_id&qu

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
Here is what exists in Dev re: Query Plan from debug toolbar: QUERY PLAN Sort (cost=8.28..8.28 rows=1 width=740)Sort Key: pgnumber -> Index Scan using press_page_article_id_like on press_page (cost=0.00..8.27 rows=1 width=740) Index Cond: ((article_id)::text = 'Test'::t

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
] http://dpaste.org/w0b2z/ > > Total Postgresql/SQL n00b, so this may be a stupid statement. I'm > wondering if an index on '"press_page"."article_id"' wouldn't speed things > up a bit? > > In dev, I don't have the amount of data that exists in production, so I &g

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
//dpaste.org/GbfAJ/ > > > > Here is the template: [3] http://dpaste.org/vxRs4/ > > > > Here is the 'guts' of the view: [4] http://dpaste.org/w0b2z/ > > > > Total Postgresql/SQL n00b, so this may be a stupid statement. I'm > wondering > > if an index on '

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Xavier Ordoquy
Here is the template: [3] http://dpaste.org/vxRs4/ > > Here is the 'guts' of the view: [4] http://dpaste.org/w0b2z/ > > Total Postgresql/SQL n00b, so this may be a stupid statement. I'm wondering > if an index on '"press_page"."article_id"' wouldn't speed things u

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-19 Thread Sam Lai
aste.org/GbfAJ/ > > Here is the template: [3] http://dpaste.org/vxRs4/ > > Here is the 'guts' of the view: [4] http://dpaste.org/w0b2z/ > > Total Postgresql/SQL n00b, so this may be a stupid statement. I'm wondering > if an index on '"press_page"."article_id"

  1   2   3   4   >