Re: Import csv file on django view

2020-07-24 Thread Jani Tiainen
Hi, I highly can recommend to use pandas to read csv. It does pretty good job to guess a lot of things without extra config. Of course it's one more extra dependency. pe 24. heinäk. 2020 klo 17.09 Ronaldo Mata kirjoitti: > Yes, I will try it. Anythin I will let you know > > El mié., 22 de

Customer specific translations

2019-11-25 Thread Jani Tiainen
e". Some "route" and some just "delivery route". Any ideas how to handle this? -- Jani Tiainen Software wizard https://blog.jani.tiainen.cc/ Always open for short term jobs or contracts to work with Django. -- You received this message because you are subscribed to

Re: Django jobs available

2019-11-18 Thread Jani Tiainen
Send your application and our recruitees will check it out. ma 18. marrask. 2019 klo 15.06 Mohammad yunus kirjoitti: > What if I am Freshers? > > On Mon, 18 Nov 2019, 1:25 pm Jani Tiainen, wrote: > >> >> If you are an experienced software developer looking for new ch

Django jobs available

2019-11-17 Thread Jani Tiainen
are looking for. We offer this full-time permanent position in our offices in Joensuu, Finland. Job starts as agreed. Send your application to *care...@keypro.fi * -- Jani Tiainen Technical Team Lead Keypro Oy -- You received this message because you are subscribed to the Google Groups

Re: Django leaflet

2019-10-30 Thread Jani Tiainen
Also I did workshop on last DjangoCon EU where I used leaflet without additional magic. You can find short docs and code at http://dceu2019.tiainen.cc su 27. lokak. 2019 klo 2.42 Perceval Maturure kirjoitti: > > Hi all > How do u wire your template and view to display maps in Django leaflet >

Re: django.contrib.gis for Windows 10

2019-10-30 Thread Jani Tiainen
Hi. First postgis should bring all necessary libs since it uses very same geospatial libs as osgeo. Very important thing is to make sure that if you have 32bit libs you use 32bit python and same with 64bits. You just can't mix libs with different bit sizes. In linux this is much easier since it

Re: Auto assigning 2 types of user roles on sign up

2019-10-23 Thread Jani Tiainen
Hi. Personally I would do it as follows: On invitation create invited user account at least with email and with member role. Make account disabled. You might also add invitation key which you can put in email and check as well. When invited user starts sign up procedure you can just fill in the

Re: CSS not working

2019-10-11 Thread Jani Tiainen
kajamydeenya\telusko\polls\static > > C:\Users\kajamydeenya\telusko\mypython\lib\site-packages\django\contrib\admin\st > > > > > *Regards,* > *Yasar Arafath K* > > On Friday, October 11, 2019 at 12:30:19 PM UTC+8, Jani Tiainen wrote: >> >> Hi. >> >> Y

Re: CSS not working

2019-10-10 Thread Jani Tiainen
Hi. You could try to diagnose issue with findstatic management command: ./manage.py findstatic -v 3 polls/style.css You should get a list of paths Django tried to look for your static file (stylesheet) and of course was it found. pe 11. lokak. 2019 klo 6.19 yasar arafath Kajamydeen

Re: University management system

2019-10-09 Thread Jani Tiainen
Hi. How realistic, given your requirements, you think you as a developer can implement all that in one week? Ok, lets break this down a bit. Requirement 1 hierarchical users. This is rather trivial to do if you don't need fancy ui but can rely on admin facilities. Requirement 2 blogging. If

Re: Why and when I should override the default AdminSite

2019-10-09 Thread Jani Tiainen
Hi. I've been working with Django about 10 years and yet I haven't need for overriding admin. Admin is great tool for CRUD while developing but I wouldn't push it too far. Specially trying to put any business logic in admin doesn't go well in the long run. And it's really easy to build proper

Re: ListView from 2 model

2019-10-08 Thread Jani Tiainen
Hi, ListView and most other generic views are designed mostly to work with single model. There are few ways to tackle your problem depending on your needs. to 3. lokak. 2019 klo 0.53 Yann Mbella kirjoitti: > hi everyone, > I got a problem in listing two models from a listview that is, a list

Re: How to generate a unique 9 digit random id for every registered user?

