Re: Django developer required- Work from Home

2025-02-07 Thread Mark Odoyo
Hello, I'm interested Regards, Mark On Wed, Feb 5, 2025 at 10:27 PM Nilesh Mishra wrote: > We require expert django developer on contract/hourly basis to lead our > team for website development. > > Required skill set > > Python > Django > Mongodb > React js &

URL pattern problem

2023-03-13 Thread Mark McWiggins
;, views.depot_device, name='depot'), But when the system sends in a URL like: *devices/show/a100038596* I get NoReverseMatch on the pattern above (which works for other URLs in the system, so just changing it doesn't work.) Can you provide an additional pattern that will work

ORA-00918 error (column ambiguously defined) Django 4.1

2023-03-07 Thread Mark McWiggins
We're getting this Oracle error from the Django line: File "/home/aotemp/myvenv/lib/python3.8/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/home/aotemp/myvenv/lib/python3.8/site-packages/django/db/backends/oracle/base.py",

TabularInlineAdmin queries waaaaaayyyyyy too much.

2023-02-02 Thread Mark Jones
I have an admin with 1 row in the tabular inline. I have a custom queryset in class ExtensionTabularInlineFormSet(BaseInlineFormSet): def get_queryset(self) -> QuerySet[Extension]: qs = super().get_queryset() This gets called 20 times to display that one row. When you have more ro

Re: Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-25 Thread Mark Gensler
Try adding your ngrok domain to the list of CSRF_TRUSTED_ORIGINS: https://docs.djangoproject.com/en/4.1/ref/settings/#csrf-trusted-origins E.g. assuming you're using https: CSRF_TRUSTED_ORIGINS = ["https://*.ngrok.io";] On Wednesday, November 23, 2022 at 2:22:14 PM UTC dhana...@gmail.com wrote:

Re:Thanks

2022-07-28 Thread Mark Odoyo
Thanks On Fri, Jul 22, 2022, 7:49 PM Gerardo Palazuelos Guerrero < gerardo.palazue...@gmail.com> wrote: > I'm watching this series, it might help you understand. > > Python & Django 3.2 Tutorial Series > > https://www.youtube.com/watch?v=SlHBNXW1rTk&list=PLEsfXFp6DpzRMby_cSoWTFw8zaMdTEXgL > > --

External Authentication with username in header

2022-07-15 Thread Mark Glass
I would like to change the link that opens a Django app. Currently the app is launched with GET http://localhost:8000. I would like to include a username and password in the header. The header would be intercepted somehow (Middleware?) and the user marked as authenticated. The app will then lau

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
Yes. All migrations have been done. On Tue, Jun 7, 2022, 9:01 AM Sebastian Jung wrote: > Do you have make manage.py migrate and afzer this manage.py makemigrations? > > Mark Phillips schrieb am Di., 7. Juni 2022, > 17:02: > >> I can't seem to be able to create a t

Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
create-django-test-database if anyone can help. Thanks! Mark -- 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.

Looking for Recommendations for a Django Photo Gallery

2022-01-24 Thread Mark Phillips
has all the albums and photos in named directories on the file system, so I would like, if possible, to have the new photo gallery use the same directory structure. There are so many django photo galleries that I am not sure what is good and what isn't. Thanks for your recommendations!

Choosing label in Admin autocomplete_fields widget

2021-12-13 Thread Mark Rossetti
In Django 3.1, we were using autocomplete_fields on Admin edit pages with some foreign keys. To improve usability, we had overridden ModelAdmin.autocomplete_view so that it would provide us with human-readable labels. Very similar to the question and solution in this Stack Overflow post: http

Re: Hiii Every one

2021-07-16 Thread Mark Phillips
I have had good success with Linode, https://www.linode.com/. Their support has always been helpful and quick. Mark On Thu, Jul 15, 2021 at 11:18 AM Sebastian Jung wrote: > Hello, > > In germany we have a provider where you get a root server for 7€ with 2 > cores. Name is netc

How to modify messages displayed in Admin change page?

2020-04-17 Thread Mark Phillips
Where can I find the message that the document was saved properly and remove it from the messages list? Thanks! Mark -- 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, sen

How can I delete the parent object related through a many to many field?

2020-03-24 Thread Mark Phillips
n to be deleted when all the associated Documents are deleted? Thanks! Mark -- 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...@

Django 3.0 Admin CHange Page Not Displaying Selected Option Correctly

2020-03-24 Thread Mark Phillips
r the admin change page. Not my page template, but plain vanilla django admin templates. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: Install library from Github

2020-01-02 Thread Mark Ogilvie
;utm_source=footer> >>>> . >>>> >>> -- >> 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 dja

Re: Django- Display PDf document in an Iframe or Pdf VIewer

2019-11-25 Thread Mark Phillips
page, I used Pillow to grab the first page of the pdf and make a jpg thumbnail of that page. Then use similar code from the display_image above after the else (for displaying an image on the page in the admin). Hope that helps! Mark On Mon, Nov 25, 2019 at 7:46 AM 'Lucas Gärtner' via Dj

When to use Admin model_delete/model_save and Model delete/save?

2019-11-25 Thread Mark Phillips
nctionally, it does not matter as far as I can see. I am just wondering if there is a preferred way, or a more "django idiomatic" way to do this. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Reverse loopup for admin_order_field?

2019-11-21 Thread Mark Phillips
some way to do a reverse lookup on the document_id field to the DocumentMetaData model (since admin_order_field needs a related model) so I can sort on the decade field in the DocumentAdmin? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Djang

Re: Doesn't save data django Foreignkey model

2019-08-26 Thread Mark Ochieng
Are trying to save data for Customer that does not exist in your CustomerData table yet. Because I think the error is tries to inform you that Billing data can only be created for a customer that already exists on you CustomerData On Sunday, August 25, 2019 at 5:17:24 PM UTC+3, Asaduzzaman Sohe

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
sqlite3.dylib On Sat, Jun 15, 2019 at 8:16 AM Simon Charette wrote: > I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite > 3.20+ > the slowdown I mentioned should be effective. > > Simon > > Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit :

Re: Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
v2.2? Django isn't getting slower as the version of python increases, it's getting slower as the version of Django increases. On Sat, Jun 15, 2019 at 7:20 AM Simon Charette wrote: > Hi Mark, > > It's hard to tell exactly what's going on without more details but

Django tests appear to be getting substantially slower

2019-06-15 Thread Mark Jones
I was fixing up a Django app https://github.com/mark0978/django-softdelete and setting up tox to make sure it worked with all the listed versions because of issues opened on the original repo. While I was running tox locally I noticed that with every version of Django, the tests ran slower, and

Redirect on POST

2019-06-07 Thread Mark Davies Tan
ut nothing happens. Since I don't have access to my client's code, I've been testing it out on w3schools and jsfiddle. Any clues on this? Thanks, Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: Convert JSON data into structured data in an SQL database using Django ORM

2019-02-02 Thread Mark Phillips
/docs/9.3/functions-json.html JSON, Django, and MySQL docs https://django-mysql.readthedocs.io/en/latest/installation.html Mark Mark On Sat, Feb 2, 2019 at 2:04 PM Parth Sharma wrote: > I am building a chatbot using Django with a MySQL backend. > I have a `ChatSession` model which represe

Re: Looking for a Django Co-Founder.

2019-02-02 Thread Mark Phillips
This thread appears to be a scam. It seems the OP is not contacting any of the folks who say they are interested. Perhaps this thread should be removed? Mark On Sat, Feb 2, 2019 at 6:15 AM Anh Nguyen wrote: > Hi, it there are still able to join ? > > Sent from my iPhone > > On J

Re: hello i am developing online automated text classification so i need some help soon as possible.

2018-12-11 Thread Mark Phillips
http://www.catb.org/esr/faqs/smart-questions.html On Tue, Dec 11, 2018 at 3:10 AM Waqas Ali wrote: > > -- > 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 dja

Re: left join with and condition

2018-12-05 Thread Mark Phillips
Take a look at 'Q objects' in the django documentation - https://docs.djangoproject.com/en/2.1/ref/models/querysets/#django.db.models.Q Perhaps F objects will help. https://docs.djangoproject.com/en/2.1/ref/models/expressions/#django.db.models.F Mark On Wed, Dec 5, 2018 at 9:12 AM Ar

Re: How I can insert data into database automaticaly

2018-12-04 Thread Mark Phillips
data. Depends on the situation, of course. Mark On Tue, Dec 4, 2018 at 10:51 AM Gerson David Vizquel Alemán < gvizq...@gmail.com> wrote: > Hola Jesus, la información que requieres cargar inicialmente en la base de > datos es información fake o real? > > El martes, 4 de dici

DELETE http method calls retreive function in ModelViewSet

2018-12-04 Thread Mark Dewey
I have a class defined as a subclass of viewsets.ModelViewSet which implements a destroy and retrieve function (among others). When calling the api endpoint associated with this using the DELETE http method, the retreive function is called rather than the delete function. The call looks somet

Celery/Redis Django 2.0 Design Question

2018-10-27 Thread Mark Phillips
transformations complete successfully. I looked at django-fsm for this, but I think it will be better to run the transformations as celery tasks than to block the site. Does this plan make sense, or am I missing something regarding django and celery/redis. Thanks! Mark -- You received this

Re: I Suck

2018-10-27 Thread Mark Phillips
Take a look at this article...you aren't alone! Mark On Thu, Oct 25, 2018 at 4:50 AM Motaz Hejaze wrote: > Edson my Bro , > > all you need is to make simple thing , make just a traditional > Home/About/Contact website , i can walk you through it if you want .. > > On Thu

Weird messages in my console

2018-10-26 Thread Mark Phillips
mped on how to track down these strange messages. Thanks for any help you can provide! Mark -- 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-use

Re: Django auto-deletes field related to MySQL Transactions

2018-10-24 Thread Mark Phillips
Just a wild guess - do you have a cascade delete in your models that is causing the deletion? Is a user deleting another object, and that is triggering a cascade delete on a different model? Mark On Wed, Oct 24, 2018 at 4:22 PM RyanW wrote: > Yes, it is. Are you referring to 'delete&#x

Re: Adding crop and rotate to django image upload

2018-10-24 Thread Mark Phillips
many more projects/blogs on this topic. Good luck! Mark On Wed, Oct 24, 2018 at 3:55 PM <2012...@gmail.com> wrote: > Hello, > > I confess that I have no experience with django. > I have a project where the django app was written by developers and I want > to add a few

Re: I Suck

2018-10-24 Thread Mark Phillips
other! Mark On Wed, Oct 24, 2018 at 10:43 AM Ryan Gedwill wrote: > I felt the same as you while learning django, and I already had some > professional experience. > > It is extremely overwhelming to learn something like this on your own. > Even people who go to college and get in

Re: Recreate all tables in mysql after dropping the database

2018-09-16 Thread Mark Phillips
://docs.djangoproject.com/en/2.1/howto/initial-data/, if you want to now add some initial data to your tables. Mark On Sun, Sep 16, 2018 at 9:46 AM, Joel Mathew wrote: > I tried to fix mysql problems in my database by dropping tables. When that > didnt work, I dropped the database. > I then recr

Re: y its not working

2018-09-12 Thread Mark Phillips
The Exception Type says the template does not exist. The Exception Value says the missing template is personal/home.html. The template personal/home.html does not exist or is not located where django is looking for it. Mark On Tue, Sep 11, 2018 at 9:55 PM, Mohamad Rumaiz wrote

Re:

2018-08-31 Thread Mark Phillips
Please read the footer of every message for instructions regarding how to unsubscribe. You have to do it yourself. Mark On Fri, Aug 31, 2018, 9:36 AM Nitesh Chaudhary wrote: > Please unsubscribe my account neety...@gmail.com. I got unnecessary mail. > > -- > You received this mes

Re: Searchable dropdown from models

2018-08-29 Thread Mark Phillips
function withing the django framework. Hope this helps! Mark On Wed, Aug 29, 2018 at 1:02 PM, ah wrote: > Hi, > I am trying to create a searchable dropdown list based on Django's model. > I have a model M that has 6 objects [apple,orange,carrot,banana, > kiwi,peach]. > I want

Re: Advice on Model Structures

2018-08-13 Thread Mark Phillips
complicated (ie simple case - some JavaScript, a special url, and a special view for that url to get the data - there are examples in github for this as well). Django does not do this for you out of the box. IMO, it all depends on how comfortable you are with JavaScript. Mark On Mon, Aug 13, 2018 at 9:57

Re: How to write api for sms intregartion in django I am new in django?

2018-08-01 Thread Mark Caglienzi
On Wed, 2018-08-01 at 00:26 -0700, im...@wsegames.com wrote: > Here is my code > > > class RegisterView(CreateView): > form_class = RegisterForm > template_name = 'accounts/register.html' > success_url = '/success-membership/' > > def form_valid(self, form): > url = "http

Re: What is the best route to take to build a general CMS using Django?

2018-07-11 Thread Mark Phillips
The point of my response was to let the original author know that he/she should do some basic research first and then ask a more specific question. A general question like the one in the subject line is pretty much a wast of everyone's time, imo. Mark On Wed, Jul 11, 2018 at 6:24 PM, m

Re: What is the best route to take to build a general CMS using Django?

2018-07-11 Thread Mark Phillips
https://www.google.com/search?q=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F&oq=What+is+the+best+route+to+take+to+build+a+general+CMS+using+Django%3F&aqs=chrome..69i57j69i60.948j0j9&sourceid=chrome&ie=UTF-8 On Wed, Jul 11, 2018 at 5:21 PM, afj afj wrote: > --- > > -- > Y

Re: Why using manage.py command in CLI instead of using django-admin command? what's the difference between them?

2018-07-11 Thread Mark Phillips
https://www.google.com/search?q=Why+using+manage.py+command+in+CLI+instead+of+using+django-admin+command%3F+what%27s+the+difference+between+them%3F&oq=Why+using+manage.py+command+in+CLI+instead+of+using+django-admin+command%3F+what%27s+the+difference+between+them%3F&aqs=chrome..69i57j69i60.1333j0j8

Re: Makemigration not working.. Please help me

2018-07-02 Thread Mark Phillips
ython indentation rules" for more explanation. There may be other things wrong with your code, but start by fixing this one thing and try again! Mark On Mon, Jul 2, 2018 at 10:40 PM, Tamilvanan Anbalagan < tamilanbala...@gmail.com> wrote: > > When i execute the makemigrations comm

Re: Database

2018-06-30 Thread Mark Phillips
most.... Mark On Sat, Jun 30, 2018 at 1:21 PM, Joshua Kayode wrote: > Use postgresql, but you can find reasons not to!, the choice between > MySQL and postgresql is more or less personal! Both have their strengths > and weakness! > > On Jun 30, 2018 14:05, "ABHIS

Re: Django Admin

2018-06-29 Thread Mark Phillips
selects, django autocomplete, django ajax, and this page of projects - https://djangopackages.org/grids/g/auto-complete/. Good luck! Mark On Fri, Jun 29, 2018 at 7:27 AM, Teja Yerraballe < teja.yerraba...@aspiresys.com> wrote: > Hi Team, > > > I have created 4 models ( cl

Re: better way to create a dictionary in Django model?

2018-06-27 Thread Mark Phillips
data. I can't post the code I use, but this outline should give you enough pointers to look in the Django docs and get some examples from Google. Good luck! Mark On Wed, Jun 27, 2018 at 6:23 AM, prateek gupta wrote: > It has some limit- The configuration object can only be changed, the

Re: Problems with list_filter and date_hierarchy in django2.05

2018-06-16 Thread Mark Phillips
ent`.`document_id` *DESC* The first part up to the first OR finds the one document created on 6/15/2018, but all the rest of the OR clauses just select all the rest of the documents in the database, so no matter what date I query, I get all the documents in the database. Any ideas on how to get dat

Re: Problems with list_filter and date_hierarchy in django2.05

2018-06-14 Thread Mark Phillips
c/refman/8.0/en/mysql-tzinfo-to-sql.html). I am not sure of the time zone issue is a red herring or not. Anyone have a suggestion on how to debug the problem? Thanks! Mark On Thu, Jun 14, 2018 at 2:02 PM, Mark Phillips wrote: > I have two related models, Document and DocumentMetaData, and t

Problems with list_filter and date_hierarchy in django2.05

2018-06-14 Thread Mark Phillips
t of their job, they just look pretty on the admin page. ;) I am not sure how to debug this, as there are no error messages on the console. How would you suggest I debug this? Thanks! Mark class Document(Model): document_id = models.AutoField(primary_key=True) # Document states PRI

Re: Best way to add an image from a filefield to django 2.0 admin?

2018-06-06 Thread Mark Phillips
default image if (obj.document_id.storage_file_name): image = ''.format(image_link = obj.document_id.storage_file_name.url, thumb_nail = obj.document_id.storage_file_name.url) return format_html(image) Thanks! Mark PS Still working on defining the 'extrapretty&#x

Best way to add an image from a filefield to django 2.0 admin?

2018-06-04 Thread Mark Phillips
admin. How do I do it? Do I have to override the admin/change_form.html for the DocumentMetaData model? Thanks! Mark -- 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

Re: Implementing a 'please wait' page

2018-05-31 Thread Mark Phillips
Have you looked at celery (http://www.celeryproject.org/) to handle the long running process? Perhaps in conjunction with redis (https://redis.io/)? If you passed the long running process to celery, then you could change the page to "say please wait....". Mark On Thu, May 31, 2018

Re: How to get the primary key of the underlying model in a ModelForm?

2018-05-30 Thread Mark Phillips
Mathew, Thanks! Mark On Tue, May 29, 2018 at 2:18 PM, Matthew Pava wrote: > You can access self.instance, which should have all the fields populated > for that model instance. So you can access it via self.instance.pk. > > > > Keep in mind, though, that if you are creating

How to get the primary key of the underlying model in a ModelForm?

2018-05-29 Thread Mark Phillips
primary key, because one of the fields on the form belongs to another model (it is a JSON field), and I need to save that field in the other model when the DocumentForm is saved. How do I access the primary key of the underlying Model in a ModelForm? Thanks! Mark -- You received this message

How to update Django 2 JSON FIeld?

2018-05-27 Thread Mark Phillips
ype': 'Individual', 'Person': ['Tina Phillips Roderique'], 'URL': 'http://sam.com', 'Decade': '1990', 'a boolean': False} >>> fred[0].metadata = sam >>> fred[0].metadata {'Date': '05/

Unit testing models.py

2018-05-13 Thread Mark Phillips
ecessary, as I would again assume django covers this in their unit tests? Anything else that I am missing? Thanks! Mark -- 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,

Re: Django Queries

2018-05-11 Thread Mark Phillips
document_state 1 >>> d[0].storage_file_name >>> title, document_id, description, and storage_file_name are all fields defined in the model for Document (along with others). Read the django documentation about models and queries for more information. Mark On Fri, May 11, 2018 at 9

How to make queries using Mysql JSON field and django 2

2018-05-11 Thread Mark Phillips
Jacobs" in the "Person" field, the query would return both that record and the record with the "Sam Smith" in the Person field. Either some sort of "or" condition within the query that would allow me to search for "Sam Smith" or "Sammy Jacobs

Re: Add extra fields to a ModelAdmin form

2018-05-05 Thread Mark Phillips
help! Mark On Wed, May 2, 2018 at 9:12 AM, 'James Foley' via Django users < django-users@googlegroups.com> wrote: > Hey Mark, > > I've not actually found a solution yet, I've just sort of put it at the > bottom of my pile of problems... > > Here is

Re: Add extra fields to a ModelAdmin form

2018-05-02 Thread Mark Phillips
. Would you be willing to share your code with me? In particular, I am not sure where and how you are using self.form.declared_fields. I am running django 1.11. Thanks! Mark On Mon, Apr 30, 2018 at 1:41 AM, 'James Foley' via Django users < django-users@googlegroups.com> wrote:

Weirdness with Chained Selects in the Admin

2018-04-22 Thread Mark Phillips
"#id_documentmetadatavalue_set-0-metadataValue").val($("#id_documentmetadatavalue_set-0-metadataValue option:first").val()); $("#id_documentmetadatavalue_set-0-metadataValue").selectmenu('refresh'); } }); } }); }); Thanks for any insights yo

How to Make a Custom Inline Form for Admin

2018-04-17 Thread Mark Phillips
900, 1910, etc} A user would click a check box for Person and then select an option from the associated select box to add that metadata information to the DocumentMetaDataValue table. I have been playing around with using forms. ModelForms and forms.Forms, and can't seem to get anything to

Re: How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
Thanks for the link - I have read it before. I need to stay with these models, so is there a simple query to get my result, or do I have to make multiple queries and combine the data in python? Thanks, Mark On Wed, Apr 11, 2018 at 4:14 PM, Christophe Pettus wrote: > > > On Apr 11, 20

How to formulate a query over two models?

2018-04-11 Thread Mark Phillips
on't see how to relate the two models and get something close to what I want. Thanks! Mark -- 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-u

Can I test for count of a many to many field, in a Q query, along with other filters?

2018-01-16 Thread Mark London
ithin a Q query? If not, can I make 2 separate queries, and combine them, and eliminate duplicates? Thanks! - Mark -- 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

MongoDB and Django

2018-01-06 Thread Mark Phillips
, the group is using. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Re: Model Design Questions

2017-12-22 Thread Mark Phillips
ith django and mysql and bite the bullet if I need to do some fancy db manipulations down the road. Thanks again! Mark On Sun, Dec 17, 2017 at 5:04 AM, James Schneider wrote: > > > On Dec 16, 2017 4:46 PM, "Mark Phillips" > wrote: > > I am building an electronic docum

Many to Many fields and through table

2017-12-19 Thread Mark Phillips
urdles, so I am considering creating the through table now in case "the powers that be" (ie end users!) decide we need some extra data for the relationship in the future. Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group.

Model Design Questions

2017-12-16 Thread Mark Phillips
u can provide! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
should have been class CollectionAdmin(admin.ModelAdmin) in the above post. Mark On Sat, Dec 9, 2017 at 9:16 AM, Mark Phillips wrote: > Hit send by accident... > > Constantine, > > Thanks for the link and update! However, I am not sure how to make two > columns in the Coll

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
documents: tempstr = tempstr + d.field_2 return tempstr Mark On Sat, Dec 9, 2017 at 9:14 AM, Mark Phillips wrote: > Constantine, > > Thanks for the link and update! However, I am not sure how to make two > columns in the CollectionsAdmin table without two functions.

Re: Need Help with Many to Many Fields

2017-12-09 Thread Mark Phillips
> Hi Mark, > > You should not create 2 methods. > Just change that first to be like: > > return obj.document.all().values_list('field_1', 'field_2') > > With this you will get QuerySet of tuples, like > > > I believe it should solve your pro

Need Help with Many to Many Fields

2017-12-08 Thread Mark Phillips
the documents in the collection correctly? Is there some way to get a queryset to look up the Document fields directly, or do I have to make two queries as I am doing? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: Need Help with Field Validation

2017-12-04 Thread Mark Phillips
to access the other fields in the returned data. No idea why, but it works now! Can someone explain the difference between self.cleaned_data and self.instance in a ModelForm? Thanks! Mark On Sun, Dec 3, 2017 at 7:43 PM, Mark Phillips wrote: > I have a model called Document that has a

Need Help with Field Validation

2017-12-03 Thread Mark Phillips
nt_document_id should exist and be equal to the d.document_id (the id of the document found in the search). I can't figure out why the current_document_id is always None. What am I missing here? How else can I block the ValidationError when I am merely updating another Document field, beca

Anyone Having Success with Wand to Create Thumbnails from PDF files?

2017-11-13 Thread Mark Phillips
] output_thumbnail.jpg But when I try to use wand on the same image I get this error: Traceback (most recent call last): File "/home/mark/python-projects/memorabilia-project/memorabilia/models.py", line 24, in make_thumb pages = Image(blob = b) File "/home/mark/.virtualenvs/memorabili

Re: Generating a unique 10 digit ID for each model instance

2017-10-22 Thread Mark Phillips
I thought python's uuid.uuid4 guaranteed a unique value. Am I missing something? Mark On Sun, Oct 22, 2017 at 3:58 PM, James Schneider wrote: > > > On Oct 22, 2017 12:29 PM, "Andréas Kühne" > wrote: > > Hi, > > I think you are correct with your pseudocod

Re: How to pre-load model data?

2017-09-09 Thread Mark Phillips
ngo import/exporter. A spreadsheet seems the easiest way to keep a list of the metadata names and metadata values for now. I am also looking at a csv -> json converter to use with "manage.py loaddata". Still open to other suggestions to simplify this problem! Thanks again, Mark On Fri

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
Brilliant idea! Did not know these importers existed. Thanks! Mark On Fri, Sep 8, 2017 at 3:11 PM, Jani Tiainen wrote: > Hi. > > We actually implemented spreadsheet importer for one of our clients. > > It was relatively trivial. Just read the row from spreadsheet put it to

Re: How to pre-load model data?

2017-09-08 Thread Mark Phillips
readsheet to the database. I am open to other suggestions! Thanks! Mark On Thu, Sep 7, 2017 at 10:29 PM, wrote: > hi, > think about problem, you mean initial data? see this(https://docs. > djangoproject.com/en/1.11/howto/initial-data/) > django way suggestion: > 1. django comman

How to pre-load model data?

2017-09-07 Thread Mark Phillips
with some data, or is there another way the more closely ties the data to the models? Thanks! Mark -- 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 d

Re: How to add more fields to each ManyToMany Field in Django?

2017-09-04 Thread Mark Phillips
select box, then you need some javascript to perform a real-time update to your admin page before to display the correct price. There are frameworks available as django apps for doing this. Mark On Mon, Sep 4, 2017 at 10:19 AM, Omer Iqbal wrote: > Hi, > > > > > > > >

Re: Having issue getting django working on shared hosting account

2017-08-29 Thread Mark Phillips
Linode is a better buy (more ram for the buck) than Digital Ocean. Both are good hosting companies. Mark On Tue, Aug 29, 2017 at 9:18 PM, James Schneider wrote: > > > On Aug 29, 2017 5:18 PM, "Thomas Campion" wrote: > > I tried following vendor instructions for inst

Re: Python and Django traing

2017-08-26 Thread Mark Phillips
correction - https://www.obeythetestinggoat.com/ On Sat, Aug 26, 2017 at 5:55 PM, Gerardo Palazuelos Guerrero < gerardo.palazue...@gmail.com> wrote: > Hi, > I'm on the same situation, still learning. > > Besides the ones mentioned (I specially liked a lot the DjangoGirls > tutorial), there quite

Questions About ModelForm

2017-08-20 Thread Mark Phillips
w and pass that to the form. Is that the appropriate way to do something like this? Thanks, Mark -- 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-u

if user double-clicks form submit with csrf token, even with redirect on POST browser shows 403 FORBIDDEN and csrf failed message

2017-08-02 Thread Mark Mikofski
okay, this is weird. If a user double-clicks the form submit button, even tho POST should redirect, they still get 403 FORBIDDEN with csrf failed message. I think this is like a web developer question, is this some latency issue with my browser, network or web server? I use Apache-2 httpd with

Re: failed of installing MySLQ

2017-07-31 Thread Mark Phillips
27;t think installing MySQL requires visual C++, but I am not an expert. Mark On Mon, Jul 31, 2017 at 2:35 AM, Antonis Christofides < anto...@djangodeployment.com> wrote: > Hello, > > since you aren't experience, start easier and use SQLite. Mostly everyone > (even the exper

Re: Need help modifying form on intermediate page of admin action

2017-07-29 Thread Mark Phillips
nal coding outside of django. Good luck! Mark On Sat, Jul 29, 2017 at 8:57 PM, Jack Twilley wrote: > I have a Django app which keeps inventory. There are two relevant classes > here, one named Jar and another named Crate. The Jar class has an > attribute crate which is a foreign key

Re: Django beginner

2017-07-14 Thread Mark Aydelotte
I would think you have a advantage by knowing Python. I just started learning both and i am not finding Django that hard. On Thursday, July 13, 2017 at 7:51:50 PM UTC-4, Amir Pirmoradian wrote: > > Hey Guys, i'm a absolute beginner at Django. I started to learn django > from https://www.djangop

Re: django webframework

2017-07-04 Thread Mark Phillips
Hi Arun! If tomcat is required for this project, then are you supposed to code the project in java? If so, then python and django are not what you need. Maybe Ruby, or Wicket is better suited for your project. Mark On Tue, Jul 4, 2017 at 7:26 AM, Vivek Shrivastava wrote: > Well, I wo

Django Smart Selects - What does 'models world readable' mean??

2017-07-02 Thread Mark Phillips
ith a world readable model? In what situations would it be irrelevant and in what situations would it be a huge security risk? Thanks! Mark -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Retrieve field values from ManyToMany field in model

2017-06-28 Thread Mark Phillips
ield(Document) metadata = models.ManyToManyField(MetaData) metadatavalue = models.ManyToManyField(MetaDataValue) The problem I am having is that when I add data to the DocumentMetaData screen in the admin portal, the model does not maintain the relationship between the MetaData and the MetaDataName. For e

Re: Retrieve field values from ManyToMany field in model

2017-06-25 Thread Mark Phillips
ocumentMetaData to only refer to a single > document and a single metadata then change the ManyToManyField for a > ForeignKey > That is not what I want. > > If you do that then you can do self.document.title and > self.metadata.name to access those fields. > > On 6/25/17, M

Re: Model design question

2017-06-25 Thread Mark Phillips
On Sun, Jun 25, 2017 at 6:56 PM, Constantine Covtushenko < constantine@gmail.com> wrote: > Hi Mark, > > I have some questions to you. > 1. Does any of MetaData have predefined list of MetaDataValues? > No, I want to add them in real time as Documents are uploaded. >

Model design question

2017-06-25 Thread Mark Phillips
from a drop down list (good). However, the bad news is that the relationship between the MetaData and MetaDataValue is not preserved. For example, say I have MetaData 'people' with values John, Mark, Allison, and 'events' with values birthday, wedding, funeral. When I add a Docu

Retrieve field values from ManyToMany field in model

2017-06-25 Thread Mark Phillips
data) The Document class has a field called 'title' and the Metadata class has a field called 'name'. How do I accesses these two fields from the class DocumentMetaData so the string output is something like - < metadata.name>? Thanks! Mark -- You received this messa

Re: how to combine views in one template

2017-06-17 Thread Mark Alan Jones
ld, 'form': form }) Thanks all for help On Sunday, June 18, 2017 at 12:51:00 AM UTC+1, Mark Alan Jones wrote: > > Thank you very much for the help Matthew, that is absolutely spot on, and > greatly appreciated. > > My view now looks like this: > def builddetails(re

  1   2   3   4   5   6   >