Django oscar core apps confilicts with my local apps

2015-08-25 Thread Kishan Mehta
I have been working on a e commerce website. I am using django-oscar 1.1 for this. Here is my installed app looks like : INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.static

Re: Django oscar core apps confilicts with my local apps

2015-08-25 Thread Avraham Serour
Change your app name On Tue, Aug 25, 2015, 10:12 AM Kishan Mehta wrote: > I have been working on a e commerce website. I am using django-oscar 1.1 > for this. Here is my installed app looks like : > > INSTALLED_APPS = [ > 'django.contrib.admin', > 'django.contrib.auth', > 'django.contrib.content

Re: Django + microservices: What's correct approach?

2015-08-25 Thread cr0hn
Thank you for your responses. I try to find some guide to create micro-services architecture using Django. I know that micro-service is a design paradigm, so I'm looking for the best way to implement it using Django (+ django-rest-framework). I also know that there're not a unique response, but

Re: 1.7 to 1.8 upgrade: test suite failing

2015-08-25 Thread simon . shillaker
Hi Tim, Thanks again for your help and sorry for the long delay. We've now solved the issue but I'd like to share the changes we made. I'm not sure which are essential and they're all in the RTFM category, however, they might serve as useful pointer to someone: 1. Make sure the TestCase versio

Re: Django oscar core apps confilicts with my local apps

2015-08-25 Thread 'Hugo Osvaldo Barrera' via Django users
On Tue, Aug 25, 2015, at 04:33, Avraham Serour wrote: > Change your app name Actually, changing the app label should suffice: https://docs.djangoproject.com/en/1.8/ref/applications/#for-application-authors > On Tue, Aug 25, 2015, 10:12 AM Kishan Mehta > wrote: >> I have been working on a e c

Re: Django + microservices: What's correct approach?

2015-08-25 Thread Steve McConville
Hi Crohn. You're asking a lot of related but very general questions here. I know you are looking for someone who has "had the same problem" but we don't know what your problem is. The whole point of any architecture is that it's supposed to be a solution to your problems, not a problem in itself :

Re: Django + microservices: What's correct approach?

2015-08-25 Thread Tom Christie
> Create a Django project for each micro-service or all using the same project? Different projects. > Micro-services must communicate themselves using the same REST API, some way for better approach? The API *is* the service boundary yup. > How to deploy the project: Running "python manage.py

middleware

2015-08-25 Thread Pawanesh Gautam
why middleware is required ?? -- 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 dj

Re: Migrations and FileField storage

2015-08-25 Thread Steve Capell
Hi Nico, I had the same problem when I was using this storage object: photoStorage = FileSystemStorage(location=os.path.join(settings.MEDIA_ROOT, 'photos/original'), base_url='/photos/original') class Photo(models.Model): image = models.ImageField(storage=photoStorage) The "location" argu

#WomenWhoCanCode Hackathon at Hike Messenger Office, Bangalore

2015-08-25 Thread Abhishek Kumar Gupta
Hi Everyone, Greetings to you from Dexter Talent Labs!!! "Be the kind of Woman that when your feet hit the floor on each challenging competition the devil says "Oh crap, SHE's up!" We are hosting a one day technical coding event. You may say half-a-thon :) We invite all the women coders to com

Re: Django dev server issue

2015-08-25 Thread ilyas Jumadurdyew
The problem is in your packages. You probably tried to solve so other issue and installed some package that you dont need. I had the same problem, clearing unused packages solved the problem On Monday, 3 January 2011 02:25:16 UTC+5, daniels wrote: > > Hi, > I'm having a issue with Django's dev

Re: Django Live Site to Localhost (Testing)

2015-08-25 Thread Bhadreshsinh Gohil
Dear Bhanu Put your download sites in your config folder(web directory) and restore your database. *Thanks And Regards* Bhadreshsinh Gohil Asst. Prof. GTU PG School, Mo. No. +91 7600 95 94 93 --

Re: middleware

2015-08-25 Thread Mayank G
Middleware allows you to process certain pre specified activities like, Logging, User Authentication, Tokenization and filtration of data. Route authentication, Access control list validations. It provides flexibility to invoke appropriate middleware on different routes. These act as glue to provid

Django 1.7 migrations: Adding one field to User`s model

2015-08-25 Thread marcin . j . nowak
Hi, I would like to add one field to User. I've created new model based on original Django`s user: class User(AbstractUser): is_verified = models.BooleanField(default=False) class Meta: db_table = 'auth_user' Now I'm trying to make migrations, but Django tries to create `auth

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread marcin . j . nowak
On Tuesday, April 28, 2015 at 7:20:17 AM UTC+2, Mike Dewhirst wrote: > > Anyway, I suspect disabling migration - even if a > "master-switch" could be built - is undesirable if one is using any of > the django tables. > > > I'm not sure we're talking about the same. Some of us don't need built

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Avraham Serour
> We're working with databases and their representations in application layer, and not vice versa. Speak for yourself, I'm working with the models, saving them in the database is just an implementation detail On Tue, Aug 25, 2015 at 3:21 PM, wrote: > > > On Tuesday, April 28, 2015 at 7:20:17 AM

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
On 25 August 2015 at 14:32, Avraham Serour wrote: > > We're working with databases and their representations in application > layer, and not vice versa. > > Speak for yourself, I'm working with the models, saving them in the > database is just an implementation detail > I'm speaking on behalf of

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread bobhaugen
I agree that migrations should be optional, for all the reasons listed in this thread, but hope it doesn't now turn into a religious war between models-first and database-first. Not relevant to the issue. > > -- You received this message because you are subscribed to the Google Groups "Django

Re: Django Live Site to Localhost (Testing)

2015-08-25 Thread Gergely Polonkai
If this is a Django-only thing, you can use manage.py to dump and load your data, without the SQL dump. The code, I guess, is available from somewhere, e.g. in a VCS so you just have to clone/checkout. On 20 Aug 2015 16:40, wrote: > We have a completely developed Django Site running on live, But

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Tim Graham
What does "turning off migrations" mean in practice? Is it not enough to avoid the makemigrations and migrate management commands? On Tuesday, August 25, 2015 at 9:31:30 AM UTC-4, bobhaugen wrote: > > I agree that migrations should be optional, for all the reasons listed in > this thread, but ho

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
On 25 August 2015 at 16:21, Tim Graham wrote: > What does "turning off migrations" mean in practice? Is it not enough to > avoid the makemigrations and migrate management commands? Currently I'm replacing mgmt commands to avoid accidential calls, and also replacing test runner. But, for examp

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Carl Meyer
On 08/25/2015 08:42 AM, Marcin Nowak wrote: > > On 25 August 2015 at 16:21, Tim Graham > wrote: > > What does "turning off migrations" mean in practice? Is it not > enough to avoid the makemigrations and migrate management commands? > > > > Currently I'm r

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
On 25 August 2015 at 16:53, Carl Meyer wrote: > I thought we already covered this topic, and `managed=False` should work > for your use case. That's the exact meaning of this flag: "I don't want > Django to manage my database, please never touch it." Have you tried > adding that flag to your mode

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Carl Meyer
On 08/25/2015 09:02 AM, Marcin Nowak wrote: > > On 25 August 2015 at 16:53, Carl Meyer > wrote: > > I thought we already covered this topic, and `managed=False` should work > for your use case. That's the exact meaning of this flag: "I don't want > Django to

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-25 Thread Tim Graham
This might be related to the difficulties of migrating an existing project to a custom user model. I'm not sure the steps to workaround the problem. We have an open ticket to recommend starting off a project with a custom user model to avoid this problem [1]. Sorry I can't be of more help. [1]

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Carl Meyer
On 08/25/2015 09:23 AM, Marcin Nowak wrote: > On 25 August 2015 at 17:04, Carl Meyer > wrote: > > Hmm, yes, third-party apps are an issue. > > My recollection from the last time you brought this up is that we > decided an AppConfig-level setting to do the equ

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
> > Maybe there is a solution for both? > > Sometimes when you have unusual requirements you have to do a little > more work to meet them. To my knowledge, out of the many hundreds of > thousands of Django users, you are the first and only one to request a > way to turn off migrations entirely. M

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
On 25 August 2015 at 17:04, Carl Meyer wrote: > Hmm, yes, third-party apps are an issue. > > My recollection from the last time you brought this up is that we > decided an AppConfig-level setting to do the equivalent of managed=False > for an entire app would be a reasonable feature request. Sinc

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcos Eliziario
Changing the database accidentally can be avoided simply by adjusting the privileges of the database user django uses. Flexibility in a software project always come out at the expense of simplicity. So, generally, django developers are right to avoid rarely need features in exchange for a simp

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
On 25 August 2015 at 18:44, Marcos Eliziario wrote: Changing the database accidentally can be avoided simply by adjusting the > privileges of the database user django uses. It's not perfect. The connection requires write access and Django inserts some data automatically. But table-level grants

Re: Forms questions

2015-08-25 Thread Hugo Kitano
Here it is, very simple: Submit form: {% csrf_token %} {{ form.as_p }} On Monday, August 24, 2015 at 4:31:47 PM UTC-7, Sait Maraşlıoğlu wrote: > > Can you provide the template code? > > > On Tuesday, 25 August 2015 00:16:40 UTC+3, Hugo Kitano wrote: >> >> Hi, I'm trying to figu

Re: Using ModelForms

2015-08-25 Thread Hugo Kitano
Noted. "/stat/s" is an index page. Here is what my urls.py looks like. Also, by using print statements, I've realized that the request.method is always GET, not POST, which makes it so no model instance is ever saved. What does this GET request refer to specifically? Thanks On Monday,

Re: Working with FileFields/FieldFiles

2015-08-25 Thread Hugo Kitano
I guess my question is more "dumb" than that. I need a concatenated string "*a**b*" where *a *is given and *b *is the name of a file uploaded to a field in a model. Thanks! On Saturday, August 22, 2015 at 2:55:03 PM UTC-7, Hugo Osvaldo Barrera wrote: > > > > > On Fri, Aug 21, 2015, at

Re: Working with FileFields/FieldFiles

2015-08-25 Thread 'Hugo Osvaldo Barrera' via Django users
On Tue, Aug 25, 2015, at 14:31, Hugo Kitano wrote: > I guess my question is more "dumb" than that.  I need a concatenated > string "*a**b*" where *a *is given and *b *is the name of a file > uploaded to a field in a model. > > Thanks! Something like this? class Blah(models.Model):    def u

Re: Using ModelForms

2015-08-25 Thread 'Hugo Osvaldo Barrera' via Django users
On Tue, Aug 25, 2015, at 14:16, Hugo Kitano wrote: > Noted.  "/stat/s" is an index page.  Here is what my urls.py looks > like.  Also, by using print statements, I've realized that the > request.method is always GET, not POST, which makes it so no model > instance is ever saved.  What does this GE

Re: Using ModelForms

2015-08-25 Thread Hugo Kitano
So the form should have action = '/stats/submit/' ? If I do this, whenever I click submit, it brings me back to the submission page, telling me that I didn't submit a file even if I did. On Tuesday, August 25, 2015 at 11:05:59 AM UTC-7, Hugo Osvaldo Barrera wrote: > > > On Tue, Aug 25, 2015,

Re: Forms questions

2015-08-25 Thread Hugo Kitano
I've realized that the action field in the form should be "/stats/submit/", the same view as the one that sent me to the template. However, whenever I submit with the form then, it tells me that the file I submit is missing, even when it is definitely there. On Tuesday, August 25, 2015 at 10:1

Migrating old users into custom user model

2015-08-25 Thread Ben Wattie
Hello, I have an existing project with migrations, datamigrations and I need a custom user model now, not just 1-1 profile so I created one. However, when I switch the AUTH_USER_MODEL setting, I can't access the old auth.user model for my datamigration def transfer_users(apps, schema_editor):

Re: Migrating old users into custom user model

2015-08-25 Thread Carl Meyer
Hi Ben, On 08/25/2015 03:33 PM, Ben Wattie wrote: > I have an existing project with migrations, datamigrations and I need a > custom user model now, not just 1-1 profile so I created one. Unfortunately, while this is technically possible (I haven't done it myself, but I know at least one person w

New User Tips?

2015-08-25 Thread John Thomas
Hi Django-Users: I am starting a project. I just saw the tip below. I was wondering if you would share other tips you have. 1. I _always_ start every project with a custom User model, to avoid this problem ["this problem" = "difficult to transfer to a custom user model."] John Thomas

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-25 Thread 'Hugo Osvaldo Barrera' via Django users
On Tue, Aug 25, 2015, at 08:51, marcin.j.no...@gmail.com wrote: > Hi, > > I would like to add one field to User. > > I've created new model based on original Django`s user: > > class User(AbstractUser):    is_verified = > models.BooleanField(default=False) > > class Meta:        db_table = 'auth_u

Re: Migrating old users into custom user model

2015-08-25 Thread Ben Wattie
Hi Carl, Thanks for your reply. If I figure it out I would surely submit doc, but it's more likely that I will just come up with a workaround. Starting a project with a custom user model every time just to avoid this doesn't feel so great since the documentation just says things like "probab

Re: Migrating old users into custom user model

2015-08-25 Thread Carl Meyer
Hi Ben, On 08/25/2015 05:14 PM, Ben Wattie wrote: > Thanks for your reply. > If I figure it out I would surely submit doc, but it's more likely that > I will just come up with a workaround. Fair enough :-) > Starting a project with a custom user model every time just to avoid > this doesn't feel

Re: New User Tips?

2015-08-25 Thread Lachlan Musicman
1. Do the tutorial if you've never used Django before 2. Keep your code in a repo, have a dev site and a prod site at least 3. Use virtualenv 4. This list is a good place to come for support. Also, the IRC channel with FunkyBob. -- The most dangerous phrase in the language is, "We've always d

Loading scikit model in Django

2015-08-25 Thread Chih How Bong
Hi guys, I have searched the answers for days with no avail, thus I would like to ask here. I am running a svm scikit model in Django, currently, every request have to load the ~20mb scikit model, and it was really slow. I wonder if I should load the model in settings.py, and store in in sessi

Re: Loading scikit model in Django

2015-08-25 Thread James Schneider
> Hi guys, I have searched the answers for days with no avail, thus I would like to ask here. > > I am running a svm scikit model in Django, currently, every request have to load the ~20mb scikit model, and it was really slow. > > I wonder if I should load the model in settings.py, and store in in

Re: Loading scikit model in Django

2015-08-25 Thread Chih How Bong
Thanks you James for your suggestion. I am going to look into the memcached now. I was thinking that the ideal solution will be to load the model into a global variable, then the request can use refer to this variable for the model. I don't know if that possible. Thanks. On Wednesday, August

Re: Loading scikit model in Django

2015-08-25 Thread James Schneider
> Thanks you James for your suggestion. I am going to look into the memcached now. > > I was thinking that the ideal solution will be to load the model into a global variable, then the request can use refer to this variable for the model. I don't know if that possible. > Possible...yes. Good idea?