2019-10-04 Thread Jani Tiainen
Note that above solution doesn't guarantee unique id. As it is a problem of any pseudorandom generator. So it is possible (but unlikely) that insertion fails. pe 4. lokak. 2019 klo 18.12 Aldian Fazrihady kirjoitti: > import random > import string > > from django.db import models > > > def

Re: for loop template

2019-10-04 Thread Jani Tiainen
Counter0 only exists for variables declared within template itself for for loops. Lista isn't for loop variable and thus it's always empty. pe 4. lokak. 2019 klo 17.53 Luca Bertolotti kirjoitti: > from the view i give to the template the following variables > > selezione =

Re: compsite key

2019-10-04 Thread Jani Tiainen
Hi. Django doesn't support composite keys. pe 4. lokak. 2019 klo 14.47 narendra thapa kirjoitti: > as i was trying to make a composite key on students model . i wanna make > composite key of field enrolled year and roll no but django is not > accepting a two primary key in same model > > -- >

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread Jani Tiainen
Also you never put STATIC_ROOT to STATICFILES_DIRS. Because then you would with collectstatic command copy STATICFILES_DIRS to STATIC_ROOT... ke 2. lokak. 2019 klo 19.07 red sky kirjoitti: > My system: Windows 10 1903. Python 3.7.4, 64 bit. > > My directory structure: >

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread Jani Tiainen
Hi. It seems that you have mixed some concepts here. First you rarely need to manually serve static files in development. Django takes care of that when using runserver. STATIC_ROOT is location where static files are collected when you run collectstatic management command. And that command you

Re: MongoDB Connect with Django

2019-09-29 Thread Jani Tiainen
Hi. Personally I even would try to use any special backend that tries to map non-relational database with tool (ORM) that is meant for relational database. You can connect to mongodb just fine with plain python connector and read data from there. You don't need anything magical for it. Of

Re: Template linting

2019-09-28 Thread Jani Tiainen
Hi. It could be intetesting thing to play with for example pyparsing-library. But to my knoledge there is (not yet) such a linting tool. la 28. syysk. 2019 klo 17.00 Tobias Bengfort kirjoitti: > Hi, > > I was wondering whether there are any good options for linting HTML > templates. I have

Re: list records of another app in another app

2019-09-24 Thread Jani Tiainen
Hi. Just import models and use them? ti 24. syysk. 2019 klo 22.10 Perceval Maturure kirjoitti: > > Hi awesome django users > i want to list model records of App1 in a detail view of App2 > any ideas? > Regards > > -- > *Perceval Maturure* > > *083 303 9423* > > -- > You received this message

Re: Transaction.atomic()

2019-09-23 Thread Jani Tiainen
And TL;DR; versio. Code which is wrapped within atomic transaction will guarantee that if code breaks changes are rolled back. ma 23. syysk. 2019 klo 15.42 Aryan Patel kirjoitti: > Hi colleagues, > > I want to understand if transaction.atomic() in django guarantees that the > client is getting

Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
: > Hello > if i pass > and in the view i do this > > def exmple(request,myvar): > sort = myvar.order_by() > i get an error because myvar is a string instead i near a query set > > Luca > > Il giorno mercoledì 18 settembre 2019 15:56:19 UTC+2, Ja

Re:

2019-09-18 Thread Jani Tiainen
Hi. Technically that is impossible. Group by is used to make sql aggregate to know aggregation criteria. Let's take simple example: Let's have table with columns name, job and salary. Rows in table would be: Jani,programmer,100 Ahmmed,programmer,100 Now lets calculate average salary of

Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
Hi. to the rescue! Also it is recommended to use {% url %} tag to construct urls not to hardcode them and once were there Django convention is to end urls to slash. ke 18. syysk. 2019 klo 15.53 Luca Bertolotti kirjoitti: > Hello i need to pass a query set from template to a view: > > > > in

Re: ORM

2019-09-17 Thread Jani Tiainen
it : > >> Thanx for the information >> >> Le ven. 13 sept. 2019 à 06:24, Jani Tiainen a écrit : >> >>> Hi. >>> >>> There exists django-extensions package that has management command to >>> make UML diagram for your models. >>&

Re: Django Post request erro

2019-09-13 Thread Jani Tiainen
Hi. Could you describe exactly in both cases: What do you expect to happen? What does actually happen! Also instead of using hardcoded urls you should always use {% url %} tag to form urls in templates. pe 13. syysk. 2019 klo 16.53 Ruturaj Singare kirjoitti: > Hi Everyone I got one problem I

