Re: Static version of a Django website ?

2015-08-13 Thread James Schneider
When you say 'current version', are you referring to the back end source code, or the rendered HTML version you get in the browser? -James On Aug 13, 2015 2:28 PM, "Stéphane Wirtel" wrote: > Hi all, > > I would like to archive the current version of a website. > > Do

Static version of a Django website ?

2015-08-13 Thread Stéphane Wirtel
Hi all, I would like to archive the current version of a website. Do you know a tool (ok, wget) or a Django app for this behaviour ? Regards, Stephane -- Stéphane Wirtel - http://wirtel.be - @matrixise -- You received this message because you are subscribed to the Google Groups "Django

Re: DRF without login

2015-08-13 Thread Xavier Ordoquy
> Le 13 août 2015 à 23:06, Prabath Peiris a écrit : > > Hi Hi > I am trying to implement a DRF in existing django project. I installed the > drf and set up APiView (class based) and add the get() to the class. When I > call this get method I get an error as

DRF without login

2015-08-13 Thread Prabath Peiris
Hi I am trying to implement a DRF in existing django project. I installed the drf and set up APiView (class based) and add the get() to the class. When I call this get method I get an error as "Exception Value: no such table: auth_user" and also create a db.sqlite3 database. how can I just

how to use the sites framework?

2015-08-13 Thread derek riemer
Hi, I have 3 apps. A base site, with a main menu, a personal website with a biography, and a weather app. I was curious if the sites framework can distinguish each app as a separate site while they are all on the same domain? I have derekriemer.pythonanywhere.com, and on the apps are pointed

How to pass a string as url's parameter

2015-08-13 Thread I . Dié
Hi evrybody, Here is my model: # fruits/models Class Fruit (models.Model): name = models.CharField(max_length = 33, choices = NAME_CHOICES, default = MANGO) # and so on... # fruits/views def fruit(request, fruit_name): fruit =

Loading sqlite function failed with runserver but works in django shell

2015-08-13 Thread Tazo Gil
Dear all django 1.8 python 3.4 The sqlite function sqlite-Levenshtein (https://github.com/mateusza/SQLite-Levenshtein) is working perfectly in the django shell, example: self.annotate(distance=Func(Value(aword), F('word'), function='levenshtein'

Re: 'admin/index.html' does not exist

2015-08-13 Thread bobhaugen
Tried another install using pip 7.1.0 on another computer, ubuntu 12.04, and django installed only once, in vn/lib/python2.7/site-packages, with its templates etc intact. So I don't know what happened the previous time. We just fixed it by moving the files on the 14.04 box, so it's not an

'admin/index.html' does not exist

2015-08-13 Thread bobhaugen
TemplateDoesNotExist at /admin/ admin/index.html Created a new virtualenvironment. pip install Django==1.4.21 Pip installs two django directories. One in the base virtualenv directory (e.g vn/django), another in vn/lib/python2.7/site-packages. The in the base virtualenv directory has

Re: Problems installing a Django package

2015-08-13 Thread Jani Tiainen
Throwing away virtualenv is actually best way to get problems (unless you're working with solutions like docker or vagrant). Virtualenv makes easy to check that you really do have only certain packages, certain versions and they won't generate any sudden surprises. On Thu, 13 Aug 2015 04:27:02

User and Permission from admin to the app

2015-08-13 Thread Predator
Hi there! I have a question regarding user permissions. How can I use the user permissions that I have set in the admin to my django app? For example, I have a user* 'Trainee'* and in django admin, I set *'Trainee'* to only add to my model. So, 'Trainee' can only add to this model, not

Re: Trouble w. Setting Up Virtual Env.

2015-08-13 Thread Lukasz Przewlocki
I had a very similar issue. Looks like the space in Python path could be the issue. This is my answer from the *StackOverflow *question (Can't install via pip with Virtualenv ): I had a very

Re: Problems installing a Django package

2015-08-13 Thread durirompepc
I use no virtualenv, to throw away solutions in that direction.. (didn't wanna to go hard first time). *pip* is only installed in 3.2, so that wasn't the problem. I've solved the problem right now, but after an hour of trial and error, I think the only think was to do *--upgrade wheel*. Is was

Re: bulk add m2m relationship for multiple instances

2015-08-13 Thread Erik Cederstrand
> Den 13/08/2015 kl. 04.09 skrev yakkades...@gmail.com: > > I'll run a test with the dict vs list+position counter. I know I saw a speed > improvement but I can't remember if that was the only thing I changed. > > I'd have to change a lot of code if I change the DB scheme so I'm not wanting

Re: bulk add m2m relationship for multiple instances

2015-08-13 Thread Derek
This Python wiki (https://wiki.python.org/moin/PythonSpeed/PerformanceTips#Choose_the_Right_Data_Structure) suggests: * Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list