Re: interoperability of django with another web server

2019-07-23 Thread vignesh karthik
dont need databse files only App files and setting file On Wed, Jul 24, 2019 at 3:58 AM Kasper Laudrup wrote: > Hi CodingManiac, > > On 23/07/2019 14.44, CodingManiac wrote: > > Other framework in python > > > > Your question is really not very precise and you it's hard for anyone to > tell

Re: Running of index.html file

2019-07-23 Thread Mukul Dharwala
Tried this also On Jul 24, 2019 9:26 AM, "vignesh karthik" wrote: did you try install pillow..if it is not try this command pip install pillow On Wed, Jul 24, 2019 at 9:22 AM Mukul Dharwala wrote: > thanks brother but i have tried everything > > On Jul 24, 2019 9:21 AM, "vignesh karthik" >

Re: Running of index.html file

2019-07-23 Thread vignesh karthik
did you try install pillow..if it is not try this command pip install pillow On Wed, Jul 24, 2019 at 9:22 AM Mukul Dharwala wrote: > thanks brother but i have tried everything > > On Jul 24, 2019 9:21 AM, "vignesh karthik" > wrote: > > Hi there, > > in settings.py > > under > > STATIC_URL =

Re: Running of index.html file

2019-07-23 Thread Mukul Dharwala
thanks brother but i have tried everything On Jul 24, 2019 9:21 AM, "vignesh karthik" wrote: Hi there, in settings.py under STATIC_URL = '/static' Add below Lines STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) Thank you On Wed, Jul 24, 2019 at 8:30 AM Mukul Dharwala

Re: Running of index.html file

2019-07-23 Thread vignesh karthik
Hi there, in settings.py under STATIC_URL = '/static' Add below Lines STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) Thank you On Wed, Jul 24, 2019 at 8:30 AM Mukul Dharwala wrote: > All files are working except this one its images are not showing as well > as whenever i am

Running of index.html file

2019-07-23 Thread Mukul Dharwala
All files are working except this one its images are not showing as well as whenever i am putting{%load %} in front of any css file or jpg file it is showing an error. plzz go through my code and help me correcting it -- You received this message because you are subscribed to the Google

Re: interoperability of django with another web server

2019-07-23 Thread Kasper Laudrup
Hi CodingManiac, On 23/07/2019 14.44, CodingManiac wrote: Other framework in python Your question is really not very precise and you it's hard for anyone to tell you "how you can do that", but you can try to keep your "non django specific logic" in separate python modules so you can at

Re: How to customize AdminWidget FilteredSelectMultiple?

2019-07-23 Thread Mei B
I figured out how to customize what I want by editing SelectFilter2.js, located in /admin/js/SelectFilter2.js My question now is, how do I get django to look at this new SelectFilter2.js instead of the original? I thought I would pop it in my_app/static/admin/js/ but that doesn't seem to be

Re: How to customize AdminWidget FilteredSelectMultiple?

2019-07-23 Thread Charlotte Wood
Can you post your code? On Mon, Jul 22, 2019, 7:20 PM Mei B wrote: > I'm trying to use the admin widget FilteredSelectMultiple, I can get it to > render on my page, but I want to customize it a bit more. > > I want to change the labels from available/chosen, change the size, and > reorder the

Re: What's the best way to find the number of database accesses being done?

2019-07-23 Thread Simon Charette
Hello Don, Django logs all database queries to the django.db.backends logger. It is not redirected to STDOUT when using the default settings.LOGGING configuration but you can enable it yourself[0]. If you wan to assert against a fixed number of queries you can use the assertNumQueries context

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Simon Charette
Hello Don, If you're on Django 2.2+ you should use bulk_update for this purpose[0] TestThing.objects.bulk_update(( TestThing(id=id, value=new_value) for id, value in new_values.items() ), ['value']) Under the hood it performs a SQL query of the form UPDATE ... SET value = (CASE WHEN

What's the best practice for securing static and media files from unauthenticated users?

2019-07-23 Thread Tal
I have a Django project, where, for the most part, users need to be logged in to see or do anything. If an unauthenticated user guesses a page name in my project, they would get redirected to the login page, with an error message, as they should. The project's static and media files on the

Re: interoperability of django with another web server

2019-07-23 Thread CodingManiac
Other framework in python On Tue, 23 Jul 2019, 11:09 am gilwell muhati, wrote: > Hello @CodingManiac, > What do you mean other frameworks, they are a zillion frameworks out > there. PHP Frameworks? Java? JavaScript? Perl? etc etc > > > > > *Regards,Gilwell Muhati | +254 710 739 116 | * >

Re: Django Application logging --

2019-07-23 Thread SNJY G
Hi Andreas, Thanks for your response. I want to clarify below points -- Above mentioned suggested code should be written in which file ? How Logging output can be published on admin console ? Thanks again -- On Tue, Jul 23, 2019 at 12:39 AM Andreas Schosser wrote: > Hi > > you can the use

What's the best way to find the number of database accesses being done?

2019-07-23 Thread Don Baldwin
I have a function that runs some database queries and updates. In the test code for that function, I'd like to check out many times the database is actually being hit. Does Django provide a way to get that information? Thanks, Don -- You received this message because you are subscribed to

What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Don Baldwin
Hi, I have a dictionary where the key is the primary key from one of my database tables, and the values are the values that I want to update with. For example, I may have the following dictionary: new_values = {1:'a', 2:'b', 3:'c'} And the following model: class TestThing(models.Model):