Re: ORM

2019-09-12 Thread Jani Tiainen
Hi. There exists django-extensions package that has management command to make UML diagram for your models. pe 13. syysk. 2019 klo 5.22 Yann Mbella kirjoitti: > Got little problem is it possible to have a plugin which mapps or > reproduce my class diagrams drawn in an IDE of UML in my models

Re: Maps API

2019-09-12 Thread Jani Tiainen
Hi. I had workshop about geotracking and Django at Djangocon eu 2019. You can find my material at http://dceu2019.tiainen.cc to 12. syysk. 2019 klo 17.33 Aniket Jain kirjoitti: > Hello guys, > Hey anyone is having idea that which API we can use for the grps tracking > system for the vechiles

Re:

2019-09-10 Thread Jani Tiainen
Please paste your errors as plain text. Images are really hard to read in mobile devices and searching image for keywords is really impossible. ti 10. syysk. 2019 klo 23.36 Duncan Jerry kirjoitti: > you should post images of the errors you are getting so that its easy for > us to figure out a

Re: Python +django

2019-09-08 Thread Jani Tiainen
Hi. You're on good track. Using Django doesn't require much but knowing Python, HTML and CSS surely helps. Django Girls do have excellent tutorial to get you kickstarted with Django. CSS can be easily handled with libs like bootstrap or material ui. What comes to programmin itself it takes a

Re: styling tables in django

2019-09-01 Thread Jani Tiainen
Hi. Templates are just a text and very common thing is to render templates as html. So there is no magic involved what comes to styling. It is just CSS which would make your tables styled. And that is beyond Django. If you want to use CSS file as included as a link in html header part there

Re: Unsynchronized sequence

2019-08-30 Thread Jani Tiainen
Hi. You really need to give more context than that. What you exactly did? What you expected to happen? What was the actual outcome? Preferably with all commands and code you used with responses you got. ke 28. elok. 2019 klo 16.49 Ezequias Rocha kirjoitti: > Hello everyone > > I am using

Re: How to find out when a fix will be released

2019-08-27 Thread Jani Tiainen
Oh yes there it is explained in depth https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions ke 28. elok. 2019 klo 8.12 Jani Tiainen kirjoitti: > It's not weird at all. Django has 8 month release cycle. Usually only bugs > that are security issues or cause

Re: How to find out when a fix will be released

2019-08-27 Thread Jani Tiainen
It's not weird at all. Django has 8 month release cycle. Usually only bugs that are security issues or causes data loss are backported to older releases. I think this procedure is documented somewhere... ke 28. elok. 2019 klo 8.06 wd kirjoitti: > It's so weird, the code is already in master 7

Re: Django real-time chat app

2019-08-27 Thread Jani Tiainen
Hi. Greatly depends on your definition of real-time... ti 27. elok. 2019 klo 8.01 Suraj Thapa FC kirjoitti: > Anyone have real-time pluggable chat system app in django. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe

Re: Database Views

2019-08-27 Thread Jani Tiainen
Hi. You really need to provide more context. Without knowing your data, tables involved in a view. Your model and query you used and query you used to verify wrong (or correct) results it is virtually impossible to help you further. ti 27. elok. 2019 klo 17.47 HULUGESH B kirjoitti: > Hi All,

Re: How to customize admin page rendering?

2019-08-25 Thread Jani Tiainen
Hi. Instead of trying that I suggest that you build your own managenent console where you can do all you want to. Admin is a great tool but it can't replace proper management tools. Mainly because admin isn't built for much of customization beyond what you can find from the docs. su 25. elok.

Re: Best DRF Cheatsheet?

2019-08-21 Thread Jani Tiainen
Hi. Wouldn't it be much better to improve DRF documentation itself rather than create yet an another documentation that you have to maintain? ke 21. elok. 2019 klo 19.58 Charles Thayer kirjoitti: > I've been using Django with DRF off and on for probably over 5 years now. > There are still

Re: Postgres along with Mongodb

2019-08-12 Thread Jani Tiainen
Hi. Yes you can. Of course since mongodb isn't relational database you get best experience by using native python api to mongodb and Django orm for postgres. ma 12. elok. 2019 klo 15.57 Suraj Thapa FC kirjoitti: > How can I use postgres along with Mongodb > Different table different db > > --

