Re: Syncing two django applications via cURL

2008-11-13 Thread Ryan Nowakowski
You could create a view that accepts a post that includes the following: * admin username (for auth) * admin password (for auth) * username * user password * other attrs... Then from your admin hooks, you can do an http post to the other sites using httplib[1] keeping stuff in sync. 1.

Re: FastCGI and Django as a continuously running server

2008-11-13 Thread Ryan Nowakowski
On Wed, Nov 05, 2008 at 11:21:14AM -0800, russellneufeld wrote: > The one thing left that I'd like to do is set up Django to run > continuously, even when there are no http requests. My application > runs a bunch of periodic background tasks in addition to serving up > web content, and it seems

SQL modulus using QuerySet API

2010-01-12 Thread Ryan Nowakowski
I have a model that has an IntegerField. I'd like to filter only the even integers. sqlite has a modulus operator so I can do: select * from mytable where my_int = my_int % 2 However, I'd like to use the QuerySet API to do this instead of resorting to SQL. Any ideas or hints? Thanks, Ryan

Re: SQL modulus using QuerySet API

2010-01-12 Thread Ryan Nowakowski
On Tue, Jan 12, 2010 at 01:40:50PM -0800, Daniel Roseman wrote: > On Jan 12, 9:29 pm, Ryan Nowakowski wrote: > > I have a model that has an IntegerField.  I'd like to filter only the > > even integers.  sqlite has a modulus operator so I can do: > > > >   se

Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
Hey Folks, I'm using trunk. When I run this using python (without manage.py)... card = Card(serial='0749FT266F') ...I get this error: Traceback (most recent call last): File "./control.py", line 68, in card = Card(serial='0749FT266F') File "/usr/lib/python2.5/site-packages/django/db/

Re: [SOLVED] Error when I run db commands without manage.py

2008-07-10 Thread Ryan Nowakowski
On Thu, Jul 10, 2008 at 04:07:47PM -0500, Ryan Nowakowski wrote: > > Hey Folks, > > I'm using trunk. When I run this using python (without manage.py)... > > card = Card(serial='0749FT266F') > > ...I get this error: > > Traceback (most recent cal

Re: Chained filters on Country and City Fields

2021-10-15 Thread Ryan Nowakowski
I assume you're using Django smart selects since you seem to be using chained foreign key. Here's the documentation on how to get this to work inside your own templates: https://django-smart-selects.readthedocs.io/en/latest/usage.html#usage-in-templates On October 11, 2021 8:36:21 AM CDT, marya

Re: Declarative mechanism for Django model rows

2021-12-09 Thread Ryan Nowakowski
Check out fixtures: https://docs.djangoproject.com/en/3.2/howto/initial-data/ On December 8, 2021 1:25:45 PM CST, Alex Dehnert wrote: >With some frequency, I end up with models who contents are approximately >constant. Are there good ways of handling this? > >For example, I might have a set of

Re: django-oscar customisation

2021-12-09 Thread Ryan Nowakowski
Try running the sandbox application: https://django-oscar.readthedocs.io/en/stable/internals/sandbox.html Then you can poke around that sandbox code and see how they did things. On November 22, 2021 2:23:28 AM CST, "Hervé Edorh" wrote: >Hi, >I am new to django-oscar and i try to understand t

Re: Salary Generate

2022-02-25 Thread Ryan Nowakowski
On Tue, Feb 15, 2022 at 06:32:34AM -0800, Feroz Ahmed wrote: > i am stuck at point to generate salaries for upcoming month, > as i already have last month January data as fields(month, name , gross > sal, tax deduction, net sal) > and it has records of 35 (employees) > in form template i have plac

Re: How to validate xl data

2022-02-25 Thread Ryan Nowakowski
On Mon, Feb 14, 2022 at 12:04:13PM +0530, Prashanth Patelc wrote: > i am working on xl sheets , when im uploading the xl sheet it is storing > into the models but i need before storing into the models validate the data > > eg: > username : ,must be str not int > reference id : ,must be int not str

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-25 Thread Ryan Nowakowski
Steven, are you using ModelFormSet? If so, Is it the initial query that's slow? The form rendering? Or is it the POST back to the server that's slow? You can use django-debug-toolbar[1] to profile your page and get these metrics. Once you figure out what part is slowest, then you can optimize.

Re: How to create dynamic models in django??

2022-03-09 Thread Ryan Nowakowski
On Sun, Feb 27, 2022 at 09:10:05AM +0530, Prashanth Patelc wrote: > How to create dynamic models in django rest framework? > Is there any chance to create dynamic models with APIs > > Any examples please send me thanks in advance.. > > 1) Requirement is need create table name and fields in fronte

