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&quo

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

2022-04-02 Thread Antonis Christofides
ass Meta with unique_together field* * * # class Meta: # unique_together = ('business', 'name') * * *But after I removed it, and did makemigration, then migrated, then I started getting this error* * * * * *AJAYI Sunday * (+234) 806 771 5394 /sunnexaj...@gmail.com/ On Sa

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

2022-04-02 Thread Sunday Ajayi
I started getting this error* *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * On Sat, Apr 2, 2022 at 6:49 AM Antonis Christofides < anto...@antonischristofides.com> wrote: > Hi, > > could you show the definition of your model? > > Antonis Christofides > +30-6979924665 (mobile) > > &

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 is

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

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 success

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 Al

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. > &

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

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: mo

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

Re: can't find index

2020-07-21 Thread Ralph Barhydt
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 you opened the browser and >

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 wh

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 th

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

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 whic

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

2019-11-26 Thread Integr@te System
;>>>>> dependencies = [ >>>>>>>>>> ('organization', '0001_initial'), >>>>>>>>>> ] >>>>>>>>>> >>>>>>>>>> operations = [ >>>>

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

2019-11-26 Thread Raja Sekar Sambath
els.DateTimeField(blank=True, >>>>>>>>> null=True, verbose_name='last login')), >>>>>>>>> ('username', models.CharField(max_length=50, >>>>>>>>> primary_key=True, serialize=False)), >>>

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

2019-11-26 Thread Ahmad Saki
('active', models.BooleanField(default=True)), >>>>>>>> ('date_joined', models.DateTimeField(auto_now_add=True)), >>>>>>>> ('orgid', models.ForeignKey(max_length=6, >>>>>

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

2019-11-26 Thread Integr@te System
;)), >>>>>>> ], >>>>>>> options={ >>>>>>> 'db_table': 'user', >>>>>>> }, >>>>>>> managers=[ >>>>>>> ('objects',

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

2019-11-26 Thread Ahmad Saki
>>>>>> Running migrations: >>>>>> Applying admin.0004_auto_20191118_2315...Traceback (most recent call >>>>>> last): >>>>>> File "manage.py", line 21, in >>>>>> main() >>>>&

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

2019-11-26 Thread Integr@te System
gt;>>>> line 381, in execute_from_command_line >>>>> utility.execute() >>>>> 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 Ahmad Saki
in run_from_argv >>>> self.execute(*args, **cmd_options) >>>> File >>>> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py", >>>> line 364, in execute >>>> outp

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

2019-11-26 Thread Integr@te System
ocal\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\migrate.py", >>> line 234, in handle >>> fake_initial=fake_initial, >>> File >>> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django

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

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

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

2019-11-25 Thread Integr@te System
go\db\migrations\operations\fields.py", > line 249, in database_forwards > schema_editor.alter_field(from_model, from_field, to_field) > File > "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\backends\base\schema.py", > line 507,

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

2019-11-25 Thread Ahmad Saki
66, in db_parameters return {"type": self.db_type(connection), "check": self.db_check(connection)} File "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\db\models\fields\related.py", line 963, in db_type return self.tar

"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.test import TestCase # Create your tests here. 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.htt

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 = [

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 imagin

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

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

2017-12-02 Thread Carlos 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 > wrote: > >> Hello Carlos, >> >> Thank you for taking the time to reproduce the issue against the upcoming >&g

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

2017-11-29 Thread Carlos Leite
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 thread and detailing the

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 tic

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

2017-11-28 Thread Carlos Leite
.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50, verbose_name='publisher name')), ], options={ 'get_latest_by': 'name&#

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

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 : >> >> ooops >> >

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

2017-11-27 Thread Simon Charette
ngo/commit/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( >

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

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

2017-11-27 Thread Carlos Leite
roject.com/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 c

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
estContext # 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,

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'

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
rror3.GIF> > > > 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

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 > (

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 so

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 mypr

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 Di

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:1

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 connecti

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
and its returning a 404. >> >> Dylan >> >> On Tue, May 16, 2017 at 3:39 PM, djangorobert >> wrote: >> >>> working on the Django channels example : multi chat on Github >>> but am getting this error >>> >>> >>> (index):1

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 > wrote: > >> working on the Django channels example : multi chat on Github >> but am getting this error >> >> >> (index):173 Disconnected from chat socket >> websocketbridge.js:118 WebS

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
hub > 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 > connect @ websocketbri

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: Unexpect

2017-05-16 Thread djangorobert
working on the Django 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: 4

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 Refe

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 to

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

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 wrote:I'm following the getting started tutorial 01 and running in

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

2017-04-19 Thread Billy Lin
ind_and_load File "", line 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\ur

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 betwee

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

2016-03-13 Thread James Schneider
> 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 som

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

2016-03-13 Thread kashif Nawaz
mysite/lib/python3.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 "&qu

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 "whoosh/re

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

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 view functi

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 an

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
d, 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 1

Re: Show a model on the admin list index page

2014-10-07 Thread Daniel Rus Morales
> 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-06 Thread Andrea
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? So far I tried the following, expecting the Bar model to appear in the in

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

2014-05-25 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 with

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 Satu

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/ > __init__.p

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 my case*. > > So what'

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 within Sublime Text. -- Yo

Django IndexError: list index out of range

2013-08-24 Thread Oleg Gorjajnov
ojects\newweb\polls\models.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

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:1

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

2013-05-10 Thread Hu Shizhi
url(r'^admin/', include(admin.site.urls)), ) On Friday, May 10, 2013 11:22:08 PM UTC+8, C. Kirby wrote: > > 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: > > urlp

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 wrot

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 

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 fail

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
x27;sites'. >> >> 91 model_module = sys.modules[new_class.__module__] >> ---> 92 kwargs = {"app_label": >> model_module.__name__.split('.')[-2]} >> 93 else: >> 94 kwargs = {} >> >>

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
or '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

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 = {} IndexErro

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
ercuri, 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 to suit the sit

Re: Changing the index page

2012-10-28 Thread Sorin Popa
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 to suit the site. The second line errors out : > {% load i18n admin_stat

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Christophe Pettus
gic may have already created 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 mod

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
; > Here is the sql statement: [2] http://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 > wonderin

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

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
up > in regards to Postgresql. > > Here is the model: [1] http://dpaste.org/JmEeQ/ > > Here is the sql statement: [2] http://dpaste.org/GbfAJ/ > > Here is the template: [3] http://dpaste.org/vxRs4/ > > Here is the 'guts' of the view: [4] http://dpaste.org/w0b2

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-20 Thread Barry Morrison
e 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".

Re: Postgresql Index & expensive queries [n00bie alert]

2012-10-19 Thread Xavier Ordoquy
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"' woul

  1   2   3   4   >