Re: Storing credentials in the DB

2019-08-12 Thread Jani Tiainen
Unfortunately storing password in db has a fundamental flaw. To be able to use to access any remote source it has to be in usable form. Wether digested or plain text form it doesn't matter since at the moment you use it to login other resource it is in plain format (whatever format that is). ma

Re: Django parameters

2019-08-12 Thread Jani Tiainen
Hi. Yes and no. Django isn't cms but web application development library written in python. So yes you can do all those things. How much work and effort it requires depends on many factors. ma 12. elok. 2019 klo 14.13 tomas mracnik kirjoitti: > Hi, we are considering a new cms system in our

Re: database migrations

2019-08-04 Thread Jani Tiainen
Hi. To me this sounds more debugging issue than migrations or database problem. Since it is most definitely your code that doesn't work right. Of course if youre building and testing features that fill thousands of entries or relatively complex data there are options. Personally I use

Re: database migrations

2019-08-03 Thread Jani Tiainen
Hi. So... what is the actual question? pe 2. elok. 2019 klo 15.40 Perceval Maturure kirjoitti: > Dear all > creating a new database as applications increase has been one of the > solutions to some of the errors i have encountered especially after adding > a django cms by hand in my development

Re:

2019-07-29 Thread Jani Tiainen
. heinäk. 2019 klo 18.22 Aldian Fazrihady kirjoitti: > Multiple file uploads already there for many years. The link I shared > above show you how to do that the Django way. > > Regards, > > Aldian Fazrihady > http://aldianfazrihady.com > > On Mon, 29 Jul 2019, 21:52 Ja

Re:

2019-07-29 Thread Jani Tiainen
Hi. TL; DR; you can't. You though can upload multiple files just fine you just need to handle them manually. Also if you plan to keep files around your models must enable that. ma 29. heinäk. 2019 klo 15.48 Suraj Thapa FC kirjoitti: > How can I create a file field which one can upload

Re: forms.Form with class in html-rendering

2019-07-28 Thread Jani Tiainen
Hi. Be aware that pushing rendering data like styles to form code has a nasty drawback. If you want to change that it is code change. And at some point it will get burden to maintain styles in code. There are few options still. Recent versions of django renders widgets using templates. Use

Re: Overriding methods in models of other developers

2019-07-27 Thread Jani Tiainen
You can do that with proxy models which allows you to override and add methods. Of course if there is a need to really modify original model it gets tricky. la 27. heinäk. 2019 klo 10.49 אורי kirjoitti: > Hi, > > I had to change the following lines because tests failed: > > class

Re: Django keeps crashing

2019-07-26 Thread Jani Tiainen
Hi. Unfortunately it is you. Withouth full source code it's hard to help. Error indicates that you may have a typo in your settings.py. If possible put up your project in github for example and join #django irc channel on freenode. You get help in no time. Also as you being beginner Django

Re: SQLite 3.8.3 or later is required (found 3.7.17).

2019-07-19 Thread Jani Tiainen
Hi. Error is simple. Python is using too old version of sqlite. There are few options to fix that depending what os your system runs on. Though sqlite is not very suitable for production so you may want to use something better like Postgres. pe 19. heinäk. 2019 klo 22.14 anchal agarwal

Re: use of migrate command and how to see the tables

2019-07-19 Thread Jani Tiainen
Hi. Migrate command applies migrations, changes to your models, into database. For example if you add a new field in your model you need to create a migration (piece of code that reflects your change) using makemigrations command. Once you have made migration(s) you need to apply them so

Re: sqlite update on CentOS 7 for latest django version

2019-07-18 Thread Jani Tiainen
Hi. I think Python has built in version so you might need to build custom version of python. Pyenv is pretty neat tool to handle custom python builds. ke 17. heinäk. 2019 klo 21.36 Tal kirjoitti: > Or is Python's sqlite built into Python, not depending on /usr/bin/sqlite3 > at all? > Would I

Re: Query questions. Please help me.

2019-07-17 Thread Jani Tiainen
Hi. You can use dictionary unpacking to kwargs. .filter(**{"name__contains": "foo", "somefield__gt": 123}) ke 17. heinäk. 2019 klo 23.04 나르엔 kirjoitti: > Hello, I am studying django. > > When I use objects.filter, I want to search various columns. > > Columns to search for are unknown and

