Re: Can't create editable foreign key field in Django admin: going to give up on django

2016-09-20 Thread Hanh Kieu
I tried using this, but it doesn't necessarily work or let me enter in two words that get turned into a translation. Could you elaborate on how inline would help? On Monday, September 12, 2016 at 10:39:29 PM UTC-7, ludovic coues wrote: > > Have you looked at >

Re: Can't create editable foreign key field in Django admin: going to give up on django

2016-09-20 Thread Hanh Kieu
Thank You Mike, I understand what you mean and I've made the changes, but it doesn't help me with my original problem, unfortunately. On Tuesday, September 13, 2016 at 12:53:51 AM UTC-7, Mike Dewhirst wrote: > > On 13/09/2016 4:06 PM, Hanh Kieu wrote: > > "So your Translation needs a FK to each

Re: Issue in filtering .....(want to show only the products that are sold and have status of paid in orders App)

2016-09-20 Thread Shamaila Moazzam
there is no m2m relation in products and cart model *carts/models.py* class CartItem(models.Model): cart = models.ForeignKey("Cart") item = models.ForeignKey(Variation) quantity = models.PositiveIntegerField(default=1) line_item_total = models.DecimalField(max_digits=10,

Re: covert julian date to calander date

2016-09-20 Thread sum abiut
Thanks Erik, i think that should do the trick.is there a way to covert the date column straight from the sql query or from the template? cheers On Tue, Sep 20, 2016 at 9:17 PM, Erik Cederstrand wrote: > > > Den 20. sep. 2016 kl. 01.40 skrev sum abiut

Re: Unable to post to the bug tracker (Submission rejected as potential spam)

2016-09-20 Thread Ben Whale
No problem. Thanks Tim. On Wednesday, 21 September 2016 09:47:44 UTC+10, Tim Graham wrote: > > Sorry for the inconvenience. We don't have a good solution right now. I > tried training the filter by marking your submission as valid. Alternately, > you just need to rephrase your comment until the

Re: Please how do connect a modelform to a CreateView

2016-09-20 Thread James Schneider
On Sep 20, 2016 5:16 PM, "Netesy Emmanuel" wrote: > > My View.py > > class EducationCreate(CreateView): > model = Education > form_class = EducationForm > This is the linkage, so it looks like you already have it in place. Is there a specific issue you are having? >

Please how do connect a modelform to a CreateView

2016-09-20 Thread Netesy Emmanuel
My View.py class EducationCreate(CreateView): model = Education form_class = EducationForm def form_valid(self, form): form.instance.student = self.request.user return super(EducationCreate, self).form_valid(form) @method_decorator(login_required) def

Re: How to send parameters in url tag?

2016-09-20 Thread Ares Ou
Hi, You have to use a form of keyword arguments to provide parameters in {% url %} tag. For example, {% url post_view post_id=post_id %} the former post_id is the argument name in your view function, the latter post_id is the variable name in your template context. If you have more than

Re: Unable to post to the bug tracker (Submission rejected as potential spam)

2016-09-20 Thread Tim Graham
Sorry for the inconvenience. We don't have a good solution right now. I tried training the filter by marking your submission as valid. Alternately, you just need to rephrase your comment until the filter accepts. On Tuesday, September 20, 2016 at 7:00:41 PM UTC-4, Ben Whale wrote: > > Hi all >

Unable to post to the bug tracker (Submission rejected as potential spam)

2016-09-20 Thread Ben Whale
Hi all I'm unable to comment on a bug. When I attempt to comment on bug #27234 I receive the message, "Submission rejected as potential spam SpamBayes determined spam probability of 97.12%". What do I need to do to allow me to comment? Ta -- You received this message because you are

Re: Starting maintenance on code.djangoproject.com

2016-09-20 Thread Tim Graham
The maintenance is complete. If you find any issues creating or updating tickets, let me know. Thanks! On Tuesday, September 20, 2016 at 1:17:11 PM UTC-4, Tim Graham wrote: > > https://code.djangoproject.com/ is going down shortly for an upgrade. > I'll send an update if it takes more than an

Re: cannot import name SortedDict

2016-09-20 Thread Etienne Robillard
Le 2016-09-20 à 11:25, Michal Petrucha a écrit :. If that doesn't help, try checking if there are any stale leftover .pyc files, and try removing those. Good luck, Michal That did the trick... There was a old .pyc file in my Django source tree from a old branch... Thanks, Etienne --

Re: cannot import name SortedDict

2016-09-20 Thread Etienne Robillard
Hi Alessandro, I have replaced the only occurrence of SortedDict with collections.OrderedDict in app_plugins, but the issue persist. Is it possible that the templatetags module is being cached somehow by Django ? Thanks, Etienne Le 2016-09-20 à 08:27, Alessandro Madruga Correia a écrit

Starting maintenance on code.djangoproject.com

2016-09-20 Thread Tim Graham
https://code.djangoproject.com/ is going down shortly for an upgrade. I'll send an update if it takes more than an hour. -- 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

Re: No module named MySQLdb

2016-09-20 Thread Tim Graham
I'm not sure if PyMySQL is compatible, but it's not tested by the Django team. I'd use mysqlclient as documented: https://docs.djangoproject.com/en/stable/ref/databases/#mysql-db-api-drivers On Tuesday, September 20, 2016 at 11:18:08 AM UTC-4, Alessandro Madruga wrote: > > pip install

Re: cannot import name SortedDict

2016-09-20 Thread Michal Petrucha
On Tue, Sep 20, 2016 at 11:21:20AM -0400, Etienne Robillard wrote: > Hi Alessandro, > > I have replaced the only occurrence of SortedDict with > collections.OrderedDict in app_plugins, but the issue persist. > > Is it possible that the templatetags module is being cached somehow by > Django ? >

Re: No module named MySQLdb

2016-09-20 Thread Alessandro Madruga Correia
pip install MySQL-python On Tue, Sep 20, 2016 at 12:12 PM, Carlos Andre wrote: > 1º install setuptools; > 2º install PyMySQL; > > > 1º --> https://pypi.python.org/pypi/setuptools > 2º --> https://github.com/PyMySQL/PyMySQL > > > 2016-09-20 11:01 GMT-03:00 fossildoc

Re: No module named MySQLdb

2016-09-20 Thread Carlos Andre
1º install setuptools; 2º install PyMySQL; 1º --> https://pypi.python.org/pypi/setuptools 2º --> https://github.com/PyMySQL/PyMySQL 2016-09-20 11:01 GMT-03:00 fossildoc : > I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and > MySQL server 5.7.15.

Re: A public cloud with django backend

2016-09-20 Thread Phang Mulianto
hi, this one : {{i.file_name}} should be {{i.file_name}} it will point to your local webserver if in local dev ( http://127.0.0.1/media/filename) , and in prod will be from your domain ( http://yourdomain.com/media/filename) Cheers, Mulianto On Mon, Sep 19, 2016 at 10:59 PM, 'Tom Evans' via

No module named MySQLdb

2016-09-20 Thread fossildoc
I am a newbie to Django. I am running Django 1.10.1, Python 3.5.2, and MySQL server 5.7.15. When I run migrate, I get the message "No module named MySQLdb". There are various posts which say that MySQLdb is not supported by Python 3, and there are a couple of posts which offer solutions, but

Re: How to send parameters in url tag?

2016-09-20 Thread Alessandro Madruga Correia
> > {%url url_name url_params%} > > where url_params as 'pk=object.id' or 'page=page.number' > Here have an example https://docs.djangoproject.com/en/1.10/topics/http/urls/#reverse-resolution-of-urls -- ,= ,-_-. =. [] Alessandro Madruga Correia ((_/)o o(\_)) [http://counter.li.org]

Re: cannot import name SortedDict

2016-09-20 Thread Alessandro Madruga Correia
On Tue, Sep 20, 2016 at 7:29 AM, Etienne Robillard wrote: > Hi, > > I'm trying to run Satchmo on Django 1.10. I have removed from the > app_plugins.templatetags.app_plugins > > module the deprecated import of SortedDict. Could this import statement be > cached by the Django

Re: How to do a generic field in an app.

2016-09-20 Thread Jonty Needham
So now, I'd like to do the following: class AppConfig(models.Model): my_content_type = ForeighnKey(ContentType)

cannot import name SortedDict

2016-09-20 Thread Etienne Robillard
Hi, I'm trying to run Satchmo on Django 1.10. I have removed from the app_plugins.templatetags.app_plugins module the deprecated import of SortedDict. Could this import statement be cached by the Django cache backend ? I have replaced the only occurence of SortedDict by

Import Error Running script to populate database using models

2016-09-20 Thread miguel vfx
Good day, I'm getting import errors when I try to run a script to populate a database using models. I'm new to django so it means I haven't done anything special than follow djangobook and other beginner tutorials. The script I would like to run is in the same folder as the models.py. I

How to send parameters in url tag?

2016-09-20 Thread Za Ars
Hou to send parameters in url as string? {%url url_name url_params%} where url_params as 'pk=object.id' or 'page=page.number' Please, help me, if you can -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

The Photo could not be created because the data didn't validate.

2016-09-20 Thread Josh Houghton
I'm currently trying to allow users to upload photos to my site. They will be sent to /upload to upload a photo which will (if the upload is successful) take them to /edit/ where they will enter the name and tags to the photo. However, when I upload a 3.6MB .jpg to the site, I keep getting the

Re: Incorrect number of bindings supplied. The current statement uses 0, and there are 1 supplied

2016-09-20 Thread premdjango
This issue has been resolved. Please ignore it. I had a hard-coded query to debug a issue and it was not removed..Thanks for looking into it. On Monday, September 19, 2016 at 10:07:02 PM UTC-4, premdjango wrote: > > compiler sql == SELECT "django_migrations"."app", > "django_migrations"."name"

Re: covert julian date to calander date

2016-09-20 Thread Erik Cederstrand
> Den 20. sep. 2016 kl. 01.40 skrev sum abiut : > > Hi, > how to you convert from Julian date to a Calender date. I am pulling data > from an MSSQL and i what to convert the Julian date to calender date before > displaying data on my template. If I understand your question

Re: How to do a generic field in an app.

2016-09-20 Thread Jonty Needham
Awesome -- thanks! On Mon, Sep 19, 2016 at 6:48 PM, Tim Graham wrote: > Do you know about https://docs.djangoproject.com/en/stable/ref/contrib/ > contenttypes/#generic-relations ? > > > On Monday, September 19, 2016 at 12:30:01 PM UTC-4, Jonty Needham wrote: >> >> I want

Re: django group authentication

2016-09-20 Thread Andreas Kuhne
2016-09-20 1:36 GMT+02:00 sum abiut : > Hi, > i am building an app using django, on login i want django to check for > users in a group before login users. > For example, i want to redirect users from a group to page when they > login. > > please advise the best way to

Re: covert julian date to calander date

2016-09-20 Thread C. Kirby
I've never used it, but this package appears to be made for converting between Julian and Gregorian dates https://pypi.python.org/pypi/jdcal Good Luck On Tuesday, September 20, 2016 at 2:42:29 AM UTC+3, suabiut wrote: > > Hi, > how to you convert from Julian date to a Calender date. I am

Help with FlatPages

2016-09-20 Thread Lekan Wahab
Good morning guys, I'm trying to locally set up an existing project on my machine. While I've set up most of the project, the part giving me a hard time are the ones using flatpages. Now, everytime I access those, I get a "No Flatpages matches the given query. " error. I've tried everything

Re: Issue in filtering .....(want to show only the products that are sold and have status of paid in orders App)

2016-09-20 Thread Asad Jibran Ahmed
I'd need to see the full Cart model to confirm, but try something like this to get all products for Orders with the paid status: def get_products(self): orders = Order.objects.filter(user=self.user, status='paid') products_list = list() for o in orders: for p in o.cart.products:

Re: Setting FK field in list view

2016-09-20 Thread RompePC
Ok, looks like just adding a *ModelForm* and getting that field does the work. Sorry for the noobish time. El martes, 20 de septiembre de 2016, 8:23:19 (UTC+2), RompePC escribió: > > Talking in the way of getting the HTML widget yeah, maybe. But what I > wanna do is, given a model *A* with a FK

Re: Setting FK field in list view

2016-09-20 Thread RompePC
Talking in the way of getting the HTML widget yeah, maybe. But what I wanna do is, given a model *A* with a FK *a_fk*, I want *a_fk* to be available in views other than add. So I wanna get *a_fk* and pass it to another context ( *changelist_view* specifically). But the nearest thing I get is

Re: Issue in filtering .....(want to show only the products that are sold and have status of paid in orders App)

2016-09-20 Thread Shamaila Moazzam
user = models.ForeignKey(settings.AUTH_USER_MODEL) this user is a F.K in products model, orders model , carts model right. cart is also a F.K in orders like this class Order(models.Model): status = models.CharField(max_length=120, choices=ORDER_STATUS_CHOICES, default='created') cart =