Re: Django Excel Import Data Help

2019-07-23 Thread Jasmine Chua
Sorry may I trouble you to please spell your sentence properly? I am having difficulty understanding what i should check for in terms of case sensitivity. I suspect that the problem lies in my functions when importing the data into my Models because certain fields are foreign keys i need to

Re: Django Excel Import Data Help

2019-07-23 Thread Jasmine Chua
Thanks for your reply. My excel column headers are the same as my model field names but i am still getting the error as seen. On Tuesday, July 23, 2019 at 10:28:09 PM UTC+8, sachinbg sachin wrote: > > If ur dumping the data from exel make prepare as per ur database table ur > exel headings

Re: Developing E - Commerce Website

2019-07-23 Thread DANIEL URBANO DE LA RUA
tanks to you mate, we are here for to make you bigger haha ;) El martes, 23 de julio de 2019, 15:40:00 (UTC+2), Lim Kai Wey escribió: > > Alright, thank you guys so much for the resources! I’ll take a look into > them! > Thank you guys so much for helping! :) > > Regards, > Kai Wey > -- You

Re: Developing E - Commerce Website

2019-07-23 Thread Lim Kai Wey
Alright, thank you guys so much for the resources! I’ll take a look into them! Thank you guys so much for helping! :) Regards, Kai Wey -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: M2M relationship not behaving as I would expect

2019-07-23 Thread Don Baldwin
FYI, I was able to get this working with a small change to the query, from: data = list(TestThing.objects.all().values('user__user_data', 'thing_data', 'user__testbridge__bridge_data')) to: data =

Re: Developing E - Commerce Website

2019-07-23 Thread gilwell muhati
Hello Lim, I followed this tutorial a while back and was able to setup an full e-commerce website within 5 days https://www.youtube.com/watch?v=z4USlooVXG0=PLLRM7ROnmA9F2vBXypzzplFjcHUaKWWP5 *Regards,Gilwell Muhati | +254 710 739 116 | * *~~“The mind is its own place and in itself can make a

Re: let the previous file as it is now i am doing another one and it is showing same problem

2019-07-23 Thread Ajeet Kumar Gupt
Thanks for the prompt response. On Tue, Jul 23, 2019 at 4:13 PM Lim Kai Wey wrote: > To Ajeet, > > I believe this tutorial may help you understand authentication > implementations. It won’t ultimately be your end user registrations but > it’s a basic start. > > Link: > >

Re: Developing E - Commerce Website

2019-07-23 Thread Tosin Ayoola
Check out django 2 by example, I'm currently working on an ecommerce site myself On Jul 23, 2019 12:34, "Lim Kai Wey" wrote: > Greetings, > > A new Django user here. I would like to ask if anyone could recommend any > guides or tips in developing the functionalities in an E-Commerce website >

Re: Developing E - Commerce Website

2019-07-23 Thread Lim Kai Wey
To Daniel, Thank you so much for your recommendation! I’ll go check it out! :) Regards, Kai Wey -- 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

Re: let the previous file as it is now i am doing another one and it is showing same problem

2019-07-23 Thread Lim Kai Wey
To Ajeet, I believe this tutorial may help you understand authentication implementations. It won’t ultimately be your end user registrations but it’s a basic start. Link: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication Regards, Kai Wey On Tue, Jul 23, 2019 at

Re: Developing E - Commerce Website

2019-07-23 Thread DANIEL URBANO DE LA RUA
https://getsaleor.com/ <_here is -- 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 view this

Re: Developing E - Commerce Website

2019-07-23 Thread DANIEL URBANO DE LA RUA
Hey take a look to Saleor eccomenrce made on python you have a great example there El martes, 23 de julio de 2019, 13:35:15 (UTC+2), Lim Kai Wey escribió: > > Greetings, > > A new Django user here. I would like to ask if anyone could recommend any > guides or tips in developing the

Re: Developing E - Commerce Website

2019-07-23 Thread DANIEL URBANO DE LA RUA
Check saleor ecommerce made on python it just easier to modify it ;) On Tue, 23 Jul 2019, 13:35 Lim Kai Wey Greetings, > > A new Django user here. I would like to ask if anyone could recommend any > guides or tips in developing the functionalities in an E-Commerce website > e.g.( Add to Cart). >

Re: let the previous file as it is now i am doing another one and it is showing same problem

2019-07-23 Thread Ajeet Kumar Gupt
Dear Team, I am very new in Django, I read tutorials of Django and python but I want to start the development process with a very small application. Like End User registration, end-user login. How to implement a little bit confused. I need a help from your side how to start and how to implement

Developing E - Commerce Website

2019-07-23 Thread Lim Kai Wey
Greetings, A new Django user here. I would like to ask if anyone could recommend any guides or tips in developing the functionalities in an E-Commerce website e.g.( Add to Cart). As well as the model setup for the products, is it better to have the all the products underneath one model OR it

this feature available in django

2019-07-23 Thread hunar techie
https://stackoverflow.com/questions/57147616/define-quantity-for-each-selected-item-in-the-same-time i asked everywhere but i didnt find a solution -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: let the previous file as it is now i am doing another one and it is showing same problem

2019-07-23 Thread gilwell muhati
Please have a look at this tutorial on how to retrieve data from models. http://www.learningaboutelectronics.com/Articles/How-to-retrieve-all-objects-of-a-database-table-in-Django.php You need to create a model in your models.py then use views.py to retrieve it. use a context in your views to