Re: What's the best way to have app access permissions?

2019-07-16 Thread Jani Tiainen
We use django groups for that. So we give groupnames like ALLOW_SOMETHING and then in code and templates we do check if user has that group or not. ti 16. heinäk. 2019 klo 19.26 Tal kirjoitti: > I know you can have permissions on individual models that control which > users have access to them,

Re: E-Mail Client Django

2019-07-16 Thread Jani Tiainen
Hi. Err... if you don't find one code a one? ma 15. heinäk. 2019 klo 23.08 Sebastian Jung kirjoitti: > Hello, > > i want a full complete E-Mail client like https://www.mailpile.is/ but in > django. I need only from mailpile a view with template with email > directories on left side and in rest

Re: Reach the server

2019-07-16 Thread Jani Tiainen
Hi. Did you mapped 8000 port to outside of vagrant box? And did you told runserver to listen all interfaces (0.0.0.0) since by default runserver listens to localhost. In case of vagrant "localhost" interface is within vagrant box itself. ti 16. heinäk. 2019 klo 5.22 CHENXIN YANG kirjoitti: > I

Re: angular or vue js

2019-07-16 Thread Jani Tiainen
Any. Django really don't care about it. There exists also at least react and svelte too... ti 16. heinäk. 2019 klo 13.33 Pradeep Singh kirjoitti: > which framework is good with django angular or vue js please suggest > me best one > > -- > You received this message because you are

Re: ModelForm "error_css_class" not getting applied to ValidationErrors raised in model.clean()

2019-07-16 Thread Jani Tiainen
Full_clean is Django internal method which you should't touch. .clean() method validation errors go to special non-field errors and by quick look it should get correct css class. If you could provide minimal project with suspected faulty behavior (for example in github) it would be easier to see

Re: ModelForm "error_css_class" not getting applied to ValidationErrors raised in model.clean()

2019-07-16 Thread Jani Tiainen
At least you should't call super.clean_fields() in clean() method... Also how are you outputting errors in your template? ti 16. heinäk. 2019 klo 5.22 Jacob Greene kirjoitti: > Hello! Has anyone dealt with this before? It seems that my forms don't add > the CSS class to errors raised in

Re: Create a multitab home page of a blog

2019-07-16 Thread Jani Tiainen
Hi. Well most of the things you describe are not spesific to django but just how you do layout your data with HTML. And yes all can be done with django. Being sensible? That is really subjective matter. ti 16. heinäk. 2019 klo 5.22 Nicolas Huergo kirjoitti: > Hey! > > I'm pretty much new to

Re: Form validations

2019-07-11 Thread Jani Tiainen
Hi. Usually you validate user input and by using Forms or ModelForms. to 11. heinäk. 2019 klo 12.50 Irfan Khan kirjoitti: > Dear members, > I wanted to validate the form which contains the name, phone number, > address,email, etc.., > I have developed and tested it if we give any character

Re: ValueError

2019-07-10 Thread Jani Tiainen
Hi. Because indentation is broken it's hard to say exact problem location but in your view some code path doesn't return anything and thus you see error about returning None. ke 10. heinäk. 2019 klo 21.05 Desh Deepak kirjoitti: > Hi, I want to insert some data in MysqlDatabase from the

Re: Can I override __new__ in Django ModelForm?

2019-07-10 Thread Jani Tiainen
Hi. You can add fields dynamically on model __init__ method and AFAIK that's best and recommended way to do it. I'm not sure is that even in Django docs. ke 10. heinäk. 2019 klo 17.44 אורי kirjoitti: > Hi, > > I have a ModelForm with Django 1.11, and I'm moving a few fields to > another

Re: Django Login Secret key

2019-07-10 Thread Jani Tiainen
Oh you want to have false security. First this has nothing to do with Django and it's secret key. You can use any secret key in your case it would be user input. Also you can use any cryptography algorithm to secure your data in the database. And here is the problem - to make user experience

Re: Django Login Secret key

2019-07-10 Thread Jani Tiainen
Hi. What are you trying to do? In other words why do you need to replace secret key by user input at login? ke 10. heinäk. 2019 klo 8.54 Sebastian Jung kirjoitti: > Hello, > > I want in my Login Page a further field Secret Key. This Input ist > replacement dir Secret Key in settings.py. Ist