Re: Filtering User Data/Records

2022-04-15 Thread Ryan Nowakowski
On Thu, Apr 07, 2022 at 01:08:19PM +0300, tech george wrote: > I am trying to filter my medicine stock data so that Pharmacist 1 can only > view their records but not Pharmacist 's 2 records. > > So far nothing is filtered and all the pharmacists can see all the > available records, Please advise

Re: Using Multiple databases

2022-04-15 Thread Ryan Nowakowski
On Wed, Apr 06, 2022 at 08:59:09AM -0700, Vasanth Mohan wrote: > I'm building a PoC for a multi-tenant app where I'm trying to use the same > schema across multiple databases with Django instance. I've got a couple of > questions and I'd be happy to have some input > > 1. Is there a way to defin

Re: I need a documentation in Thai language

2022-04-18 Thread Ryan Nowakowski
Maybe try Google translate? https://docs-djangoproject-com.translate.goog/en/4.0/?_x_tr_sl=auto&_x_tr_tl=th&_x_tr_hl=en&_x_tr_pto=wapp On April 9, 2022 1:08:34 PM CDT, frame fF wrote: > I'm not good at English in the future. documentation Thai language? > >-- >You received this message because

Re: Class based views with forms

2022-04-28 Thread Ryan Nowakowski
You're right, it's not very clear how to have a single class-based view handle both displaying details and submitting a form.  This is a fantastic site that shows how each class based view is set up inheritance-wise: https://ccbv.co.uk/ Take a look the ancestors for DetailView: https://ccbv.c

Re: Django SMS project

2022-05-23 Thread Ryan Nowakowski
On Sun, May 22, 2022 at 09:08:27AM +0100, Tanni Seriki wrote: > Hi guys I have a project of django to send SMS to mobile number, > Please guys I really need your helps I agree with the other replies that your post is a little vague. That being said, in general when I want to send txts from Django,

Re: Allocating items to users

