ANYONE CAN HELP ME

2024-04-02 Thread arts maxwell Anderson
hello i have this error , i want to uppload multiple django image ValueError: FileInput doesn't support uploading multiple files. any one can help me class FormImages(ModelForm): multiple_image= forms.ImageField(widget=forms.FileInput(attrs= { 'multiple': True})) class Meta:

Re: Django group

2022-09-27 Thread arts maxwell Anderson
Hello everyone I'm Kouamou, Django developer, Add me too On this group +237699812189 Le mar. 27 sept. 2022 à 16:59, sachin bhagat a écrit : > Hii pls add me in group > > +918879399361 > > On Tue, Sep 27, 2022, 8:11 PM Chris Adebiyi < > adebiyichristophe...@gmail.com> wrote: > >> I'm interested,

Re:

2022-09-27 Thread arts maxwell Anderson
Hello l'm Django developer, Add me +237 699812189 Le mar. 27 sept. 2022 à 16:59, sachin bhagat a écrit : > Hii pls add me in group > > +918879399361 > > On Tue, Sep 27, 2022, 8:11 PM Chris Adebiyi < > adebiyichristophe...@gmail.com> wrote: > >> I'm interested, you can add me via +2348161201965 >

Re: Aad me to the groso

2022-09-27 Thread arts maxwell Anderson
Hello l'm Django developer, +237 699812189 Le mar. 27 sept. 2022 à 16:41, a écrit : > Ok, add me to the group +54 9 1164446437 > > Enviado desde mi iPhone > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group

Re: Django DB connectivity to DB running in different server.

2022-09-12 Thread arts maxwell Anderson
hello guys i need to django ? anyone can help me 2022-09-12 8:29 UTC+01:00, Anh Nguyen : > You should ask djongo group > > On Mon, 12 Sep 2022 at 13:29 Prabakaran Balaji > wrote: > >> *Hello Django Users,* >> >> Need some support on database connectivity in my django application. It's >> trying t

Re: What Programming Language should i learn

2022-09-10 Thread arts maxwell Anderson
i need job in django anyone Le jeudi 1 septembre 2022 à 20:13:10 UTC+1, subtitle indo a écrit : > We have received your message and will be in touch withinSorry not to > reply sooner.Sorry not to reply sooner.Sorry not to reply sooner. > > On Tue, Aug 30, 2022 at 3:59 PM Shailesh Yadav > wrot

Re: attempt to write a readonly database

2020-12-23 Thread Bryan Anderson bautista garcia
hello, I don't know who you are, you're the wrong person El mié, 23 de dic. de 2020 a la(s) 11:19, Parul. (parul.281...@gmail.com) escribió: > OperationalError at /users/ > Request Method: POST > Request URL: http://localhost:8000/users/ > Django Version: 3.0.3 > Exception Type: OperationalError

Re: saving data from both a model and a derived model

2017-05-24 Thread Jim Anderson
Hi James, I'm attaching the stacktrace as you requested. The call to rs_template.save() is made from a django view. rs_template is an instance of a class RSTemplate which is derived from STemplate. STemplate is derived from PriorityItemType. PriorityItemType is derived from ItemType. ItemType is

Re: tutorial on using dbshell?

2017-05-23 Thread Jim Anderson
James, Thank you, again. I have install the sqlite command line package and all is working for me. Jim A. On Mon, May 22, 2017 at 6:35 PM, James Schneider wrote: > > > On May 22, 2017 3:07 PM, "Jim Anderson" wrote: > > Hi James, > > I'm looking at th

Re: tutorial on using dbshell?

2017-05-22 Thread Jim Anderson
Hi James, I'm looking at the sqlite3 documentation now, but I'm still not quite sure how to run the dbshell. Once I am in the shell, I assume that I can run sqlite3 commands as needed. But when I enter: *% python manage.py dbshell* I get the following error messages: *setting.py: BASE_DIR =

Re: django.db.migrations.graph.NodeNotFoundError:

2016-12-23 Thread Collin Anderson
Hi, Do you want to copy and paste your error message? (I assume it's similar, but it might have some better clues.) My guess you have a migration that's referencing a migration file that was deleted or something. Collin On Thursday, December 22, 2016 at 7:33:48 PM UTC-6, skerdi wrote: > > I h

Re: ProgrammingError: relation "auth_user" does not exist.

2016-12-23 Thread Collin Anderson
Hi, Have you tried running ./manage.py makemigrations and then ./manage.py migrate? That's needed to actually create the table. Collin On Thursday, December 22, 2016 at 12:25:58 PM UTC-6, Biplab Gautam wrote: > > I tried to set up custom user model by inheriting from AbstractBaseUser as > inst

Re: existing database connectivity

2016-12-23 Thread Collin Anderson
Hi, You could try re-installing psycopg2 to see if that fixes it. Collin On Thursday, December 22, 2016 at 1:55:53 AM UTC-6, Rasika wrote: > > > I am followed the steps as I am getting in tutorials > when I run the command : > python manage.py migrate > this is giving me following error > >

Re: MultiWidget not rendering

2016-12-23 Thread Collin Anderson
Hi, I think you want something like this. class Fourteen(forms.Form): mywidget = forms.DateField(widget=DateSelectorWidget()) Collin On Monday, December 19, 2016 at 1:13:17 PM UTC-6, Farhan Khan wrote: > > Unfortunately that does not display. > In the template I had it as {{ fourteen }} and

Re: ImportError at/ No module name

2015-11-07 Thread Scott Anderson
We just tripped across something similar here as well. The person doing the tutorial had flipped the 'startup' and 'put "blog" in the INSTALLED_APPS' steps of the tutorial. She commented out 'blog' from INSTALLED_APPS and startapp worked as intended. -scott On Sunday, August 11, 2013 at 8:11:1

Re: return values from static files to django admin

2015-11-05 Thread Collin Anderson
Hi, You may need to also calculate the possible options in python. Some hacky code that might help: class AdminRoutingInlineForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(AdminRoutingInlineForm, self).__init__(*args, **kwargs) field1 = self.data.get('field1

Re: jquery and django template

2015-11-05 Thread Collin Anderson
Hi, Are you trying to show the user what filters are being applied to the data, or are you trying to filter the data based on a user selection? Collin On Monday, November 2, 2015 at 2:51:36 AM UTC+1, varun naganathan wrote: > > I basically have the database entries in the namespace of my templa

Re: Django bootstrap3_datetime widget in admin site doesn't pass form data

2015-11-05 Thread Collin Anderson
Hi Ilia, The default admin widget looks for id_0 and id_1, but if you use a custom widget, that is responsible for looking for its own value (like publish_time_1). You could check out DateTimePicker's source code to see what it's actually doing. Thanks, Collin On Sunday, November 1, 2015 at 3

Re: mssql databASE CONNECTION to Django

2015-11-05 Thread Collin Anderson
Hello, I'd recommend using django 1.7 until mssql gets compatible with django 1.8. Thanks, Collin On Friday, October 30, 2015 at 3:31:35 PM UTC+1, Sid wrote: > > sorry tim I know I am asking a dumb question...can you please tell me what > is the best way to make it work please if possibe...beca

Re: Locking / serializing access to one element in database

2015-11-05 Thread Collin Anderson
ilter(jahr=Jahr, monat=Monat).update(value=new_value ) Collin On Wednesday, October 28, 2015 at 8:50:09 PM UTC+1, Carsten Fuchs wrote: > > Hi Collin, hi all, > > Am 27.10.2015 um 19:56 schrieb Collin Anderson: > > Yes, an exception will be raised. > > Thinking further about

Re: [django_tables2] Expected table or queryset, not 'str'.

2015-11-05 Thread Collin Anderson
Hi, Do you to post your traceback if you're still getting this error? Thanks, Collin On Wednesday, October 28, 2015 at 2:17:28 PM UTC+1, Leutrim Osmani wrote: > > Can you please tell me how did you fixed this error ? > > On Monday, April 29, 2013 at 9:21:29 AM UTC+2, binith a k wrote: >> >> You

Re: Standalone Project using django ORM

2015-11-05 Thread Collin Anderson
Hi, It looks like you stack trace is somehow getting cut off. My guess is it's trying to import something that either doesn't exist or has a syntax error. Collin On Wednesday, October 28, 2015 at 12:39:06 AM UTC+1, ADEWALE ADISA wrote: > > The screen shot is attached. There is no error message

Re: Safe tag is working differently for different view.

2015-11-05 Thread Collin Anderson
Hello, Are you sure they're using the same template? (If you change something does it actually affect both views?) Is one of the views using mark_safe? Collin On Tuesday, October 27, 2015 at 9:29:02 PM UTC+1, sonu kumar wrote: > > I am having two views both are extending from same base.html an

Re: Django Models Joining and Normalising

2015-10-28 Thread Collin Anderson
Hello, I'd personally keep it all in one model for as long as possible. It will really simplify queries and it should make your code a lot cleaner. Wait til you have some actual performance problems before splitting the models up. Collin On Wednesday, October 14, 2015 at 12:11:55 PM UTC-4, Yu

Re: Flakey tests and django.db.utils.InterfaceError: connection already closed

2015-10-28 Thread Collin Anderson
Hello, Here are some questions that might help debugging this: Do other tests that use the database run ok? If you run _only_ this test, is it still a problem? Are you using threads at all? Is there an exception that's being silenced somewhere else? Collin On Tuesday, October 27, 2015 at 9:

Re: Polymorphic class and geomodels?

2015-10-28 Thread Collin Anderson
Hello, Are you trying to combine multiple models into one, like this? class PolyModel(pdmpunto, pdmtransetto, pdmarea): pass You could also try asking on the geodjango list: http://groups.google.com/group/geodjango Collin On Monday, October 26, 2015 at 7:18:24 AM UTC-4, Luca Moiana wrote:

Re: Adding gif file to existing project

2015-10-27 Thread Collin Anderson
Hi Gary, This sounds like an issue with Ninja-IDE. You could try asking on their mailing list: http://groups.google.com/group/ninja-ide/topics Thanks, Collin On Sunday, October 25, 2015 at 10:51:13 PM UTC-4, Gary Roach wrote: > > Django 1.8 > Python 3.4 > Debian 8 (jessie) with kde desktop >

Re: Locking / serializing access to one element in database

2015-10-27 Thread Collin Anderson
Yes, an exception will be raised. As an example, Django uses force_insert when creating sessions: https://github.com/django/django/blob/32ef48aa562e6aaee9983f5d0f1c60f02fd555fb/django/contrib/sessions/backends/db.py#L86 On Saturday, October 24, 2015 at 2:36:15 PM UTC-4, Joakim Hove wrote: > > Hi

Re: makemigrations and language_code

2015-10-27 Thread Collin Anderson
Hi, is libapp using ugettext_lazy? That's what the admin app is using. Collin On Thursday, October 22, 2015 at 2:53:53 AM UTC-4, Hugo Osvaldo Barrera wrote: > > > On Tue, Oct 20, 2015, at 10:39, Aron Podrigal wrote: > > Simply run > > ./manage.py makemigrations myapp > > > That will avoid

Re: Dynamic Formset Radiobutton Issue

2015-10-24 Thread Collin Anderson
Hello, That formset jQuery script it quite ancient (2009). You could try using jQuery 1.2.6 and see if it works correctly with that version. Collin On Friday, October 23, 2015 at 8:54:49 AM UTC-4, Jur Remeijn wrote: > > So I'm using a dynamic formset within django: > https://github.com/elo80ka

Re: Locking / serializing access to one element in database

2015-10-24 Thread Collin Anderson
Hi Carsten, Something that might help: depending on how your unique keys are set up, if the thread thinks that the object is new, it could try using .save(force_insert=True). That way it won't overwrite a different object with the same PK. Thanks, Collin On Thursday, October 22, 2015 at 9:56:

Re: Complex form in modelform

2015-10-24 Thread Collin Anderson
Hi, For starters, here's an example of a formset for multiple images: http://stackoverflow.com/questions/32889199/how-to-upload-multiple-images-using-modelformset-django Collin On Monday, October 19, 2015 at 4:56:18 PM UTC-4, Arnab Banerji wrote: > > Hi - I am trying to create a form from a mode

Re: Django: Relation does not exist in Postgresql

2015-09-04 Thread Anderson Resende
You need to create that tables at your database. Please run: python manage.py makemigrations python manage.py migrate Try it! -- 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, s

Re: Django Http post and csrf error

2015-03-31 Thread Anderson Resende
In your template put in your form: {% csrf_token %} example: {% csrf_token %} -- 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...@

Re: Problem at server startup

2015-03-28 Thread Anderson Resende
Put this code on first line in your files.py: # -*- coding: utf-8 -*- Maybe work! -- 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...@g

Re: Strange deployment problem

2015-03-28 Thread Anderson Resende
I don't used mysql,but in postgres for you write in a database your user db needs permission to write. Check that! -- 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

Re: Global access to request.user

2015-03-27 Thread Anderson Resende
Other way is use sessions! Django provide session midleware. You can get the session dict out of the view! Sorry my english, I am a Brazilian guy! > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Global access to request.user

2015-03-27 Thread Anderson Resende
Maybe a global state? Yes! https://docs.djangoproject.com/en/1.7/topics/http/middleware/#init I never did that, but you can try! -- 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

Re: Global access to request.user

2015-03-26 Thread Anderson Resende
You can use middlewares!!! It is a way... -- 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

Re: how to access manager from a model instance?

2015-03-26 Thread Anderson Resende
Can you give a example? be more especific, post some code. -- 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

Re: Max_length of EmailField in django.contrib.auth.models.User

2015-03-22 Thread Anderson Resende
I will give you one more complete example: Custom a User is not easy you need to do many things: In that link django-docs explain all for you and there is an example with email field. https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#a-full-example My tip is: In the docs there is

Re: Max_length of EmailField in django.contrib.auth.models.User

2015-03-22 Thread Anderson Resende
You can inheriant of AbstractBaseUser and define your field: from django.contrib.auth.models import AbstractBaseUser class MyCustomUser(AbstractBaseUser): mail = models.EmailField(max_lenght=254) REQUIRED_FIELDS = ['mail'] # more code Please sorry about my english, I'm a Brazili

Re: Why is appearance of admin page so different between development and deployment servers?

2015-03-22 Thread Anderson Resende
Em production you need to run the command: python manage.py collectstatic and you need configure your production serve like "apache" to read the 'static' folder in you root project. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscrib

Re: Max_length of EmailField in django.contrib.auth.models.User

2015-03-22 Thread Anderson Resende
No, the user class uses 75. You need to change to 254. models.EmailField(max_lenght=254) > > -- 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+unsub

Re: [Python] Problem with arguments given

2015-03-14 Thread Anderson Resende
Change your method: def ask_number(self,question,low,high): response=None while response not in range(low,high): response=int(input(question)) change self to class: This way you can call the method directly from Hand. @classmethod def ask_number(class,question,l

Re: Django 1.7.6 TypeError when applying migration with ForeignKey with default

2015-03-12 Thread Collin Anderson
Hi, Maybe g() should return the id instead of the instance? That does seem a bit odd that it wouldn't accept an A() instance as the default. Collin On Wednesday, March 11, 2015 at 7:43:35 AM UTC-4, Krzysztof Ciebiera wrote: > > I have created a model A: > > def g(): > return A.objects.get(p

Re: Testing Django: testing template at different time

2015-03-12 Thread Collin Anderson
Hi, You could try using freezegun to run the test as if it were a certain time of day. https://pypi.python.org/pypi/freezegun Or, you could say something like: if 9 <= datetime.datetime.now().hour < 17: self.assertContains(response, "It's working time!") else: self.assertContains(respon

Re: Different user profile associated to a each user group

2015-03-12 Thread Collin Anderson
Hi, I'd personally recommend re-using the same model and having a "type" field for whether it's corporate or private. Otherwise, you'd need to do something like: class Corporate(models.Model): user = models.OneToOneField(User) class Private(models.Model): user = models.OneToOneField(Us

Re: Django OperationalError

2015-03-12 Thread Collin Anderson
etar Pilipovic > wrote: > >> Heh, lol, Ok tax Collin I will do that. I was thinking that i need to >> delete mine migration from the terminal, but I will try that, tnx >> 10.03.2015. 18.01, "Collin Anderson" > >> је написао/ла: >> >> Hi Petar,

Re: [django 1.7.6] system error: 10054 An existing connection was forcibly closed by the remote host

2015-03-12 Thread Collin Anderson
Hi, Interesting. If you switch back to previous version of django you don't have that problem? Is it a slow query? Are you using MySQL or MSSQL? Collin On Tuesday, March 10, 2015 at 8:55:44 PM UTC-4, Weifeng Pan wrote: > > Hi, > > > I upgrade to latest version of django. Every time I navigat

Re: Filtering a QuerySet by the result of user.has_perm

2015-03-12 Thread Collin Anderson
Hi Adam, It's pretty inefficient, but you can do: MyModel.objects.filter(pk__in=[obj.pk for obj in MyModel.objects.all() if user.has_perm('read', obj)]) But, actually, I think you want to use get_objects_for_user(): http://django-guardian.readthedocs.org/en/v1.2/userguide/check.html#get-objects-

Re: Getting 500 error on ASO

2015-03-11 Thread Collin Anderson
Hi Michael, Are you checking your Apache log? Also, be sure to set up ADMINS so you can get emails for any django errors. I believe runfastcgi is gone from django now, along with all of django.core.servers.fastcgi. At work we used to host on ASO too. We now use Linode. Digital Ocean is good t

Re: Django server serving cached template pages

2015-03-10 Thread Collin Anderson
Hi, Yes, apparently many people get tripped up on this step. Is this django1.7? create a blank "blank_site.html". <- I assume you mean create a blank base_site.html? I assume this is with manage.py runserver? (If it's apache/uwsgi/gunicorn, you need to reload the program when changing the set

Re: my mysite/templates/admin/base_site.html is ignored (tutorial unclear?)

2015-03-10 Thread Collin Anderson
Hi, To be clear, you should have this setting: TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] and in your mysite/templates/admin/base_site.html you should have something like: {% block branding %} Polls Administration {% endblock %} Does that all look right? Thanks, Collin On Sunday,

Re: Accessing Django models using DJANGO_SETTINGS_MODULE

2015-03-10 Thread Collin Anderson
Hi, Hmm... maybe try ChatRoom.objects.all().all() ? :) If you run this, you can see if it's actually running sql or not: import logging; logging.basicConfig(level=logging.DEBUG) Are you sure you're using the same database? :) Collin On Sunday, March 8, 2015 at 8:41:30 AM UTC-4, Dheerendra Rath

Re: Existing database - new project

2015-03-10 Thread Collin Anderson
Hi, inspectdb makes step #1 much easier. If you're not planning on removing some of the columns or restructuring things, I'd recommend #1. Collin On Saturday, March 7, 2015 at 9:31:24 AM UTC-5, Derek wrote: > > I have taken route 1 before; its a bit more messy because you may have to > expli

Re: Django OperationalError

2015-03-10 Thread Collin Anderson
thon manage sqlflush, syncdb, > migrate <http://ur1.ca/jv371>. I have notice that there was no migration > to apply at the end, and the error is still there. > Is there something else I can do, or how can I approach this differently. > Best > Petar > > On Fri, Mar 6, 2015 at

Re: Django Admin Page

2015-03-06 Thread Collin Anderson
Hi, That's odd. Maybe try updating django? It looks like you're using 1.8 pre-alpha from 3 months ago. Collin On Friday, February 20, 2015 at 1:40:03 AM UTC-5, Tim Co wrote: > > Hello, > > We are trying to run a local development server for our django python app. > We are able to connect to ou

Re: how pass get parameter django bootstrap pagination

2015-03-06 Thread Collin Anderson
Hi, If you have the request context processor installed, you can do this: {% bootstrap_paginate object_list range=request.GET.range %} Collin On Thursday, March 5, 2015 at 4:35:33 AM UTC-5, SHINTO PETER wrote: > > {% load bootstrap_pagination %} > {% bootstrap_paginate object_list range=10 %

Re: getting tuples from http request.GET

2015-03-06 Thread Collin Anderson
Hi, Normally query arguments are separated by &. If you're able to send the data like this: https://mydesktop.com/validator?hostname1=host1.example.com&location1=ca&ip1=2.2.2.2&hostname2=host2.example.com&location2=wa&ip2=3.3.3.3 Then you could do something like: data = [] i = 0 while True:

Re: Rolling back to practice on old bugs

2015-03-06 Thread Collin Anderson
Hi, I always type: PYTHONPATH=.. ./runtests.py Collin On Wednesday, March 4, 2015 at 4:30:54 PM UTC-5, Javis Sullivan wrote: > > I am following this tutorial here > "Writing your > first Django patch" and while it directs me to rollba

Re: Populating Django app db with JSON data

2015-03-06 Thread Collin Anderson
Hi Sandeep, A snapshot (or at least a diff from the previous one) is stored when you run makemigrations. Collin On Wednesday, March 4, 2015 at 2:15:41 PM UTC-5, Murthy Sandeep wrote: > > Hi > > thanks for the info. > > The docs also say that RunPython runs “custom Python code > in a historic

Re: Django(1.7) admin - separate user-profile section

2015-03-06 Thread Collin Anderson
Hi, If you just add a custom __str__ (or __unicode__ on py2) it might do what you want. def __str__(self): return str(user) Otherwise, in UserTokenAdmin, set list_display = ['user'] Collin On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Flemming Hansen wrote: > > Hi all, > > I need to ma

Re: Django 1.7 tutorial part 4, url

2015-03-06 Thread Collin Anderson
Hi, That seems strange. The error says that there's no question with id=1. Are you sure there's a question with id=1? The ending slash seems important to me. I don't know why it would work without it. Collin On Wednesday, March 4, 2015 at 2:15:32 PM UTC-5, Daniel Altschuler wrote: > > I ran i

Re: Fatal Error in initializing sys standard streams

2015-03-06 Thread Collin Anderson
Hi, That doesn't look good :) Maybe try reinstalling python. Collin On Wednesday, March 4, 2015 at 11:11:12 AM UTC-5, sriraag paawan wrote: > > > Hello Guys, > > I am new to Django.. i am using Django 1.7.4 and Python 3.4 > > I was about to complete Django tutorial part-5 about tests but a Fata

Re: Can't make ManyToMany form fields hidden

2015-03-06 Thread Collin Anderson
https://code.djangoproject.com/ticket/24453 On Wednesday, March 4, 2015 at 12:40:40 AM UTC-5, Eric Abrahamsen wrote: > > Hi, > > I'm making some heavily customized model formsets, to encourage my users > to input data. Mostly that involves cutting down the number of huge > drop-down menus they

Re: Django OperationalError

2015-03-06 Thread Collin Anderson
Hi, The problem is that django_session doesn't exist in your database. Either it was never created or it was created and then later deleted. Does running manage.py migrate re-create it? Collin On Monday, March 2, 2015 at 11:36:51 PM UTC-5, Petar Pilipovic wrote: > > Hello James, sorry for not

Re: django Search page

2015-03-06 Thread Collin Anderson
Hi, You'll need to use javascript for that. Collin On Monday, March 2, 2015 at 2:27:35 AM UTC-5, Sabeen Sha wrote: > > which is the best way to implement the following:: > i will be having a text box and a Add button > > Along with a table below it containing headers class > AssesmentBuildingD

Re: [1.8] MultiHost with template dir per Host

2015-03-06 Thread Collin Anderson
Hi, You might need to modify the template engine directly. Collin On Sunday, March 1, 2015 at 6:31:57 PM UTC-5, Neyoui wrote: > > Hi, > > I had create a middleware, that is able to change the template directory > per host on the fly. > But it stopped working since I upgraed to Django 1.8 and I

Re: How to save user to foreignKey field for new records in modelFormset case?

2015-03-06 Thread Collin Anderson
Hi, The form doesn't have access to the current user. I'd attach it using the view. Thanks, Collin On Wednesday, February 25, 2015 at 3:53:40 AM UTC-5, Mike wrote: > > Hi, > I have created modelFormset using SchoolHistory model and SchoolForm form. > > "SchoolFormSet = modelformset_factory(Scho

Re: JSON Response

2015-02-20 Thread Collin Anderson
Hi, It sounds like you click "submit" and then get a page showing the raw json? That sounds like it could be a bug in your code. Either the event handler is not connected, or there's an error. You could try checking "Preserve Log" in the developer console. Collin On Thursday, February 19, 201

Re: matplotlib pyplot stop working

2015-02-20 Thread Collin Anderson
Hi, The freezing could be a memory leak. http://stackoverflow.com/questions/7125710/matplotlib-errors-result-in-a-memory-leak-how-can-i-free-up-that-memory Could the image be cached by the browser, does shift+F5 refresh it? The easiest way to fix it would be to use a different url/filename eve

Re: How to host django application in redhat using virtual environment?

2015-02-20 Thread Collin Anderson
Hi, Here's a tutorial. https://devops.profitbricks.com/tutorials/deploy-django-with-virtualenv-on-centos-7/ Collin On Thursday, February 19, 2015 at 8:29:47 AM UTC-5, SHINTO PETER wrote: > > How to host django application in redhat using virtual environment? > -- You received this message bec

Re: Seems like a geodjango bug with multiple databases

2015-02-19 Thread Collin Anderson
Hi, Interesting. What version of django is this? Here's something to try: Room.objects.using('another').select_related('hotel').get(pk=10) It could very well be an issue with GeoManager / GeoQuerySet. You also could ask on the geodjango list to see if anyone else has run into that. http://gro

Re: Trouble changing from sqlite3 to postgres

2015-02-19 Thread Collin Anderson
Hi, It seems strange that it would be trying to convert a "date" column to an integer. Since you're creating a new database from scratch, you could try deleting your migrations and generating them from scratch to see if that helps. Otherwise, what does your "app_1.0003_auto_20141126_2333" file

Re: Form Wizard: how to send instance_dict based on the request

2015-02-19 Thread Collin Anderson
Hi, You could instead just override get_form_instance(step). That way you'll have access to self.request. Collin On Tuesday, February 17, 2015 at 8:26:30 PM UTC-5, Karim Gorjux wrote: > > Hello mates! > > I have some problems to understand how to set the view for > the NamedUrlSessionWizardVie

Re: Can migrated apps depend on unmigrated apps?

2015-02-19 Thread Collin Anderson
Hi Carsten, I in my experience, it _sometimes_ works to have migrated apps depend on unmigrated apps. If you haven't yet, you could try generating migrations for the unmigrated app, and reference them using MIGRATION_MODULES. Collin On Tuesday, February 17, 2015 at 5:00:26 PM UTC-5, Carsten F

Re: Handling FormSet client side with javascript

2015-02-19 Thread Collin Anderson
Hi, Sorry for the late reply. Does simply using {{ formset.media }} work? Collin On Friday, February 13, 2015 at 11:02:31 AM UTC-5, aRkadeFR wrote: > > Hello everyone, > > I'm using FormSet in order to add multiple object at once on > a view. To have a more user friendly approach, I created a

Re: JsonResponse and Ajax function.

2015-02-19 Thread Collin Anderson
Hi, Sorry for the late reply. Do you need to use JSON.parse(response).status? Collin On Tuesday, February 10, 2015 at 8:33:58 AM UTC-5, elcaiaimar wrote: > > Hello! > > I've written a code to delete db registers and I want to call an ajax > function when the delete is done. > At the moment, whe

Re: Django: get profiles having auth.Group as foreign key

2015-02-19 Thread Collin Anderson
Hi, Sorry for the late reply. Do you just want something like this? {% for dashboard in group.dashboard_set.all %} {{ dashboard.d_name }} etc {% endfor %} Collin On Tuesday, February 10, 2015 at 12:41:15 AM UTC-5, itsj...@gmail.com wrote: > > I have an model which uses auth.models Group as fo

Re: Custom model field and custom widget

2015-02-19 Thread Collin Anderson
Hi, Sorry for the late reply. Check out editable=False if you haven't. Collin On Friday, January 30, 2015 at 9:03:41 AM UTC-5, Thomas Weholt wrote: > > Hi, > > I need to create a custom django model field, a varchar(10) field which > has a calculated value set on save on the model using it and

Re: How to detect (daily) User Login when using cookies?

2015-01-30 Thread Collin Anderson
> On Tuesday, January 27, 2015 at 9:00:15 PM UTC+1, Collin Anderson wrote: >> >> Hi, >> >> Would it make sense to simply keep a record of when the last time you've >> seen the user is? >> >> Collin >> >> On Friday, January 23, 2015 at 4

Re: Reduce start up time for manage.py

2015-01-30 Thread Collin Anderson
Hi, Many people would recommend against this, but if you can put the imports for your heavy 3rd party libraries inside functions and methods, that allow them to be loaded only if needed. I would also recommend in general to simply have fewer libraries and apps (easier said than done :) Also,

Re: Best practice to render the view based on the user

2015-01-30 Thread Collin Anderson
Hi, Not sure about whether it's a good idea or not. If statements might also be good enough. Be careful with security, but in theory something like this should work: method_name = 'person' + person.type method = getattr(self, method_name) output = method() Collin On Wednesday, January 28, 201

Re: django / tastypie - how to exclude a resource attribute from obj_create, but keep it for listing

2015-01-30 Thread Collin Anderson
Hi Eugene, Would it work to something like this in your obj_create? bundle.data.pop('blueprint', None) Collin On Tuesday, January 27, 2015 at 11:01:56 AM UTC-5, Eugene Goldberg wrote: > > I have the following tastypie resource: > > class WorkloadResource(ModelResource): > # blueprints = M

Re: path to django from jython

2015-01-30 Thread Collin Anderson
Hi, I think you to make sure django is on your PYTHONPATH / sys.path Collin On Tuesday, January 27, 2015 at 10:51:13 AM UTC-5, Josh Stratton wrote: > > Okay, stupid question, but how do I source django when jusing jython? I > have django installed using pip and jython installed locally. I've

Re: Create Django token-based Authentication

2015-01-30 Thread Collin Anderson
Hi, What happens when you try? :) Your setup is pretty complicated, but I don't know if REST framework will help much. Collin On Tuesday, January 27, 2015 at 12:00:59 AM UTC-5, Hossein Rashnoo wrote: > > I have my authentication service on django. I want to role as web-service > to gave other

Re: Putting picture thumbnails within admin page

2015-01-29 Thread Collin Anderson
Hi, Any luck? Try looking at the Network tab of the developer console to see what the errors are. Collin On Monday, January 26, 2015 at 7:31:54 PM UTC-5, bradford li wrote: > > > I am trying to put thumbnail pictures of my photos within my admin page. I > am currently running into the issue w

Re: Wanted: Best practices for setting "_" (to ugettext/ugettext_lazy)

2015-01-27 Thread Collin Anderson
Hi, Why reset it at the end of your module? Why not use ugettext_lazy everywhere? from django.utils.translation import ugettext_lazy as _ (Disclaimer: I've never used translations before :) Collin On Saturday, January 24, 2015 at 3:46:31 AM UTC-5, Torsten Bronger wrote: > > Hallöchen! > > Thi

Re: gis: geo_db_type error in run_checks() in 1.7 (not 1.6)

2015-01-27 Thread Collin Anderson
Hi, You could also try the geodjango mailing list if nothing else. http://groups.google.com/group/geodjango Collin On Sunday, January 25, 2015 at 6:04:57 PM UTC-5, dne...@destinati.com wrote: > > Hi, > > Wanted to throw this out there, not sure truly if it is my fault or a bug. > > Just upgraded

Re: Forms test run on development database instead of test database

2015-01-27 Thread Collin Anderson
Hi, I just tried out your project. Looking at the stacktrace, the test module is importing forms (before the test starts). The forms module is running a query on startup for choices. https://github.com/merwan/django-choicefield/blob/master/myapp/forms.py Don't do queries on startup. :) Collin

Re: sending email

2015-01-27 Thread Collin Anderson
low. now when i click on authorized Leave button > an email should be send to the test user. please point me to right > direction. > [image: Inline image 1] > > [image: Inline image 2] > > Cheers, > > On Fri, Jan 23, 2015 at 1:18 PM, Collin Anderson > wrote: > &g

Re: programming error in group by clause

2015-01-27 Thread Collin Anderson
Hi, What database are you using? If you can reproduce this in a simple project, feel free to open a ticket about it. Thanks, Collin On Sunday, January 25, 2015 at 12:51:31 AM UTC-5, satya wrote: > > Need some help on fixing the following error. I recently moved to 1.8alpha > version from an o

Re: Django: How to customize the admin form for specific model

2015-01-27 Thread Collin Anderson
Hi, You could have the images be inline: class CommentImageInline(models.TabularInline): model = CommentImage extra = 0 class CommentAdmin(models.ModelAdmin): inlines = [CommentImageInline] Though, you may need to use a custom widget to get the actual images to show up. Collin On

Re: unable to open project

2015-01-27 Thread Collin Anderson
Hi, What happens when you try? Collin On Saturday, January 24, 2015 at 3:59:55 AM UTC-5, abhishek kumar wrote: > > I am unable to open my project again. As i am using virtual enviroment in > windows. > -- You received this message because you are subscribed to the Google Groups "Django user

Re: How do you link your Django project to a domain

2015-01-27 Thread Collin Anderson
I use namecheap, but yes, domains.google.com has a nice user interface. On Saturday, January 24, 2015 at 8:22:33 AM UTC-5, patrickbeeson wrote: > > You might also check out Google's recently launched domain registrar at > domains.google.com. > > On Saturday, January 24, 2015 at 2:01:43 AM UTC-5,

Re: login_required in urlpatterns TypeError 'tuple' object is not callable

2015-01-27 Thread Collin Anderson
Hi, Something like this might work: from home.urls import urlpatterns as home_urls url('^home/', include(list(login_required(x) for x in home_urls))) Collin On Friday, January 23, 2015 at 7:09:30 PM UTC-5, Vijay Khemlani wrote: > > I may be mistaken, but I don't think you can decorate an enti

Re: Dictionary in admin interface

2015-01-27 Thread Collin Anderson
Hi, The admin doesn't really have a way to do this. You could edit KeyValuePair inline on Dictionary. Why not have a "Params" model that has a ForeignKey to Request? Collin On Friday, January 23, 2015 at 1:32:21 PM UTC-5, Sven Mäurer wrote: > > I want to manage a dictionary inline over the adm

Re: How to detect (daily) User Login when using cookies?

2015-01-27 Thread Collin Anderson
Hi, Would it make sense to simply keep a record of when the last time you've seen the user is? Collin On Friday, January 23, 2015 at 4:43:41 AM UTC-5, Tobias Dacoir wrote: > > I'm using django-allauth and I receive a signal when a user logs in. Now I > want to store each day the user logs in.

Re: Unable to save object with images while using FormWizard in Django 1.7 and Python 3.4

2015-01-27 Thread Collin Anderson
Hi, Use items() instead of iteritems(). Collin On Thursday, January 22, 2015 at 11:31:23 AM UTC-5, Frankline wrote: > > ​Hi all​, > I am having a problem saving a Django form using the *FormWizard > * > while using *Djan

  1   2   3   4   5   6   7   8   9   10   >