Re: E-mail sending... but.. not sending?

2019-07-09 Thread Jani Tiainen
Hi. Looks like your backend isn't right if you see message in the console. Also if using gmail you have allowed insecure apps? ti 9. heinäk. 2019 klo 17.47 grwhumphries kirjoitti: > I've got a bit of a mystery. I've got a Django Wagtail project with > Spirit as an added app. I'm trying to

Re: cicking to menu in navebar leads another subpage /subpage

2019-07-09 Thread Jani Tiainen
i use {% url %} > > > On Monday, 8 July 2019 22:26:07 UTC+5:45, Jani Tiainen wrote: >> >> Hi. >> >> There are two things wrong. >> >> First and most important is that you should always use {%url %} template >> tag to form urls to other django urls and

Re: Trademark search

2019-07-09 Thread Jani Tiainen
already capable of building similar trademark search site. ti 9. heinäk. 2019 klo 15.47 Django Dojo kirjoitti: > Are there any Django packages or api being used? > > On Tuesday, July 9, 2019, Jani Tiainen wrote: > >> Hi. >> >> Web page, database and most propably s

Re: CockroachDB & Django

2019-07-09 Thread Jani Tiainen
Hi. You should setup test environment that runs Django database tests against your backend. Preferably somewhere visible to public. That way it would be easier to start figuring out areas of improvement. ti 9. heinäk. 2019 klo 2.29 'Andy Woods' via Django users < django-users@googlegroups.com>

Re: Trademark search

2019-07-09 Thread Jani Tiainen
Hi. Web page, database and most propably some programming to make search magic happen. ti 9. heinäk. 2019 klo 13.44 Django Dojo kirjoitti: > Hello, > I’m trying to build a trademark search like: > https://www.trademarkengine.com/free-trademark-search/trademark-search. > > Can someone recommend

Re: NEWBIE

2019-07-09 Thread Jani Tiainen
And to give some perspective I have been working with Django @work last 10 years and I'm still far from mastering it. I'm pretty good with Django though. In other words it really takes a lot. Interns at work do get hang of basics in about two months but really them to get up to speed takes

Re: reg: Object of type 'ListSerializer' is not JSON serializable

2019-07-08 Thread Jani Tiainen
Hi. In your view instead of using Response(serializer) you need to use Response(serializer.data) HTH. ma 8. heinäk. 2019 klo 19.48 'Amitesh Sahay' via Django users < django-users@googlegroups.com> kirjoitti: > hello Members, > > I am working on some POC for django rest framework. Its very

Re: cicking to menu in navebar leads another subpage /subpage

2019-07-08 Thread Jani Tiainen
Hi. There are two things wrong. First and most important is that you should always use {%url %} template tag to form urls to other django urls and preferably by using named url patterns. Secondly your hardcoded urls are relative. So each time you click link it is appended to current url. If you

Re: saving inherited model overwrites base model

2019-07-05 Thread Jani Tiainen
Hi. I think you have a bit confused terms model inheritance and abstract models. Normal model inheritance in Django means that there will be implicit one to one relation to base model. Inherited model still receives all fields from parent model. On save data is just saved to correct models. To

Re: Django 2.2 Media files

2019-07-05 Thread Jani Tiainen
Hi. What you did is correct and expected. Upload_to is relative path to MEDIA_ROOT in case of normal file upload backend. There are many others like S3. Now MEDIA_URL is absolute path of web server which points to MEDIA_ROOT. In development you can use static file serving trick like you did.

Re: help

2019-07-05 Thread Jani Tiainen
Hi. Please don't hijack other people threads but start a new one. pe 5. heinäk. 2019 klo 15.55 Manjunatha Sai Uppu kirjoitti: > I am new to web development in django , i have some questions that > 1. Is it necessary to learn html,css? > No. Absolutely no. You can write plain backend code

Re: Doubt about Custom User Model

2019-07-04 Thread Jani Tiainen
Hi Models always do belong to app. All apps do have AppConfig (one or more) So when adding app (and thus models) to INSTALLED_APPS you need to point to which AppConfig you use (defined in apps.py) to 4. heinäk. 2019 klo 11.58 pastrufazio kirjoitti: > Hi! > > I've read some examples about

Re: order of loading css-files

