Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7885865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:10:44+00:00 2026-06-03T05:10:44+00:00

Here is my model: class Company(models.Model): id = models.AutoField(primary_key=True); name = models.CharField(max_length=100); address =

  • 0

Here is my model:

class Company(models.Model):      
    id = models.AutoField(primary_key=True);
    name = models.CharField(max_length=100);
    address = models.CharField(max_length=100, null=True);
    city = models.CharField(max_length=100);
    state = models.CharField(max_length=25);
    zip = models.IntegerField();
    latitude = models.CharField(max_length=20, null=True)
    longitude = models.CharField(max_length=20, null=True)  
    phone = models.CharField(max_length=15, null=True);
    website = models.CharField(max_length=50, null=True);
    email = models.EmailField(max_length=50, null=True);
    hiring = models.BooleanField(default=False);    
    approved = models.BooleanField(default=False);
    date_added = models.DateTimeField(auto_now_add=True);
    about_us = models.TextField(max_length=500, null=True);

And I have data like this:

    Id: since this is autofield, do i need to enter this?
    Name: 1-800 Postcards America's Printing Company
    Address: 121 Varick Street, 7th Floor
    City: New York
    State: NY
    Zip: 10013
    Latitude: 40.724831999999999
    Longitude: -74.00609
    Phone: 212-741-1070
    Website: http://www.1800postcards.com
    Email: info@1800postcards.com
    Hiring: No
    Approved: True
    Date Added: auto added as well, should I add a random date?
    About Us: Some about us with, many, commas, possible, etc.

I need to upload about 50+ companies using django to gae datastore. How do I create the csv file to make sure that the data inserts properly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:10:45+00:00Added an answer on June 3, 2026 at 5:10 am

    I’m not 100% sure this would work, but I’d write a python function to read in your file, parse the data line by line, and create and save the Company class. I’d test that out on the dev_appserver.

    Then I’d run that function in the remote shell. It should read the text file from the local disc, and save to the real datastore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code: class Publisher(models.Model): name = models.CharField( max_length = 200, unique = True,
Here is a Django model I'm using. class Person(models.Model): surname = models.CharField(max_length=255, null=True, blank=True)
I have the following in models.py: class Choices(models.Model): description = models.CharField(max_length=300) def __unicode__(self): return
here is my model class gameUserTrophyInfo(models.Model): user = models.ForeignKey(userInfo) trophy = models.ForeignKey(gameTrophyInfo) date =
Here's a snippet from my application: class PortolioItem(models.Model): ... user = models.ForeignKey(User) contract =
I'm newcomer in django, and here is question: I have model class: def Client(models.User)
I have a this model: class Fleet(models.Model): company = models.ForeignKey(Company, editable=False) aircraft = models.ForeignKey(Aircraft)
I have this in my models.py: class AuditableTable(models.Model): class Meta: abstract = True created_by
Here are the model relationships: class Tool < ActiveRecord::Base ... has_many :loss_ratios, :dependent =>
Here's my user model: class User < ActiveRecord::Base devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.