2022-05-23 Thread Ryan Nowakowski
On Fri, May 13, 2022 at 09:27:48AM -0700, 'dtdave' via Django users wrote: > I have the following code: > from django.conf import settings > from django.db import models > > class AccountManager(models.Model): > account_manager = models.ForeignKey( > settings.AUTH_USER_MODEL, on_delete

Re: Auto Template Update

2022-05-31 Thread Ryan Nowakowski
There's a couple of ways to update the UI without the user doing anything. First, you can poll the server at a regular interval using JavaScript. Second, you can use a websocket to push updates from the server to the client. On May 30, 2022 6:28:40 AM CDT, Dev femibadmus wrote: >fine! we can su

Re: Deploy Tailwind Template with Django

2022-06-01 Thread Ryan Nowakowski
Drop the HTML into your templates directory. Then put all the static assets ( CSS, js ) in your static directory. Change all the references to the static assets in your HTML to the new location and your static directory by using the staticfiles template tag. On May 31, 2022 6:52:12 PM CDT, Ry

Re: ComboBox

2022-06-04 Thread Ryan Nowakowski
The HTML element you probably want is a datalist[1]. There's no built-in Django support for datalist[2] so you'll probably need to create a custom widget. [1] https://stackoverflow.com/a/14614750 [2] https://code.djangoproject.com/ticket/32125 On May 31, 2022 11:52:31 AM CDT, Phil Parkin wrote:

Re: How to hash fields and detect changes in a record

2022-06-10 Thread Ryan Nowakowski
On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote: > The use case is auto-deletion of out-of-date records if they have not > changed. > > That might sound weird but it is the solution I have come to for a > particular problem. My software analyses chemical properties and writes note >

Re: How to hash fields and detect changes in a record

2022-06-12 Thread Ryan Nowakowski
On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote: > On 10/06/2022 11:24 pm, Ryan Nowakowski wrote: > > On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote: > > > I think the solution might be to hash note.title and note.note into a new > > > fi

Re: Using a lazy value in a queryset filter?

2022-06-12 Thread Ryan Nowakowski
On Sun, Jun 12, 2022 at 11:46:44AM -0700, Sylvain wrote: > Hello, > > I’m trying to use the current language of the user in a queryset, but the > value gets resolved outside of the request-response cycle. I thought this > could work since querysets are lazy, but I guess that doesn’t make the >

Re: How to hash fields and detect changes in a record

2022-06-14 Thread Ryan Nowakowski
On 6/12/22 11:40 PM, Mike Dewhirst wrote: Original message From: Ryan Nowakowski Date: 13/6/22 07:09 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: How to hash fields and detect changes in a record On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote

Re: I can't use accented letters in my model

2022-06-14 Thread Ryan Nowakowski
This is a good primer on bytes vs strings: https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ On June 14, 2022 2:43:54 AM CDT, Antonis Christofides wrote: >Exactly. The important t

Re: How to hash fields and detect changes in a record

2022-06-15 Thread Ryan Nowakowski
On June 14, 2022 10:29:40 PM CDT, Mike Dewhirst wrote: >On 14/06/2022 11:20 pm, Ryan Nowakowski wrote: >> >> Summing the ordinal of the characters won't catch transposition: >> >> >>> chars = 'ab' >> >>> sum([ord(c) for c

Re: Can't login with Username

2022-06-16 Thread Ryan Nowakowski
You could use manage.py shell to set the email address of your super user. On June 13, 2022 12:22:30 AM CDT, Sudip Khokhar wrote: >Hi All, > >I am practicing Django since 3 months and recently I encountered an issue >with my practice project as I made a super user and didn't added email to >it

Re: How to achieve bulk soft delete in django?

2022-06-16 Thread Ryan Nowakowski
Add a soft delete method to a custom QuerySet, then use that as a custom Manager for your model. https://docs.djangoproject.com/en/4.0/topics/db/managers/#creating-a-manager-with-queryset-methods On June 16, 2022 5:13:29 AM CDT, Sencer Hamarat wrote: >Hi, > >The models delete methods overridden

Re: I can't use shared server's Ip Address for run Django

2022-06-19 Thread Ryan Nowakowski
Please copy and paste that section of your settings.py and the full error including any traceback. On June 16, 2022 11:54:44 PM CDT, saranphat roungkitrakran wrote: >I have to put my project to share sever for others can use it . I try to >change allow_host become shared server's Ip Address ,b

Re: Django could not parse the remainder

2022-06-23 Thread Ryan Nowakowski
https://stackoverflow.com/questions/8252387/how-do-i-access-dictionary-keys-that-contain-hyphens-from-within-a-django-templa On Mon, Jun 20, 2022 at 07:52:46AM -0700, Koushik Romel wrote: > When trying to get a value from restapi in for loop to display it takes > hyphen(-) as minus(-). And there

Re: Need some help

2022-06-26 Thread Ryan Nowakowski
If you want the initial input field value to change dynamically when the select field option changes, there's a bunch of different ways to do this. My current favorite is htmx https://htmx.org/ - Ryan On June 26, 2022 5:10:19 AM CDT, Rohit Lohar wrote: >Hi there, >I am currently making a f

Re: ?? question ,its urgent

2022-06-26 Thread Ryan Nowakowski
An alternative to storing all values in a single model field is to use EAV: https://en.m.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model On June 20, 2022 1:46:42 AM CDT, Abhinandan K wrote: >how to store the data in django databse table if user append fields >according to their

Re: Turn Django Web App to Mobile App

2022-06-28 Thread Ryan Nowakowski
I've used Cordova before https://cordova.apache.org/ On June 28, 2022 3:26:04 PM CDT, Lightning Bit wrote: >Hello all, > >Where should one start to convert a Django Web App into a Mobile App for >the Play Store and Apple Store? Appreciate the help! > >-- >You received this message because yo

Re: Need some help

2022-06-28 Thread Ryan Nowakowski
Yup On June 26, 2022 8:11:01 PM CDT, Rohit Lohar wrote: >Can I make a form with the help of htmx such that the whole form has a >small container is dynamic and else whole part is static? > >On Mon, Jun 27, 2022, 4:07 AM Ryan Nowakowski wrote: > >> If you want the initial

Re: How to ignoring columns on model save

2022-06-28 Thread Ryan Nowakowski
On June 27, 2022 4:36:49 AM CDT, "ro...@tonic-solutions.com" wrote: >I know I could set `something like `instance.save(update_fields=[field for >field in instance._meta.fields if field.name != "_search")` but it would >need to be set on every save for that model throughout the application,

Re: How to roll back related objects if any error happened.

2022-07-04 Thread Ryan Nowakowski
You can use transaction.atomic: https://docs.djangoproject.com/en/4.0/topics/db/transactions/#controlling-transactions-explicitly On July 4, 2022 7:16:41 AM EDT, Sencer Hamarat wrote: >Hi, > >Say I have a parent and a child model. > >And also there is a view which is using DRF serializers to save

Re: Best digital ocean plan for a production server

2022-07-10 Thread Ryan Nowakowski
Ram, It depends. How many http transactions per second are you expecting? What database are you using? Based on your estimated http TPS, how many database queries per second are you expecting? What percentange of those database queries are read vs write? - Ryan N On Sat, Jul 09, 2022 at 09:2

Re: External Authentication with username in header

2022-07-18 Thread Ryan Nowakowski
Middleware is how Django does it. https://docs.djangoproject.com/en/4.0/ref/middleware/#module-django.contrib.auth.middleware On July 15, 2022 4:19:10 PM CDT, Mark Glass wrote: >I would like to change the link that opens a Django app. Currently the app >is launched with GET http://localhost:800

Re: Help to implement join query in django orm

2022-07-23 Thread Ryan Nowakowski
On Fri, Jul 22, 2022 at 12:16:14PM +0530, Avi shah wrote: > I have two tables > Tbl 1 > & > Tbl 2 > > I need to connect the two tables using a join If these tables were created outside of Django, in other words, not using manage.py migrate, you can use Django's legacy database support to auto gen

Re: Search option in website

2022-07-23 Thread Ryan Nowakowski
You mentioned you're not using models. Where are you storing the data you want to search? On July 23, 2022 8:42:40 PM CDT, Mahendra wrote: >I am not using models using only URLs is any ways to go like using Ajax or >JavaScript language please suggest me? > >On Sat, 23 Jul 2022, 22:11 Lakshyaraj

Re: Bug Request!

2022-07-25 Thread Ryan Nowakowski
You'll definitely want to include the actual exceptions and warnings that are occurring in your bug report. On July 25, 2022 9:05:53 AM CDT, Ken Booo wrote: >Here, I caught a one bug on Django-->4.0.6 >There is no argumented support and base_dir is having exemptions causing >warnings![image: Wha

Re: Google Authentication code

2022-07-25 Thread Ryan Nowakowski
Your question is a little unclear but I'm assuming that you are trying to add Google authentication to your Django project. I've used: https://python-social-auth.readthedocs.io/en/latest/ ...with good results in the past. I've also heard good things about: https://django-allauth.readthedocs.io/

Re: ForeignKey Reverse Relation Fail

2022-07-31 Thread Ryan Nowakowski
Since this is a question about your models, please post your models.py. On 7/27/22 5:18 AM, Malik Rumi wrote: I have a model with a recursive foreign key to 'self'. This is intended to model a parent child relation among instances. The forward relation, on a field called 'childof', works as exp

Re: Generating Calendar files for iPhone and Android with Pthon3/django

2022-08-02 Thread Ryan Nowakowski
The standard is called iCal. There are a few different python libraries to choose from. On August 1, 2022 2:51:34 PM CDT, "lone...@gmail.com" wrote: >Hello all, > > I want to generate calendar files for both Android and iPhone. I do >not want to connect to the Google or Apple APIs to do t

Re: data model question

2022-08-17 Thread Ryan Nowakowski
How much data are you expecting from each data source? The volume of data will partially determine your solution. On August 17, 2022 7:13:14 AM CDT, yaron amir wrote: >we are developing a control system that looks at data from multiple sources. >some of the data is extracted from AWS, some from

Re: remove user from a specific group in django

2022-08-17 Thread Ryan Nowakowski
usuario isn't a username, it's a QuerySet so I don't think: User.objects.get(username=usuario) ... will work. Please post the specific error you're getting including any traceback. On August 16, 2022 3:30:46 PM CDT, "José Ángel Encinas" wrote: >hi guys, im trying to remove user from a specifi

Re: DeleteView Class

2022-08-21 Thread Ryan Nowakowski
It looks like you can override the delete method to get rid of the redirect behavior: http://ccbv.co.uk/projects/Django/4.0/django.views.generic.edit/DeleteView/#delete On August 20, 2022 2:39:46 AM CDT, Hussein Ahmad wrote: >hi.. i dont want my delete button to redirect to a success url,how c

Re: converting CURL command

2022-08-21 Thread Ryan Nowakowski
In the past I've used subprocess.run to shell out and run curl. Those were weird circumstances though. Typically I use the requests library instead. On August 21, 2022 2:27:02 PM PDT, "lone...@gmail.com" wrote: >Hello all, > > I am interested in converting the CURL command of: > >curl 'https:

Re: One model field map to two database columns

2022-08-23 Thread Ryan Nowakowski
On Mon, Aug 22, 2022 at 05:56:00AM -0700, Dann Luciano wrote: > It is possible to map one field in a Model to two or more database columns? > For example: > > class User(models.Model): > encrypted_hash_email = EncryptedHash() > > then in database we have > > encrypted_email and hash_email c

Re: I want to fetch the value of radio field for updation but it only doesn't fetch even i use condition and value does comes but doesn't checked

2022-08-23 Thread Ryan Nowakowski
On Mon, Aug 22, 2022 at 12:26:40PM +0530, Abhinandan K wrote: > checked{% endif %} >Male > checked{% endif %}>Female > Do you need quotes around Male/Female like this? {% if val_gen == 'Male' %} -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: How to Manage User & Create a Model

2022-08-25 Thread Ryan Nowakowski
On Wed, Aug 24, 2022 at 12:48:26AM -0700, Aakash Bhaikatti wrote: > As a User > >- I can signup either as LIBRARIAN and MEMBER using username and password >- I can login using username/password and get JWT access token > > As a Librarian > >- I can add, update, and remove Books from t

Re: Why do we need Django rest framework when our conventional django do what we want?

2022-08-25 Thread Ryan Nowakowski
On Sun, Jul 31, 2022 at 12:55:46AM -0700, Joseph Bashorun wrote: > I am stuck in a loop of confusion. I am trying to build an ecommerce > website and make it production ready. Do i need to build an API for it? No https://twitter.com/htmx_org/status/1561808410856898561 -- You received this mes

Re: Chat app using django

2022-08-25 Thread Ryan Nowakowski
On Wed, Jul 20, 2022 at 06:11:08AM +0530, Lakshyaraj Dash wrote: > I'm having a discussion website in django with some sort of user > authentication and I want to inject chat app with rooms made by the users > themselves. I don't want any js framework in the frontend. Just tell me how > to make thi

Re: How to use same Models for all apps?

2022-08-27 Thread Ryan Nowakowski
You can use a model from one app in other apps. Simply import it in the apps where you need it. On August 27, 2022 5:43:40 PM CDT, "Javier L. Camacaro" wrote: >Do i need to repeat the models for each app?, Can I use same model for all >the apps in my project? > > >I'm a new a DJango programme

Re: What Programming Language should i learn

2022-08-30 Thread Ryan Nowakowski
On Tue, Aug 30, 2022 at 03:35:26PM +0100, fawemimo olawale wrote: > Which of these programming language should i learn > > Please I need counselling on this two language though i have prior > knowledge on Python Web Framework (Django) as a beginner's but i want > Backend Language > > JAVA or ASP

Re: Negative Stock Prevention

2022-08-30 Thread Ryan Nowakowski
On Mon, Aug 29, 2022 at 05:18:39PM +0300, tech george wrote: > Please help crack the below code, I want to prevent negative stock, and if > the stock is == 0, deduct it from reorder_level instead. > Currently, the stock goes negative. > > models.py > > class Stock(models.Model): > quantity =

Re: Negative Stock Prevention

2022-08-31 Thread Ryan Nowakowski
ter than or equal to qu rather than 0. >> Try changing `if quantity > 0` to `if instance.quantity >= qu` >> >> >> On Tuesday, August 30, 2022 at 3:44:51 PM UTC+1 Ryan Nowakowski wrote: >> >>> On Mon, Aug 29, 2022 at 05:18:39PM +0300, tech george wrote: >&

Re: Performance regression when moving from 3.1 to 3.2 (same with 4)

2022-09-01 Thread Ryan Nowakowski
Can you dump the generated sql from both Django versions? https://docs.djangoproject.com/en/4.1/faq/models/#how-can-i-see-the-raw-sql-queries-django-is-running On September 1, 2022 8:58:08 AM CDT, Marc Parizeau wrote: >Hi, > >I am seing a sharp increase in execution time for some of my queries w

Re: Negative Stock Prevention

2022-09-01 Thread Ryan Nowakowski
: CHECK constraint failed: quantity > > > >On Thu, Sep 1, 2022 at 3:45 AM Ryan Nowakowski wrote: > >> I don't see any error. Did you forget to post it? >> >> On August 31, 2022 5:57:32 AM CDT, tech george >> wrote: >>> >>> Hello, >>&g

Re: Migrate to mongodb is failing

2022-09-12 Thread Ryan Nowakowski
On September 12, 2022 7:38:21 AM EST, "Fábio Barboza de Freitas" wrote: >I'm trying to migrate the django tables to mongo, but it is the error I get: > >Applying contenttypes.0002_remove_content_type_name...This version of >djongo does not support "DROP CASCADE" fully. Visit >https://nesdis.

Re: Hashing user emails

2022-09-15 Thread Ryan Nowakowski
I'm not sure a hash will meet your needs. What kinds of things are you trying to secure against? Examples: 1. I want to make sure that if the data in my database is stolen that the email addresses won't be able to be read. 2. I want to obscure the sender and receiver email addresses so that the

Re: Avoiding code repetition in views

2012-06-28 Thread Ryan Nowakowski
Or a custom template context processor that adds gigs to every request context. On Thu, Jun 28, 2012 at 10:40:30PM -0400, J. Cliff Dyer wrote: > It looks like what you want to do is create a templatetag. Then you can > just include a snippet like: {% gig_schedule %} in your template. The > docum

Re: Implementing a monitoring system with django.

2012-12-16 Thread Ryan Nowakowski
Checkout Graphite[1]. It seems like it would handle your graphing requirement. 1. http://graphite.wikidot.com/start On Mon, Dec 10, 2012 at 08:41:14PM +0100, Marc Aymerich wrote: > Hi, > I'm considering to implement a simple monitorization system that > basically gathers some data from a set of

Re: New at programming.

2013-01-07 Thread Ryan Nowakowski
On Mon, Jan 07, 2013 at 11:11:08AM -0800, Bugra Bircan wrote: > Hi everybody. > > I am new at Django and Pyhton. I just installed them and tried to do > whatever tutorial says me. > > > Actually I am also new at programming too, maybe becasuse of that I stuck > at " https://docs.djangoproject

Re: Questions about vim

2013-02-12 Thread Ryan Nowakowski
On Tue, Feb 12, 2013 at 11:22:54AM +, Yussi wrote: > Hi, > I was wondering if there are any vim users here who managed to get a > productive working environment for django here. > > I looked at the manuals, and set myself up with tags, omni complete, > and syntax error check, but it's far from

Re: Django project - Allow users to write a custom function and store in DB

2013-02-15 Thread Ryan Nowakowski
Robin, You could store that code as a string in the database. Then to run it you could execute it asynchronously using something like django-celery. Have celery fork off a separate python process for each instance of code execution. By running code asynchronously, badly behaved code(loop forever

Re: Bootstrap does not format my templates..

2013-02-15 Thread Ryan Nowakowski
On Thu, Feb 14, 2013 at 06:41:24PM -0800, galva...@hotmail.com wrote: > Hi Guys > > I am learning Django and trying to use Bootstrap, I already download > bootstrap and put it under 'D:\django14\projects\nomina\nom_mex\static', I > have Django 1.4 and use the developer server "runserver". Accord

Re: i need help

2013-02-17 Thread Ryan Nowakowski
On Fri, Feb 15, 2013 at 04:17:30PM -0800, wassim bchini wrote: > hello ; > i have a Project and i'm beginner on Django ; my project is to build web > application to administrate FTP server , i have the program > of administration on python (engine) and i need some information how to > render the

Re: Django upload file for mongodb with GridFS

2013-05-08 Thread Ryan Nowakowski
On Tue, May 07, 2013 at 08:38:57AM -0700, Hélio Miranda wrote: > Hi > I am making an application in Django with mongodb. > And I needed an upload of files that I want to use mongodb's GridFS. > > I am using mongoengine between Django and mongo. > > Has anyone done something like this? > > I am n

Re: Retrieving images from GridFS using django-tastypie-mongoengine

2013-05-08 Thread Ryan Nowakowski
On Wed, May 08, 2013 at 04:16:33AM -0700, Hélio Miranda wrote: > I have a project in Django, and I'm using mongoengine to save images into a > Mongo database using GridFS. > > All ok so far, but the problem is... when trying to retrieve the images via > http request, with a REST API made with dj

Re: Retrieving images from GridFS using django-tastypie-mongoengine

2013-05-15 Thread Ryan Nowakowski
On Thu, May 09, 2013 at 01:50:18AM -0700, Hélio Miranda wrote: > No, I'm not using GridFSStorage. > > I was just using mongoengine, with FileField field. > > To get the image have to use GridFSStorage? > How to use it? > GridFSStorage[1] is a Django storage backend[2]. You can override the def

Re: URL shorteners

2013-07-02 Thread Ryan Nowakowski
On Mon, Jul 01, 2013 at 02:20:56PM -0600, Larry Martell wrote: > On Mon, Jul 1, 2013 at 2:18 PM, Amirouche Boubekki > wrote: > > Héllo, > > > > Are you looking for an API for a shorturl service or a standalone app to > > make a short url service ? > > I was looking for a django package that I cou

Re: post messages to facebook wall

2011-01-16 Thread Ryan Nowakowski
Truong, Have you downloaded the facebook SDK[1] yet? - Ryan 1. https://github.com/facebook/python-sdk/ On Mon, Jan 10, 2011 at 09:10:14AM -0800, trương thế linh wrote: > Hi every body, > I'm a newbie to django. > please suggest me an app to intergrate with django to do allow me to > post messag

Re: Social Auth

2011-04-10 Thread Ryan Nowakowski
On Tue, Mar 29, 2011 at 09:56:15AM -0700, bish029 wrote: > how to get id or key required for social oath from facebook and use it > to test my development while i am still developing the site but not > yet launched it Create a test facebook app and use that app ID for development. -- You re

Re: Deploying Pinax to bluehost

2011-04-10 Thread Ryan Nowakowski
On Sun, Mar 27, 2011 at 10:27:54AM -0700, Antik wrote: > I created a Pinax website on localhost and I have been trying to > deploy it to my hosting server at bluehost.com, but I am really lost > as to how this works. COuld anyone shed light on the process? Thanks! I've deployed Pinax on bluehost b

Re: High availability deployments

2011-04-10 Thread Ryan Nowakowski
On Wed, Mar 23, 2011 at 11:29:00PM -0700, Shamail Tayyab wrote: >We have a setup in which we can't afford downtime (even while > deployment). > > Our setup is based on lighttpd + django (on fcgi via flup). What my > problem is, when we restart django, the site goes down for about a > couple of

Re: returning a zip file for download

2018-02-20 Thread Ryan Nowakowski
To set the download filename, you'll need to set the response Content-Disposition header[1] in your view: response['Content-Disposition'] = 'attachment; filename="somefilename.zip"' [1] https://docs.djangoproject.com/en/2.0/howto/outputting-pdf/#write-your-view On Tue, Feb 20, 2018 at 12:19:

Re: Initializing DateTimeField in django forms.

2018-02-20 Thread Ryan Nowakowski
You could make the date field "disabled": https://docs.djangoproject.com/en/2.0/ref/forms/fields/#disabled On Mon, Feb 19, 2018 at 08:37:40AM -0800, prince gosavi wrote: > That did the job.But I would like to get rid of the 'Field' type view that > surrounds the date. As I only want to display th

Re: Industrial Analytics

2018-02-25 Thread Ryan Nowakowski
I've written an email marketing analytics app in Django that I believe will scale. I haven't released anywhere yet though. You might search the web for "write heavy Django" since most analytics is write heavy. On February 25, 2018 9:12:24 AM CST, Raj wrote: >Dear All, > >Can we use Django for

Re: Creating models from json url feed

2018-05-12 Thread Ryan Nowakowski
On May 10, 2018 7:40:47 AM CDT, Matt Snelgar wrote: > > >I am making a django app to browse available products at different >markets. >I am getting data for my models from a JSON url feed, > >I am not sure on the best approach to turn this data into models as the > >feed for a single market ca

Re: Creating models from json url feed

2018-05-12 Thread Ryan Nowakowski
t; > On Sun, May 13, 2018 at 1:51 AM, Ryan Nowakowski > wrote: > > > > > > > On May 10, 2018 7:40:47 AM CDT, Matt Snelgar wrote: > > > > > > > > >I am making a django app to browse available products at different > > >markets. > &g

Re: Django 2.0 MongoDB

2018-05-17 Thread Ryan Nowakowski
Django is typically used with a SQL database. There's a fork of Django called non-rel that works with mongo but it's not actively developed any longer. Instead you can access mongo from a Django view via the standard mongo python library but you won't be able to use Django's models or admin. Tho

Re: Error Djongo MongoDB

2018-05-17 Thread Ryan Nowakowski
Is your mongo host (IP) and port set correctly? On May 17, 2018 4:09:17 PM CDT, Kadir Guloglu wrote: >Hi > >I am try to connect MongoDB and I am getting an exception > >*Thanks for help* > >*CMD* > >*c:\Proje\otomabakv2\otomabak\otomabak>python manage.py makemigrations* >*Traceback (most recent c

Re: How to retrieve existing data of mongodb database in Django

2018-05-17 Thread Ryan Nowakowski
It looks like you're reusing the variable connone. Could that be the issue? On May 15, 2018 10:38:06 AM CDT, gomahe...@gmail.com wrote: >I am new to Django started developing the application but got a >problem in >retrieving the data from already existing data which looks like this >below. >

Re: Django channel 2 - Provide seperate feeds to each users every 5 second

2018-05-20 Thread Ryan Nowakowski
On Fri, May 18, 2018 at 10:28:00PM -0700, sahadev sahu wrote: > Hello, > > I am implementing a websocket application for live data feed updates to > each client according to their watchlist in every 5 second. Here I am > explaining my requirement: > >1. Once user register with my applicatio

Re: Django channels with python background tasks

2018-05-26 Thread Ryan Nowakowski
In addition to websockets, channels can be used to run background tasks that could take a long time for example a telnet connection. You can Google Django channels background tasks. An alternative to channels for background tasks is celery. On May 26, 2018 5:03:51 AM CDT, Andrew Godwin wrote:

Re: Django channels with python background tasks

2018-05-26 Thread Ryan Nowakowski
Another idea: create a Django management command that does the telnet stuff and just run that periodically via Cron. You can always move to channels or celery later. On May 26, 2018 9:33:16 AM CDT, Ryan Nowakowski wrote: >In addition to websockets, channels can be used to run background ta

Re: Help with moving a development project to production

2016-05-02 Thread Ryan Nowakowski
On Mon, May 02, 2016 at 03:07:57PM -0700, Bruce Whealton wrote: > I have been developing a django project and app on a Ubuntu > system. My production system is Centos 6 based ( I think, not Centos 7). > First off, what should I commit to the repo? I setup a virtualenv using > virtual

Re: Best practice for implementing a dynamic "other" field in a group of radio buttons?

2016-12-03 Thread Ryan Nowakowski
On Fri, Nov 25, 2016 at 03:47:45PM -0800, Quentin Fulsher wrote: > Hi all, > > I'm working on a form that has to support a few groups of radio buttons. > I'm wondering if there is a recommended way to do an "other" radio button > that can be dynamically set by the user. Like the user can select

Re: Need help with a school project

2017-01-16 Thread Ryan Nowakowski
On Sat, Jan 14, 2017 at 04:10:09PM -0800, Grant Holman wrote: > I need help starting a django project for a school project. I am brand new > to Django but have some experience with Python. > > I need to design web application where inputs are put onto a screen and > then inputted into a databas

Re: Image Upload in admin panel

2019-02-20 Thread Ryan Nowakowski
Check out ImageField: https://docs.djangoproject.com/en/2.1/ref/models/fields/#imagefield On February 14, 2019 12:37:04 PM CST, Surajeet Das wrote: >How do I upload images from admin panel and retrieve from a html page ? > >-- >You received this message because you are subscribed to the Google

Re: Editing models in the view: Design advice needed

2019-02-23 Thread Ryan Nowakowski
You'll need to use JavaScript and XHR to send data to the server without refreshing the page. What makes you think the POST would be janky and insecure? On February 21, 2019 7:27:17 PM CST, Denver Sale wrote: >Hello, > >I'm somewhat new to Django/front end web development so I'm wondering >what

Re: Using progress bars while performing long computations and loading another page

2019-02-23 Thread Ryan Nowakowski
Whenever I've used celery in the past, any logging in the celery task appears in the terminal running the celery worker. On February 23, 2019 6:29:39 AM CST, Mohamed Maher wrote: >Hello, > >I have a scenario now where I send a GET request from a form in a web >page >to another page where I do s

Re: migrating from 2.7 to 3.x on Ubuntu

2019-03-07 Thread Ryan Nowakowski
Seems doable. I would leave nginx out of it and just run gunicorn Python 3 with Apache. Also I would do the release upgrade before. On March 4, 2019 10:40:21 PM CST, Mike Dewhirst wrote: >On the same host, is it viable to switch my Django projects away from >vhosts under Apache2/mod_wsgi/py2.7

Re: How can I make users login to my site with facebook/twitter/google?

2019-03-07 Thread Ryan Nowakowski
For your https problem I recommend a service like localtunnel or ngrok. On March 5, 2019 11:19:16 AM CST, Sandip Nath wrote: >i want users to my site to log log in with facebook, twitter, google. >While >the development server supports only http fb/twitter/google expects >https. >What to do? >

Re: Django csv file

2019-03-12 Thread Ryan Nowakowski
If I were you, I'd work through the Django tutorial first. Then ask specific questions if you have any. On March 12, 2019 5:32:08 AM CDT, Cigi Sebastine wrote: >Hi all > >I am trying to insert data from csv file to mongodb4 using python3.7 >(Bulk >data insertion 47lakhs records) >i need to impl

Re: Django's best way to upload data into a postgresql database

2019-03-17 Thread Ryan Nowakowski
Send like a pretty standard optimization scenario. I'd recommend: 1. Find the bottleneck. Here if your suspect it's pandas dataframe vs lists, run a timing analysis using each. 2. Remove the bottleneck On March 17, 2019 6:52:23 PM CDT, "Guillermo Yáñez Feliú" wrote: > > >Hello, > > >I’m worki

Re: is that any way to deploy django in apache with centos

2019-06-01 Thread Ryan Nowakowski
Please post the specific error you're getting. On May 30, 2019 6:59:22 AM CDT, Kurosh Sol wrote: >is that any way to set Django in apache with wsgi mod in centos >I keep reading and still get error >any good resource can really work? > >-- >You received this message because you are subscribed

  1   2   3   >