2019-07-02 Thread Jani Tiainen
Hi. It's your browser not Django. Django just emits HTML that is parsed by your browser. ti 2. heinäk. 2019 klo 15.14 Kai Kobschätzki kirjoitti: > Hi: > > I tried to load bootstrap and an own css-file. But in which order does > django load it? > > I have tried in my base.html: > > > {% load

Re: OTP Verification

2019-07-02 Thread Jani Tiainen
Hi. I wrote short blog post how to do simple OTP. http://blog.jani.tiainen.cc/django/2019/02/19/django-otp-simple-way.html HTH. ti 2. heinäk. 2019 klo 4.33 ravikumar dingari kirjoitti: > Actually generated OTP but , Don't know how to verify, can any one help > > -- > You received this

Re: Creating pdf in python

2019-06-27 Thread Jani Tiainen
I've been also very succesful with wkhtmltopdf. to 27. kesäk. 2019 klo 18.44 Larry Martell kirjoitti: > On Thu, Jun 27, 2019 at 10:45 AM Django Dojo > wrote: > > > > Hello everyone, > > > > I have a pdf template and I need different Individuals(s) to fill out > different sections of the

Re: Creating a log for any changes in any model data i.e creation, updation and deletion??

2019-06-24 Thread Jani Tiainen
Hi. Note that there are still ways to modify data withouth signals getting fired. Nor save or delete is called. ma 24. kesäk. 2019 klo 18.54 Abhishek Tiwari kirjoitti: > That is the approach i have in mind.. Thank you.. > > On Monday, 24 June 2019 20:08:06 UTC+5:30, Brandon Rosenbloom wrote:

Re: Django background scheduled app

2019-05-20 Thread Jani Tiainen
Hi, There are also other alternatives for background processing than celery. Like django-rq or django-background-tasks. ma 20. toukok. 2019 klo 16.14 Chetan Ganji kirjoitti: > celery is what you need for this. It is very simple. Just stick to it, > find some examples on youtube for celery,

Re: How to make Django Project Mobile Compatible

2019-05-11 Thread Jani Tiainen
Hi, After all it's just HTML and CSS you need and you can make responsive layouting. One quite common CSS library is Bootstrap that allows rather easily to build layouts that works across the various sized devices. Of course you can go with any JS framework if you're planning to build single

Re: reg: Django model sequense of the fields

2019-05-09 Thread Jani Tiainen
Hi. There is no correlation between field order in your model and order in database or database tools. They though accidentally be the same. ke 8. toukok. 2019 klo 18.52 'Amitesh Sahay' via Django users < django-users@googlegroups.com> kirjoitti: > Hello Users, > > I am seeing a very strange

Re: How to Create Program to get current temperature of computer cpu?

2019-05-09 Thread Jani Tiainen
Hi. This is not actually Django issue. I bet there are several libs that can do it. ke 8. toukok. 2019 klo 17.01 Mayur Bagul kirjoitti: > Hello community, > > i searched on google bout this and what i found was psutil is no longer > having check temperature attribute. > > im not getting how

Re: Cascadind Drop Down in Django Admin Panel

2019-05-09 Thread Jani Tiainen
You could try django-select2 for example. to 9. toukok. 2019 klo 11.03 Balaji Shetty kirjoitti: > > HI > > *How can I add cascading drop down for Continent and Country in Django > Admin Panel.* > > Here I add Continent and Country. > > When i change Continent, Country should be changed

Re: Unit conversions between model field value and form field value

2019-05-08 Thread Jani Tiainen
Hi. You could create custom form field that makes conversions both ways. ke 8. toukok. 2019 klo 1.25 Tim Bell kirjoitti: > Hi, > > I have a model with an integer field storing a duration in hours, while I > want to present that to users in a form in days. (The choice of these > different units

Re: More controls on createsuperuser

2019-04-30 Thread Jani Tiainen
I've have to agree that any attempt to limit superuser creation through manage.py is wrong solution to wrong problem. Even it's possible to attempt it it is as easy to circumvent. So do not give an access to manage.py to users that are not supposed to. Problem solved for good. ma 29. huhtik.

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-28 Thread Jani Tiainen
. On Sun, Apr 28, 2019 at 12:59 PM Jani Tiainen wrote: > Hi. > > Django 2.2 supports Oracle 12.1+. Oracle 11g support was dropped with > Django 2.0. If you want to use Oracle 11g (which is out of support anyway > from Oracle) you either need to downgrade to Django 1.11 and cx_Oracle 6.4

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-28 Thread Jani Tiainen
Hi. Django 2.2 supports Oracle 12.1+. Oracle 11g support was dropped with Django 2.0. If you want to use Oracle 11g (which is out of support anyway from Oracle) you either need to downgrade to Django 1.11 and cx_Oracle 6.4.1 I really suggest you to update at least latest Oracle 12.2 which is

Re: GraphQL and Django integration

2019-04-28 Thread Jani Tiainen
l.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen Software wizard https://blog.jani.tiainen.cc/ Always open for short term jobs or contracts to work with Django. -- You received this message because you are subscribe

Re: testing API

2019-04-22 Thread Jani Tiainen
/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/5596723f-0358-41b5-9b0f-cf0f9dc84057%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/5596723f-0358-41b5-9b0f-cf0f9dc84057%40googlegroups.com?utm_medium=emai

Re: Storing HTML in DB using DJANGO

2019-04-21 Thread Jani Tiainen
msgid/django-users/f301b675-6587-434e-b25d-87de9d9fef10%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/f301b675-6587-434e-b25d-87de9d9fef10%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiai

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Jani Tiainen
odels.BooleanField(default=False,required=False) >> >> On Sun, 21 Apr 2019 at 17:23, Sipum Mishra wrote: >> >>> Hi Jani, >>> form.errors gives error as - >>> >>> itemThis field is >>> required.< >>> /li> >>> >

Re: Django - always getting False in form.is_valid()

2019-04-21 Thread Jani Tiainen
scussion on the web visit > https://groups.google.com/d/msgid/django-users/4ca5e82d-f34b-4ab4-8f82-5be0dcdebecc%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/4ca5e82d-f34b-4ab4-8f82-5be0dcdebecc%40googlegroups.com?utm_medium=email_source=footer> > . > For more o

Re: Advanced permissions and role creation

2019-04-21 Thread Jani Tiainen
roups.google.com/d/msgid/django-users/CAA%3Diw_9BrOEh4Ss3X0g_EnaFyp1XTXij5DoZvva_XxwKVzXsGQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAA%3Diw_9BrOEh4Ss3X0g_EnaFyp1XTXij5DoZvva_XxwKVzXsGQ%40mail.gmail.com?utm_medium=email_source=footer> > . > For more options, vi

Re: How to provide function calling event for button in django html templates ?

2019-04-20 Thread Jani Tiainen
groups.google.com/d/msgid/django-users/0fd23be8-b2d7-437e-b3e7-05c1f5bcdf4e%40googlegroups.com?utm_medium=email_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Jani Tiainen Software wizard https://blog.jani.tiainen.cc/ Always open for short term

Re: ReportLab or Xhtml2pdf Please can any one guide me to convert the rendered in html to pdf

2019-04-19 Thread Jani Tiainen
Hi. I've had pretty good success with wkthtmltopdf. pe 19. huhtik. 2019 klo 21.11 Irfan Khan kirjoitti: > hi, > i stucked in converting the pdf file from html > can an one suggest me even any other possibility instead of using python > library > > -- > You received this message because you

Re: 'WSGIRequest' object has no attribute 'Files'

2019-04-16 Thread Jani Tiainen
Hi. It is .FILES all in capital. Not just first letter. ti 16. huhtik. 2019 klo 10.05 Soumen Khatua kirjoitti: > Hi Folks, > I'm getting this error 'WSGIRequest' object has no attribute 'Files' and > i didn't get proper solution in google also. I alredaty took >

Re: How this Line of code works

2019-04-15 Thread Jani Tiainen
Hi. get_object_or_404 works so that first argument is the model class you want to query. Rest of the parameters are filters that mus return a single object. You can find this information from the Django docs as well. ma 15. huhtik. 2019 klo 7.23 Mayur Bagul kirjoitti: > how passing Question

Re: How to deploy migrations to production

2019-04-02 Thread Jani Tiainen
Hi. You should deliver migrations as part of your product and run them on production. Just like you do with collectstatic command you run migrate command. Eventually you will have data migrations and those you can't recreate on production. Also if you recreate migrations on production again

  1   2   3   4   5   6   7   8   >